max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
libsrc/math/genmath/float.asm | andydansby/z88dk-mk2 | 1 | 98449 | ; Generic Z80 Floating point routines
; For Small C+ compiler
XLIB float
LIB norm
LIB l_long_neg
XDEF float1
XREF fasign
XREF fa
;
; convert the integer in hl to
; a floating point number in FA
;
; This routine will need to be rewritten slightly to handle
; long ints..hopefully fairly OKish..
.float LD A,d ;fetch MSB
.float1
CPL ;reverse sign bit
LD (FASIGN),A ;save sign (msb)
RLA ;move sign into cy
JR C,FL4 ;c => nonnegative number
call l_long_neg
; fp number is c ix de b
.FL4 ld c,d
ld ixh,e
ld a,h
ld ixl,a
ld d,l
ld e,0
ld b,e
LD A,32+128
LD (FA+5),A ;preset exponent
JP NORM ;go normalize c ix de b
|
oeis/142/A142855.asm | neoneye/loda-programs | 11 | 96709 | ; A142855: Primes congruent to 57 mod 61.
; Submitted by <NAME>
; 179,911,1033,1277,1399,2131,2741,3229,4327,4937,5059,5303,5669,5791,7499,7621,8231,8353,8597,8719,8963,9817,10061,10427,11159,12379,13477,13721,14087,15307,15551,16649,17137,17747,19211,19333,19577,19699,20431,21163,21407,21529,21773,22871,22993,23603,24091,25189,25799,27751,29581,29947,30313,30557,32143,33119,33851,34217,34583,34949,35437,35803,36779,36901,37511,37633,38609,39097,39341,39829,40927,41659,41903,42391,44221,44587,44953,45197,45319,46051,47149,47881,48247,48491,48857,49223,49711
mov $1,28
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,1
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,61
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,121
|
swift-jdbc-parser/src/main/resources/SwiftSqlLexer.g4 | fanruan/swift-jdbc | 7 | 4474 | lexer grammar SwiftSqlLexer;
// select
SELECT: S E L E C T;
DISTINCT: D I S T I N C T;
AS: A S;
FROM: F R O M;
WHERE: W H E R E;
GROUP: G R O U P;
BY: B Y;
HAVING: H A V I N G;
ORDER: O R D E R;
ASC: A S C;
DESC: D E S C;
LIMIT: L I M I T;
// insert
INSERT: I N S E R T;
INTO: I N T O;
VALUES: V A L U E S;
// delete
DELETE: D E L E T E;
// truncate
TRUNCATE: T R U N C A T E;
// create table
CREATE: C R E A T E;
TABLE: T A B L E;
NULL: N U L L;
PARTITION: P A R T I T I O N;
// data type
BIT: B I T;
TINYINT: T I N Y I N T;
SMALLINT: S M A L L I N T;
INTEGER: I N T E G E R;
BIGINT: B I G I N T;
FLOAT: F L O A T;
REAL: R E A L;
DOUBLE: D O U B L E;
NUMERIC: N U M E R I C;
DECIMAL: D E C I M A L;
CHAR: C H A R;
VARCHAR: V A R C H A R;
LONGVARCHAR: L O N G V A R C H A R;
DATE: D A T E;
TIME: T I M E;
TIMESTAMP: T I M E S T A M P;
BOOLEAN: B O O L E A N;
// drop table
DROP: D R O P;
// alter table
ALTER: A L T E R;
ADD: A D D;
COLUMN: C O L U M N;
// function
MAX: M A X;
MIN: M I N;
SUM: S U M;
AVG: A V G;
COUNT: C O U N T;
MID: M I D;
// swift featured function
TODATE: T O D A T E;
NOT: N O T;
IN: I N;
BETWEEN: B E T W E E N;
AND: A N D;
OR: O R;
LIKE: L I K E;
IS: I S;
// Swift keywords
LINE: L I N E;
HASH: H A S H;
RANGE: R A N G E;
// Operators. Arithmetics
MUL: '*';
DIV: '/';
MOD: '%';
PLUS: '+';
MINUS: '-';
// Operators. Comparation
EQ: '=';
GREATER: '>';
LESS: '<';
GEQ: '>=';
LEQ: '<=';
NEQ: '!=';
EXCLAMATION: '!';
// Operators. Bit
BIT_NOT: '~';
BIT_OR: '|';
BIT_AND: '&';
BIT_XOR: '^';
// Constructors symbols
DOT: '.';
L_PAR: '(';
R_PAR: ')';
COMMA: ',';
SEMI: ';';
AT: '@';
SINGLE_QUOTE: '\'';
DOUBLE_QUOTE: '"';
REVERSE_QUOTE: '`';
COLON: ':';
IDENTIFIER:
'"' (~'"' | '""')* '"'
| '`' (~'`' | '``')* '`'
| '[' ~']'* ']'
| [a-zA-Z_] [a-zA-Z_0-9]*; // TODO check: needs more chars in set
NUMERIC_LITERAL:
DIGIT+ ('.' DIGIT*)? (E [-+]? DIGIT+)?
| '.' DIGIT+ ( E [-+]? DIGIT+)?;
STRING_LITERAL: '\'' ( ~'\'' | '\'\'')* '\'';
DIGIT: [0-9];
// case insensitive
fragment A: [aA];
fragment B: [bB];
fragment C: [cC];
fragment D: [dD];
fragment E: [eE];
fragment F: [fF];
fragment G: [gG];
fragment H: [hH];
fragment I: [iI];
fragment J: [jJ];
fragment K: [kK];
fragment L: [lL];
fragment M: [mM];
fragment N: [nN];
fragment O: [oO];
fragment P: [pP];
fragment Q: [qQ];
fragment R: [rR];
fragment S: [sS];
fragment T: [tT];
fragment U: [uU];
fragment V: [vV];
fragment W: [wW];
fragment X: [xX];
fragment Y: [yY];
fragment Z: [zZ];
// white space
WS: [ \t\n\r]+ -> skip; |
attic/asis/find_all/adam-assist-query-find_all-actuals_for_traversing.ads | charlie5/aIDE | 3 | 2194 | <gh_stars>1-10
with Asis,
AdaM.Source;
package AdaM.Assist.Query.find_All.Actuals_for_traversing
is
type Traversal_State is
record
parent_Stack : AdaM.Source.Entities;
ignore_Starter : asis.Element := asis.Nil_Element;
end record;
Initial_Traversal_State : constant Traversal_State := (others => <>);
procedure Pre_Op
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Traversal_State);
procedure Post_Op
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Traversal_State);
end AdaM.Assist.Query.find_All.Actuals_for_traversing;
|
14-move_to_32/print_str_32.asm | soumitradev/assembly-fun | 2 | 3231 | ; This is 32 bit code. We can't run it unless we enter 32 bit protected mode.
[bits 32]
; Set some display constants
VIDEO_MEMORY equ 0xb8000
WHITE_ON_BLACK equ 0x0f
print_str_32:
; Push all registers to stack
pusha
; Move dx (now edx in 32 bit mode) to Video memory location
mov edx, VIDEO_MEMORY
; Create a loop for every char
print_str_32_loop:
; Move byte at string location to register a, and change color to white on black
mov al, [ebx]
mov ah, WHITE_ON_BLACK
; If char is null, jump to end
cmp al, 0
je print_str_32_done
; Store the character onto video memory location
mov [edx], ax
; Move ahead in memory
add ebx, 1
add edx, 2
jmp print_str_32_loop
; return
print_str_32_done:
popa
ret
|
bootloader/boot.asm | GithubPrankster/pranksterOS | 3 | 247891 | <filename>bootloader/boot.asm
/* Declare constants for the multiboot header. */
.set ALIGN, 1<<0 /* align loaded modules on page boundaries */
.set MEMINFO, 1<<1 /* provide memory map */
.set FLAGS, ALIGN | MEMINFO /* this is the Multiboot 'flag' field */
.set MAGIC, 0x1BADB002 /* 'magic number' lets bootloader find the header */
.set CHECKSUM, -(MAGIC + FLAGS) /* checksum of above, to prove we are multiboot */
/*
Declare a multiboot header that marks the program as a kernel. These are magic
values that are documented in the multiboot standard. The bootloader will
search for this signature in the first 8 KiB of the kernel file, aligned at a
32-bit boundary. The signature is in its own section so the header can be
forced to be within the first 8 KiB of the kernel file.
*/
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
/*
The multiboot standard does not define the value of the stack pointer register
(esp) and it is up to the kernel to provide a stack. This allocates room for a
small stack by creating a symbol at the bottom of it, then allocating 16384
bytes for it, and finally creating a symbol at the top. The stack grows
downwards on x86. The stack is in its own section so it can be marked nobits,
which means the kernel file is smaller because it does not contain an
uninitialized stack. The stack on x86 must be 16-byte aligned according to the
System V ABI standard and de-facto extensions. The compiler will assume the
stack is properly aligned and failure to align the stack will result in
undefined behavior.
*/
.section .bss
.align 16
stack_bottom:
.skip 16384 # 16 KiB
stack_top:
/*
The linker script specifies _start as the entry point to the kernel and the
bootloader will jump to this position once the kernel has been loaded. It
doesn't make sense to return from this function as the bootloader is gone.
*/
.section .text
.global _start
.type _start, @function
_start:
/*
The bootloader has loaded us into 32-bit protected mode on a x86
machine. Interrupts are disabled. Paging is disabled. The processor
state is as defined in the multiboot standard. The kernel has full
control of the CPU. The kernel can only make use of hardware features
and any code it provides as part of itself. There's no printf
function, unless the kernel provides its own <stdio.h> header and a
printf implementation. There are no security restrictions, no
safeguards, no debugging mechanisms, only what the kernel provides
itself. It has absolute and complete power over the
machine.
*/
/*
To set up a stack, we set the esp register to point to the top of the
stack (as it grows downwards on x86 systems). This is necessarily done
in assembly as languages such as C cannot function without a stack.
*/
mov $stack_top, %esp
/*
This is a good place to initialize crucial processor state before the
high-level kernel is entered. It's best to minimize the early
environment where crucial features are offline. Note that the
processor is not fully initialized yet: Features such as floating
point instructions and instruction set extensions are not initialized
yet. The GDT should be loaded here. Paging should be enabled here.
C++ features such as global constructors and exceptions will require
runtime support to work as well.
*/
/*
Enter the high-level kernel. The ABI requires the stack is 16-byte
aligned at the time of the call instruction (which afterwards pushes
the return pointer of size 4 bytes). The stack was originally 16-byte
aligned above and we've pushed a multiple of 16 bytes to the
stack since (pushed 0 bytes so far), so the alignment has thus been
preserved and the call is well defined.
*/
call kernel_main
/*
If the system has nothing more to do, put the computer into an
infinite loop. To do that:
1) Disable interrupts with cli (clear interrupt enable in eflags).
They are already disabled by the bootloader, so this is not needed.
Mind that you might later enable interrupts and return from
kernel_main (which is sort of nonsensical to do).
2) Wait for the next interrupt to arrive with hlt (halt instruction).
Since they are disabled, this will lock up the computer.
3) Jump to the hlt instruction if it ever wakes up due to a
non-maskable interrupt occurring or due to system management mode.
*/
cli
1: hlt
jmp 1b
/*
Set the size of the _start symbol to the current location '.' minus its start.
This is useful when debugging or when you implement call tracing.
*/
.size _start, . - _start |
projects/04/Fill.asm | jmaver-plume/nand2tetris | 0 | 240552 | <filename>projects/04/Fill.asm
// Loop Counter
@R0
M=0
(KEYBOARD_LOOP)
@KBD
D=M
@R0
M=0
@SET_WHITE_LOOP
D;JEQ
@SET_BLACK_LOOP
D;JNE
(NEXT)
@GET_NEXT
0;JMP
(RECEIVE_NEXT)
// If zero stop
@END
D;JLT
@SET_NEXT
0;JMP
(SET_NEXT_COMPLETE)
@R2
D=M
@R1
A=M
M=D
@R0
M=M+1
@NEXT
0;JMP
(SET_NEXT)
@R1
M=D
@SCREEN
D=A
@R1
M=M+D
@SET_NEXT_COMPLETE
0;JMP
(GET_NEXT)
@8191
D=A
@R0
D=D-M
@RECEIVE_NEXT
0;JMP
(SET_WHITE_LOOP)
@R2
M=0
D=M
@NEXT
0;JMP
(SET_BLACK_LOOP)
@R2
M=-1
D=M
@NEXT
0;JMP
(END)
@KEYBOARD_LOOP
0;JMP
|
Library/GrObj/Body/bodyCutCopyPaste.asm | steakknife/pcgeos | 504 | 26501 | <reponame>steakknife/pcgeos<filename>Library/GrObj/Body/bodyCutCopyPaste.asm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: graphicBodyCutCopyPaste.asm
AUTHOR: <NAME>, Nov 15, 1989
ROUTINES:
Name Description
---- -----------
GrObjBodyPaste Handles MSG_META_CLIPBOARD_PASTE
INT GBInteralPaste Handles pasting into existing objects
INT GBExternalPaste Handles pasting to new objects
INT GBPasteText Handles pasting of TIF_TEXT format
INT GBPasteTextLow Handles pasting of TIF_TEXT format
INT GBPasteGString Paste TIF_GRAPHICS_STRING from clipboard
INT GBPasteGStringLow Paste object(s) from a any gstring type
INT GBPasteGrObjGString Paste all GrObj objects from a GrObj gstring
INT GBPasteGrObjGStringSingle Paste one GrObj object from GrObj gstring
INT GBPasteBitmap
INT GBCreateAttrGState Creates gstate with null clip region
GrObjBodyCopy Handles MSG_META_CLIPBOARD_COPY
INT GBCopyText Copy to TIF_TEXT format
INT GBCopyGStringToClipboard Copy to TIF_GRAPHICS_STRING format
REVISION HISTORY:
Name Date Description
---- ---- -----------
Steve 11/15/89 Initial revision
DESCRIPTION:
$Id: bodyCutCopyPaste.asm,v 1.1 97/04/04 18:08:07 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
|
test/Succeed/IdiomBrackets.agda | alhassy/agda | 3 | 3357 | <filename>test/Succeed/IdiomBrackets.agda
module _ where
open import Agda.Builtin.Nat
module Postulates where
infixl 5 _<*>_
postulate
F : Set → Set
pure : ∀ {A} → A → F A
_<*>_ : ∀ {A B} → F (A → B) → F A → F B
test₀ : F Nat → F Nat → F Nat
test₀ a b = (| a + b |)
test₁ : F Nat
test₁ = (| 5 |)
test₂ : F Nat → F Nat
test₂ a = (| suc a |)
test₃ : F Nat → F Nat
test₃ a = (| (_+ 5) a |)
-- Spaces are required! (Issue #2186)
test₄ : Nat → Nat
test₄ |n| = suc (|n| + |n|)
module Params {F : Set → Set}
(pure : ∀ {A} → A → F A)
(_<*>_ : ∀ {A B} → F (A → B) → F A → F B) where
test₀ : F Nat → F Nat → F Nat
test₀ a b = (| a + b |)
test₁ : F Nat
test₁ = (| 5 |)
test₂ : F Nat → F Nat
test₂ a = (| suc a |)
test₃ : F Nat → F Nat
test₃ a = (| (_+ 5) a |)
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_1587_1334.asm | ljhsiun2/medusa | 9 | 83593 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x19d5c, %rdi
nop
nop
nop
cmp $20692, %r13
movw $0x6162, (%rdi)
nop
nop
xor $12932, %r13
lea addresses_WT_ht+0x1ecec, %r12
nop
nop
sub %r9, %r9
movl $0x61626364, (%r12)
nop
nop
sub $36251, %r12
lea addresses_UC_ht+0x7cdc, %r13
nop
nop
xor %r9, %r9
mov $0x6162636465666768, %r11
movq %r11, (%r13)
nop
nop
nop
nop
nop
add $59788, %rax
lea addresses_D_ht+0x419c, %rsi
lea addresses_normal_ht+0x1afc, %rdi
nop
nop
add %r12, %r12
mov $83, %rcx
rep movsq
nop
add %r11, %r11
lea addresses_normal_ht+0x8d88, %rsi
nop
nop
nop
nop
sub $49917, %rax
mov (%rsi), %r13
nop
nop
add %rsi, %rsi
lea addresses_D_ht+0x9670, %r13
nop
nop
nop
nop
nop
add $52509, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, %xmm3
vmovups %ymm3, (%r13)
nop
nop
nop
nop
nop
sub $6714, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %rbx
push %rdi
push %rdx
// Faulty Load
lea addresses_PSE+0x1cedc, %r15
dec %rdx
mov (%r15), %di
lea oracles, %r8
and $0xff, %rdi
shlq $12, %rdi
mov (%r8,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rbx
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': True, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'33': 1587}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
oeis/157/A157092.asm | neoneye/loda-programs | 11 | 167593 | ; A157092: Consider all consecutive integer Pythagorean 9-tuples (X, X+1, X+2, X+3, X+4, Z-3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives X values.
; Submitted by <NAME>
; 0,36,680,12236,219600,3940596,70711160,1268860316,22768774560,408569081796,7331474697800,131557975478636,2360712083917680,42361259535039636,760141959546795800,13640194012307284796,244763350261984330560,4392100110703410665316,78813038642399407645160,1414242595452485926947596,25377553679502347277411600,455381723635589765066461236,8171493471761113423918890680,146631500768064451865473571036,2631195520353399020154605388000,47214887865593117910917423412996,847236786060322723376359016045960
mov $2,2
mov $3,1
lpb $0
sub $0,1
mov $1,$3
mul $1,16
add $2,$1
add $3,$2
lpe
mov $0,$3
sub $0,1
mul $0,2
|
source/asis/asis-clauses.adb | faelys/gela-asis | 4 | 20441 | <filename>source/asis/asis-clauses.adb
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
-- Purpose:
-- Procedural wrapper over Object-Oriented ASIS implementation
package body Asis.Clauses is
------------------
-- Clause_Names --
------------------
function Clause_Names
(Clause : in Asis.Element)
return Asis.Name_List
is
begin
Check_Nil_Element (Clause, "Clause_Names");
return Clause_Names (Clause.all);
end Clause_Names;
-------------------------------
-- Component_Clause_Position --
-------------------------------
function Component_Clause_Position
(Clause : in Asis.Component_Clause)
return Asis.Expression
is
begin
Check_Nil_Element (Clause, "Component_Clause_Position");
return Component_Clause_Position (Clause.all);
end Component_Clause_Position;
----------------------------
-- Component_Clause_Range --
----------------------------
function Component_Clause_Range
(Clause : in Asis.Component_Clause)
return Asis.Discrete_Range
is
begin
Check_Nil_Element (Clause, "Component_Clause_Range");
return Component_Clause_Range (Clause.all);
end Component_Clause_Range;
-----------------------
-- Component_Clauses --
-----------------------
function Component_Clauses
(Clause : in Asis.Representation_Clause;
Include_Pragmas : in Boolean := False)
return Asis.Component_Clause_List
is
begin
Check_Nil_Element (Clause, "Component_Clauses");
return Component_Clauses (Clause.all, Include_Pragmas);
end Component_Clauses;
---------------------------
-- Mod_Clause_Expression --
---------------------------
function Mod_Clause_Expression
(Clause : in Asis.Representation_Clause)
return Asis.Expression
is
begin
Check_Nil_Element (Clause, "Mod_Clause_Expression");
return Mod_Clause_Expression (Clause.all);
end Mod_Clause_Expression;
--------------------------------------
-- Representation_Clause_Expression --
--------------------------------------
function Representation_Clause_Expression
(Clause : in Asis.Representation_Clause)
return Asis.Expression
is
begin
Check_Nil_Element (Clause, "Representation_Clause_Expression");
return Representation_Clause_Expression (Clause.all);
end Representation_Clause_Expression;
--------------------------------
-- Representation_Clause_Name --
--------------------------------
function Representation_Clause_Name
(Clause : in Asis.Clause)
return Asis.Name
is
begin
Check_Nil_Element (Clause, "Representation_Clause_Name");
return Representation_Clause_Name (Clause.all);
end Representation_Clause_Name;
end Asis.Clauses;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the <NAME>, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
Task/Loops-Foreach/Ada/loops-foreach-2.ada | LaudateCorpus1/RosettaCodeData | 1 | 3430 | for Item of A loop
Put( Item );
end loop;
|
tests/src/tests-device-hid.ads | Fabien-Chouteau/usb_embedded | 14 | 6157 | package Tests.Device.HID is
pragma Elaborate_Body;
end Tests.Device.HID;
|
test/Fail/DuplicateFields.agda | hborum/agda | 3 | 2041 | <gh_stars>1-10
module DuplicateFields where
postulate X : Set
record D : Set where
field x : X
d : X -> X -> D
d x y = record {x = x; x = y}
|
LanguageServer/LarkLexer.g4 | kaby76/Domemtech.TrashBase | 1 | 2895 | lexer grammar LarkLexer;
channels { OFF_CHANNEL }
COLON: ':' ;
LC : '{' ;
RC : '}' ;
LP : '(' ;
RP : ')' ;
LB : '[' ;
RB : ']' ;
COMMA : ',' ;
DOT : '.' ;
ARROW : '->' ;
IGNORE : '%ignore' ;
IMPORT : '%import' ;
OVERRIDE : '%override' ;
DECLARE : '%declare' ;
DD : '..' ;
SQ : '~' ;
VBAR: NL? '|' ;
OP: [+*] | '?' ;
RULE: '!'? [_?]? [a-z] [_a-z0-9]* ;
TOKEN: '_'? [A-Z] [_A-Z0-9]* ;
STRING: FSTRING 'i'? ;
REGEXP: '/' ('\\' '/' | '\\' '\\' | ~'/' )*? '/' [imslux]* ;
NL: ('\r'? '\n')+ Space* ;
//
// Strings
//
fragment ESC: '\\' ('n' | 'r' | 't' | 'b' | 'f' | '"' | '\'' | '\\' | '>' | .);
fragment STRING_INNER: ~('\\' | '"');
fragment STRING_ESC_INNER: (ESC | STRING_INNER)* ;
fragment FSTRING : '"' STRING_ESC_INNER '"' ;
//
// Numbers
//
fragment DIGIT: '0' .. '9' ;
fragment HEXDIGIT: 'a' .. 'f' | 'A' .. 'F' | DIGIT ;
fragment INT: DIGIT+ ;
NUMBER: ('+' | '-')? INT ;
//
// Whitespace
//
WS_INLINE: (' ' | '\t')+ -> channel(OFF_CHANNEL) ;
COMMENT: Space* '//' (~'\n')* -> channel(OFF_CHANNEL) ;
fragment Space : (' '| '\t' | '\n' | '\r' | '\f' | 'u2B7F' ); |
toggle_airplay_receiver.applescript | ajslater/toggle_airplay_receiver | 0 | 4351 | <filename>toggle_airplay_receiver.applescript<gh_stars>0
#!/usr/bin/osascript
# Toggle airplay receiver on and off
# Scripting the GUI is a stopgap until I can figure out how to toggle that setting directly.
# Based on https://apple.stackexchange.com/questions/431846/toggle-airplay-receiver-server-with-the-command-line-on-macos-monteray/431876#431876
on run argv
if argv is {} then
tell me to error "Usage: toggle_airplay <on|off|toggle>"
end if
if item 1 of argv is equal to "off" then
set check to false
else if item 1 of argv is equal to "on" then
set check to true
else if item 1 of argv is equal to "toggle" then
set check to null
end if
tell application "System Preferences" to reveal pane id "com.apple.preferences.sharing"
tell application "System Events" to tell window 1 of application process "System Preferences"
repeat until exists checkbox 1 of (first row of table 1 of scroll area 1 of group 1 whose value of static text 1 is "AirPlay Receiver")
delay 0.1
end repeat
if check is null or (check is not value of checkbox 1 of (first row of table 1 of scroll area 1 of group 1 whose value of static text 1 is "AirPlay Receiver") as boolean) then
click checkbox 1 of (first row of table 1 of scroll area 1 of group 1 whose value of static text 1 is "AirPlay Receiver")
end if
end tell
tell application "System Preferences" to quit
end run
|
JavaAnalyzer/src/main/java/com/javaanalyzer/recognizer/JavaAnalyzer.g4 | ModelWriter/static-java | 0 | 5493 | grammar JavaAnalyzer;
input : line+;
line : (declaration | formula) (NEWLINE)?;
declaration : type VAR;
type : 'Class' | 'Interface' | 'Method' | 'Field' | ('Object')?;
formula : '(' formula ')' #PHARANTHESSEDFORMULA
| expression '=' expression #EQUAL
| expression 'in' expression #IN
| 'no' expression #NO
| 'some' expression #SOME
| 'one' expression #ONE
| 'lone' expression #LONE
| '!' formula #NOT
| formula '||' formula #OR
| formula '&&' formula #AND;
expression : VAR #VARIABLE
| '(' expression ')' #PHARANTHESSEDEXPRESSION
| expression '.' expression #JOIN
| '*' expression #REFLEXIVECLOSURE
| '^' expression #CLOSURE
| expression '+' expression #UNION
| expression '-' expression #DIFFERENCE
| expression '&' expression #INTERSECTION
| '~' expression #TRANSPOSE
;
fragment ALPHA : [a-zA-Z];
fragment ALPHANUMERIC : [a-zA-Z0-9];
WHITESPACE : (' ' | '\t')+ -> skip;
NEWLINE : ('\r'? '\n' | '\r')+ ;
VAR : ALPHA ((ALPHANUMERIC | '_')+)? ; |
source/nodes/program-nodes-number_declarations.adb | reznikmm/gela | 0 | 29409 | <gh_stars>0
-- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Program.Nodes.Number_Declarations is
function Create
(Names : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access;
Colon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Constant_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Assignment_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Expression : not null Program.Elements.Expressions
.Expression_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Number_Declaration is
begin
return Result : Number_Declaration :=
(Names => Names, Colon_Token => Colon_Token,
Constant_Token => Constant_Token,
Assignment_Token => Assignment_Token, Expression => Expression,
Semicolon_Token => Semicolon_Token, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Names : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access;
Expression : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Number_Declaration is
begin
return Result : Implicit_Number_Declaration :=
(Names => Names, Expression => Expression,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Names
(Self : Base_Number_Declaration)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access is
begin
return Self.Names;
end Names;
overriding function Expression
(Self : Base_Number_Declaration)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Expression;
end Expression;
overriding function Colon_Token
(Self : Number_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Colon_Token;
end Colon_Token;
overriding function Constant_Token
(Self : Number_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Constant_Token;
end Constant_Token;
overriding function Assignment_Token
(Self : Number_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Assignment_Token;
end Assignment_Token;
overriding function Semicolon_Token
(Self : Number_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Number_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Number_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Number_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : in out Base_Number_Declaration'Class) is
begin
for Item in Self.Names.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
Set_Enclosing_Element (Self.Expression, Self'Unchecked_Access);
null;
end Initialize;
overriding function Is_Number_Declaration
(Self : Base_Number_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Number_Declaration;
overriding function Is_Declaration
(Self : Base_Number_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Declaration;
overriding procedure Visit
(Self : not null access Base_Number_Declaration;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Number_Declaration (Self);
end Visit;
overriding function To_Number_Declaration_Text
(Self : in out Number_Declaration)
return Program.Elements.Number_Declarations
.Number_Declaration_Text_Access is
begin
return Self'Unchecked_Access;
end To_Number_Declaration_Text;
overriding function To_Number_Declaration_Text
(Self : in out Implicit_Number_Declaration)
return Program.Elements.Number_Declarations
.Number_Declaration_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Number_Declaration_Text;
end Program.Nodes.Number_Declarations;
|
agda-stdlib/src/Data/Refinement.agda | DreamLinuxer/popl21-artifact | 5 | 3023 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Refinement type: a value together with an erased proof.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Refinement where
open import Level
open import Data.Erased as Erased using (Erased)
open import Function.Base
open import Relation.Unary
private
variable
a b p q : Level
A : Set a
B : Set b
record Refinement {a p} (A : Set a) (P : A → Set p) : Set (a ⊔ p) where
constructor _,_
field value : A
proof : Erased (P value)
open Refinement public
-- The syntax declaration below is meant to mimick set comprehension.
-- It is attached to Refinement-syntax, to make it easy to import
-- Data.Refinement without the special syntax.
infix 2 Refinement-syntax
Refinement-syntax = Refinement
syntax Refinement-syntax A (λ x → P) = [ x ∈ A ∣ P ]
module _ {P : A → Set p} {Q : B → Set q} where
map : (f : A → B) → ∀[ P ⇒ f ⊢ Q ] →
[ a ∈ A ∣ P a ] → [ b ∈ B ∣ Q b ]
map f prf (a , p) = f a , Erased.map prf p
module _ {P : A → Set p} {Q : A → Set q} where
refine : ∀[ P ⇒ Q ] → [ a ∈ A ∣ P a ] → [ a ∈ A ∣ Q a ]
refine = map id
|
projects/05/test.asm | dragonator/nand2tetris | 0 | 242367 | @100
D=M
|
oeis/301/A301775.asm | neoneye/loda-programs | 11 | 166129 | <reponame>neoneye/loda-programs
; A301775: Number of odd chordless cycles in the (2n+1)-web graph.
; Submitted by <NAME>(s2)
; 0,12,30,74,200,522,1362,3572,9350,24474,64080,167762,439202,1149852,3010350,7881194,20633240,54018522,141422322,370248452,969323030,2537720634,6643838880,17393796002,45537549122,119218851372,312119004990,817138163594,2139295485800,5600748293802,14662949395602,38388099893012,100501350283430,263115950957274,688846502588400,1803423556807922,4721424167835362,12360848946698172,32361122672259150,84722519070079274,221806434537978680,580696784543856762,1520283919093591602,3980154972736918052
lpb $0
mov $2,$0
min $0,$3
seq $2,301774 ; Number of chordless cycles in the (2n+1)-prism graph.
lpe
mov $0,$2
|
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_98_338.asm | ljhsiun2/medusa | 9 | 161101 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r9
push %rcx
push %rdi
push %rsi
// Store
lea addresses_RW+0x1cc02, %rdi
nop
nop
nop
nop
cmp $48464, %r9
movl $0x51525354, (%rdi)
nop
nop
nop
nop
cmp $61856, %rdi
// Load
lea addresses_normal+0x18882, %rsi
nop
nop
nop
nop
nop
and %r11, %r11
mov (%rsi), %ecx
nop
nop
nop
sub %rdi, %rdi
// Store
lea addresses_normal+0x18882, %r9
nop
nop
nop
and %rcx, %rcx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm5
vmovups %ymm5, (%r9)
nop
nop
nop
dec %rsi
// Store
lea addresses_UC+0x163c2, %r11
xor $15590, %rcx
mov $0x5152535455565758, %r9
movq %r9, (%r11)
nop
nop
nop
nop
nop
sub %r13, %r13
// Faulty Load
lea addresses_normal+0x18882, %r9
nop
nop
and $40347, %rdi
movb (%r9), %r13b
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}}
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_UC', 'size': 8, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'58': 98}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
cellular.adb | MicroJoe/cellular | 0 | 6832 | with Ada.Text_IO; use Ada.Text_IO;
package body Cellular is
procedure Generate(Previous : in out CellularArray) is
Generator : Boolean_Random.Generator;
begin
Reset(Generator);
for I in Previous'Range loop
Previous(I) := Random(Generator);
end loop;
end Generate;
function "="(Left, Right : in CellularArray) return Boolean is
begin
if Left'Size /= Right'Size then
return False;
end if;
for I in Left'Range loop
if Left(I) /= Right(I) then
return False;
end if;
end loop;
return True;
end;
function NextStep(Left, Cell, Right : in Boolean) return Boolean is
begin
return (not Left and (Cell or Right)) or
(Left and not Cell and not Right);
end NextStep;
function NextArray(Previous : in CellularArray) return CellularArray is
Result : CellularArray(Previous'Range) := (
Others => False
);
begin
for I in Previous'Range loop
if I > Previous'First and I < Previous'Last then
Result(I) := NextStep(Previous(I-1), Previous(I), Previous(I+1));
else
Result(I) := Previous(I);
end if;
end loop;
return Result;
end NextArray;
procedure Put(Line : in CellularArray) is
begin
for I in Line'Range loop
if Line(I) then
Put("@");
else
Put(".");
end if;
end loop;
end Put;
end Cellular;
|
src/jkw_lc3/os.asm | jikaiwen/lc3-sti-and-os | 0 | 160927 | <gh_stars>0
.ORIG x200
;GLOBAL INITIALIZE
AND R0,R0,#0
ADD R0,R0,#1
LEA R1,TRAPFILE
TRAP x0
ST R2,INIT_TRAP
AND R0,R0,#0
ADD R0,R0,#1
LEA R1,INTFILE
TRAP x0
ST R2,INIT_INT
LD R0,INIT_TRAP
JSRR R0
LD R0,INIT_INT
JSRR R0
BRnzp OS_START
TRAPFILE .STRINGZ "_trapvec.obj"
INTFILE .STRINGZ "_intvec.obj"
INIT_TRAP
.BLKW 1
INIT_INT
.BLKW 1
; reading letters and print them
SRUNPROG .STRINGZ "run"
SCLSC .STRINGZ "cls"
STOHALT .STRINGZ "halt"
SUNKNOWN .STRINGZ "unknown command! input again!\n"
.FILL 0
SHALTSTR .STRINGZ "Exit OS! Thank you~\n"
OS_START
JSR READ_STR
LEA R1,SRUNPROG
JSR STRCMP
ADD R2,R2,#0
BRz RUN_PROG
LEA R1,SCLSC
JSR STRCMP
ADD R2,R2,#0
BRz PCLS
LEA R1,STOHALT
JSR STRCMP
ADD R2,R2,#0
BRz PHALT
LEA R0,SUNKNOWN
TRAP x22
BRnzp OS_START
RUN_PROG
AND R0,R0,#0
ADD R0,R0,#4
LD R1,PSR
TRAP x0
LEA R1,OS_START
TRAP x0
JSR READ_STR
ADD R1,R0,#0
AND R0,R0,#0
ADD R0,R0,#1
TRAP x0
; NOW R2
ADD R2,R2,#0
BRz OS_START
AND R0,R0,#0
ADD R0,R0,#4
LD R1,USER_PSR
TRAP x0
ADD R1,R2,#0
TRAP x0
RTI
PCLS AND R0,R0,#0
ADD R0,R0,#3
TRAP x0
BRnzp OS_START
PHALT LEA R0,SHALTSTR
TRAP x22
LD R0,CLOCKVAL
STI R0,CLOCK
BRnzp PHALT
CLOCKVAL .FILL x7FFF
CLOCK .FILL xFFFE
PSR .FILL x0002
USER_PSR .FILL x8002
;;;;;;;;;;;;;;;;;;;;;;;;;;;
STRCMP_R0 .BLKW 1
STRCMP_R1 .BLKW 1
STRCMP_R3 .BLKW 1
STRCMP ST R0,STRCMP_R0
ST R1,STRCMP_R1
ST R3,STRCMP_R3
CMP_NEXT
LDR R2,R0,#0
LDR R3,R1,#0
NOT R3,R3
ADD R3,R3,#1
ADD R2,R2,R3
BRnp NOT_EQUAL
LDR R2,R0,#0
ADD R2,R2,#0
BRz END_EQUAL
ADD R0,R0,#1
ADD R1,R1,#1
BRnzp CMP_NEXT
NOT_EQUAL
LD R0,STRCMP_R0
LD R1,STRCMP_R1
LD R3,STRCMP_R3
AND R2,R2,#0
ADD R2,R2,#1
RET
END_EQUAL
LD R0,STRCMP_R0
LD R1,STRCMP_R1
LD R3,STRCMP_R3
AND R2,R2,#0
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;
RSTR_R1 .BLKW 1
RSTR_R2 .BLKW 1
RSTR_R3 .BLKW 1
RSTR_R7 .BLKW 1
READ_STR
ST R1,RSTR_R1
ST R2,RSTR_R2
ST R3,RSTR_R3
ST R7,RSTR_R7
AND R1,R1,#0
ST R1,BUFFID
LEA R3,BUFFER
RSTR_AGAIN
GETC
ADD R1,R0,#0
ADD R1,R1,#-10
BRz IS_ENTER
ADD R1,R0,#0
ADD R1,R1,#-8
BRz IS_BACK
PUTC
LD R2,BUFFID
ADD R2,R3,R2
STR R0,R2,#0
LD R2,BUFFID
ADD R2,R2,#1
ST R2,BUFFID
BRnzp RSTR_AGAIN
IS_ENTER:
PUTC
LD R2,BUFFID
;ADD R2,R2,#1
ADD R2,R3,R2
AND R0,R0,#0
STR R0,R2,#0
LEA R0,BUFFER
LD R1,RSTR_R1
LD R2,RSTR_R2
LD R3,RSTR_R3
LD R7,RSTR_R7
RET
IS_BACK:
LD R2,BUFFID
ADD R2,R2,#0
BRnz CANTBACK
PUTC
ADD R2,R2,#-1
ST R2,BUFFID
CANTBACK
BRnzp RSTR_AGAIN
BUFFID .FILL x0
BUFFER .BLKW #100
.END |
test/Succeed/Issue2831.agda | cruhland/agda | 1,989 | 12538 | -- Andreas, 2017-11-01, issue #2831
-- The following pragma should trigger a warning, since the mutual block
-- does not contain anything the pragma could apply to.
{-# NO_POSITIVITY_CHECK #-}
mutual
postulate
A : Set
-- EXPECTED WARNING:
-- No positivity checking pragmas can only precede a data/record
-- definition or a mutual block (that contains a data/record
-- definition).
|
src/Equality/Path/Isomorphisms/Univalence.agda | nad/equality | 3 | 17329 | ------------------------------------------------------------------------
-- A proof of univalence for an arbitrary "equality with J"
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
import Equality.Path as P
module Equality.Path.Isomorphisms.Univalence
{e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) where
open P.Derived-definitions-and-properties eq
import Equality.Path.Univalence as PU
open import Prelude
open import Equivalence equality-with-J
open import Univalence-axiom equality-with-J
open import Equality.Path.Isomorphisms eq
private
variable
ℓ : Level
-- Univalence.
univ : Univalence ℓ
univ = _≃_.from Univalence≃Univalence PU.univ
-- A variant of univ that does not compute at compile-time.
abstract
abstract-univ : Univalence ℓ
abstract-univ = univ
-- Propositional extensionality.
prop-ext : Propositional-extensionality ℓ
prop-ext =
_≃_.from
(Propositional-extensionality-is-univalence-for-propositions ext)
(λ _ _ → univ)
|
programs/oeis/067/A067725.asm | karttu/loda | 1 | 241592 | <gh_stars>1-10
; A067725: a(n) = 3*n^2 + 6*n.
; 0,9,24,45,72,105,144,189,240,297,360,429,504,585,672,765,864,969,1080,1197,1320,1449,1584,1725,1872,2025,2184,2349,2520,2697,2880,3069,3264,3465,3672,3885,4104,4329,4560,4797,5040,5289,5544,5805,6072,6345,6624,6909,7200,7497,7800,8109,8424,8745,9072,9405,9744,10089,10440,10797,11160,11529,11904,12285,12672,13065,13464,13869,14280,14697,15120,15549,15984,16425,16872,17325,17784,18249,18720,19197,19680,20169,20664,21165,21672,22185,22704,23229,23760,24297,24840,25389,25944,26505,27072,27645,28224,28809,29400,29997,30600,31209,31824,32445,33072,33705,34344,34989,35640,36297,36960,37629,38304,38985,39672,40365,41064,41769,42480,43197,43920,44649,45384,46125,46872,47625,48384,49149,49920,50697,51480,52269,53064,53865,54672,55485,56304,57129,57960,58797,59640,60489,61344,62205,63072,63945,64824,65709,66600,67497,68400,69309,70224,71145,72072,73005,73944,74889,75840,76797,77760,78729,79704,80685,81672,82665,83664,84669,85680,86697,87720,88749,89784,90825,91872,92925,93984,95049,96120,97197,98280,99369,100464,101565,102672,103785,104904,106029,107160,108297,109440,110589,111744,112905,114072,115245,116424,117609,118800,119997,121200,122409,123624,124845,126072,127305,128544,129789,131040,132297,133560,134829,136104,137385,138672,139965,141264,142569,143880,145197,146520,147849,149184,150525,151872,153225,154584,155949,157320,158697,160080,161469,162864,164265,165672,167085,168504,169929,171360,172797,174240,175689,177144,178605,180072,181545,183024,184509,186000,187497
mov $1,2
add $1,$0
mul $1,$0
mul $1,3
|
src/Fragment/Examples/Semigroup/Arith/Functions.agda | yallop/agda-fragment | 18 | 11903 | {-# OPTIONS --without-K --safe #-}
module Fragment.Examples.Semigroup.Arith.Functions where
open import Fragment.Examples.Semigroup.Arith.Base
-- Fully dynamic associativity
+-dyn-assoc₁ : ∀ {f : ℕ → ℕ} {m n o} → (f m + n) + o ≡ f m + (n + o)
+-dyn-assoc₁ = fragment SemigroupFrex +-semigroup
+-dyn-assoc₂ : ∀ {f g : ℕ → ℕ} {m n o p} → ((f m + n) + o) + g p ≡ f m + (n + (o + g p))
+-dyn-assoc₂ = fragment SemigroupFrex +-semigroup
+-dyn-assoc₃ : ∀ {f g h : ℕ → ℕ} {m n o p q} → (f m + n) + g o + (p + h q) ≡ f m + (n + g o + p) + h q
+-dyn-assoc₃ = fragment SemigroupFrex +-semigroup
*-dyn-assoc₁ : ∀ {f : ℕ → ℕ} {m n o} → (f m * n) * o ≡ f m * (n * o)
*-dyn-assoc₁ = fragment SemigroupFrex *-semigroup
*-dyn-assoc₂ : ∀ {f g : ℕ → ℕ} {m n o p} → ((f m * n) * o) * g p ≡ f m * (n * (o * g p))
*-dyn-assoc₂ = fragment SemigroupFrex *-semigroup
*-dyn-assoc₃ : ∀ {f g h : ℕ → ℕ} {m n o p q} → (f m * n) * g o * (p * h q) ≡ f m * (n * g o * p) * h q
*-dyn-assoc₃ = fragment SemigroupFrex *-semigroup
-- Partially static associativity
+-sta-assoc₁ : ∀ {f : ℕ → ℕ} {m} → (m + 2) + (3 + f 0) ≡ m + (5 + f 0)
+-sta-assoc₁ = fragment SemigroupFrex +-semigroup
+-sta-assoc₂ : ∀ {f g : ℕ → ℕ} {m n o p} → (((f m + g n) + 5) + o) + p ≡ f m + (g n + (2 + (3 + (o + p))))
+-sta-assoc₂ = fragment SemigroupFrex +-semigroup
+-sta-assoc₃ : ∀ {f : ℕ → ℕ} {m n o p} → f (n + m) + (n + 2) + (3 + (o + p)) ≡ f (n + m) + (((n + 1) + (4 + o)) + p)
+-sta-assoc₃ = fragment SemigroupFrex +-semigroup
*-sta-assoc₁ : ∀ {f : ℕ → ℕ} {m} → (m * 2) * (3 * f 0) ≡ m * (6 * f 0)
*-sta-assoc₁ = fragment SemigroupFrex *-semigroup
*-sta-assoc₂ : ∀ {f g : ℕ → ℕ} {m n o p} → (((f m * g n) * 6) * o) * p ≡ f m * (g n * (2 * (3 * (o * p))))
*-sta-assoc₂ = fragment SemigroupFrex *-semigroup
*-sta-assoc₃ : ∀ {f : ℕ → ℕ} {m n o p} → f (n + m) * (n * 4) * (3 * (o * p)) ≡ f (n + m) * (((n * 2) * (6 * o)) * p)
*-sta-assoc₃ = fragment SemigroupFrex *-semigroup
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_1463.asm | ljhsiun2/medusa | 9 | 101732 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x165ae, %rdx
nop
add %r12, %r12
vmovups (%rdx), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r9
nop
sub %r10, %r10
lea addresses_D_ht+0x49ae, %r13
nop
mfence
mov (%r13), %di
nop
add %r10, %r10
lea addresses_D_ht+0xf6a, %r9
nop
nop
cmp $32199, %rsi
mov (%r9), %r13d
nop
nop
nop
nop
xor $20509, %r13
lea addresses_D_ht+0x552e, %rsi
lea addresses_WC_ht+0x3d42, %rdi
nop
add %r9, %r9
mov $14, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $16769, %rdi
lea addresses_D_ht+0x1a1ae, %r12
nop
nop
nop
inc %r10
movw $0x6162, (%r12)
xor %r12, %r12
lea addresses_WC_ht+0x1b96c, %r9
nop
nop
nop
add $22828, %r13
movl $0x61626364, (%r9)
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_normal_ht+0x1c1ae, %r12
nop
nop
nop
nop
xor %r13, %r13
mov (%r12), %r9d
nop
nop
nop
nop
add %rdx, %rdx
lea addresses_WT_ht+0x5dae, %r10
nop
add $43242, %rdi
movb (%r10), %r12b
nop
nop
nop
nop
nop
sub %r9, %r9
lea addresses_WT_ht+0x52ee, %r10
nop
nop
nop
and %rdx, %rdx
movb (%r10), %r13b
add %r12, %r12
lea addresses_WC_ht+0x4a6e, %rsi
lea addresses_normal_ht+0xe5ae, %rdi
nop
xor %r12, %r12
mov $50, %rcx
rep movsl
nop
nop
nop
add $64404, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r8
push %r9
push %rdi
push %rsi
// Store
lea addresses_WC+0xb8ae, %r8
nop
nop
nop
nop
add $53969, %rdi
movl $0x51525354, (%r8)
nop
nop
nop
add %r13, %r13
// Faulty Load
lea addresses_RW+0x191ae, %r8
nop
nop
nop
nop
and %rsi, %rsi
movb (%r8), %r9b
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rsi
pop %rdi
pop %r9
pop %r8
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 7, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/英語_PAL/pal_asm/zel_data0.asm | prismotizm/gigaleak | 0 | 100855 | <filename>other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/英語_PAL/pal_asm/zel_data0.asm
Name: zel_data0.asm
Type: file
Size: 136369
Last-Modified: '2016-05-13T04:25:37Z'
SHA-1: EF70AE68D593B6B0697A488FA4D842CE8D75715E
Description: null
|
oeis/163/A163413.asm | neoneye/loda-programs | 11 | 80320 | <reponame>neoneye/loda-programs
; A163413: a(n) = 14*a(n-1) - 47*a(n-2) for n > 1; a(0) = 1, a(1) = 11.
; Submitted by <NAME>
; 1,11,107,981,8705,75763,651547,5560797,47228449,399840827,3378034475,28499963781,240231872609,2023747918819,17041572850843,143465867727309,1207568224192705,10163059355514347,85527124440143723,719715952452837813,6056248485652974401,50960829033858264403,428807927648325904795,3608152022485224240189,30360155715321821837281,255459034957699966433051,2149499170787673903710507,18086413748015536229593701,152183331445196833739917985,1280505194076025469567947843,10774456139140105388175124507
mov $1,1
mov $3,3
lpb $0
sub $0,1
mov $2,$3
mul $3,6
add $3,$1
mul $1,8
add $1,$2
lpe
add $0,$1
|
test/interaction/Issue902.agda | shlevy/agda | 1,989 | 5831 | <reponame>shlevy/agda
-- Reported and fixed by <NAME>.
module Issue902 where
module M (A : Set) where
postulate
A : Set
F : Set -> Set
test : A
test = {! let module m = M (F A) in ? !}
-- C-c C-r gives let module m = M F A in ?
-- instead of let module m = M (F A) in ?
|
alloy4fun_models/trainstlt/models/3/6AmNRS3gRx9GHCfqj.als | Kaixi26/org.alloytools.alloy | 0 | 4935 | open main
pred id6AmNRS3gRx9GHCfqj_prop4 {
all t1, t2 : Train | always t1.pos' != t2.pos'
}
pred __repair { id6AmNRS3gRx9GHCfqj_prop4 }
check __repair { id6AmNRS3gRx9GHCfqj_prop4 <=> prop4o } |
SiriRemote/AppleRemote_MICROPHONE.applescript | guileschool/SiriRemoteBTT | 20 | 3203 | <filename>SiriRemote/AppleRemote_MICROPHONE.applescript
(*
The MIT License (MIT)
Copyright (c) 2015 guileschool
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
http://github.com/guileschool/SiriRemoteBTT
*)
-- mute on/off
try
tell application "System Events"
if exists process "iTunes" then
tell application "iTunes"
set state to get mute
if state is true then
set mute to false
else
set mute to true
end if
return state
end tell
end if
end tell
on error
end try
|
generated/natools-static_maps-web-error_pages-t.adb | faelys/natools-web | 1 | 558 | <reponame>faelys/natools-web
-- Generated at 2015-02-03 21:39:53 +0000 by Natools.Static_Hash_Maps
-- from src/natools-web-error_pages-maps.sx
with Natools.Static_Maps.Web.Error_Pages.Commands;
with Natools.Static_Maps.Web.Error_Pages.Messages;
function Natools.Static_Maps.Web.Error_Pages.T
return Boolean is
begin
for I in Map_1_Keys'Range loop
if Natools.Static_Maps.Web.Error_Pages.Commands.Hash
(Map_1_Keys (I).all) /= I
then
return False;
end if;
end loop;
for I in Map_2_Keys'Range loop
if Natools.Static_Maps.Web.Error_Pages.Messages.Hash
(Map_2_Keys (I).all) /= I
then
return False;
end if;
end loop;
return True;
end Natools.Static_Maps.Web.Error_Pages.T;
|
gyak/gyak3/szummazas.adb | balintsoos/LearnAda | 0 | 27708 | with Ada.Text_IO;
use Ada.Text_IO;
procedure Szummazas is
type Index is new Integer;
type Elem is new Integer;
type Tomb is array (Index range <>) of Elem;
function Szumma ( T: Tomb ) return Elem is
S: Elem := 0;
begin
for I in T'Range loop
S := S + T(I);
end loop;
return S;
end Szumma;
begin
Put_Line( Elem'Image( Szumma((3,2,5,7,1)) ) );
end Szummazas;
|
bin/tests/kefen/include/const.asm | pvaret/goholint | 1 | 163408 | ; Useful RGBDS constants.
GBC_UNSUPPORTED EQU $00
GBC_COMPATIBLE EQU $80
GBC_EXCLUSIVE EQU $C0
SGB_UNSUPPORTED EQU $00
SGB_SUPPORTED EQU $03
CART_ROM_ONLY EQU $00
CART_MBC1 EQU $01
CART_MBC1_RAM EQU $02
CART_MBC1_RAM_BATTERY EQU $03
CART_MBC2 EQU $05
CART_MBC2_BATTERY EQU $06
CART_ROM_RAM EQU $08
CART_ROM_RAM_BATTERY EQU $09
CART_MMM01 EQU $0B
CART_MMM01_RAM EQU $0C
CART_MMM01_RAM_BATTERY EQU $0D
CART_MBC3_TIMER_BATTERY EQU $0F
CART_MBC3_TIMER_RAM_BATTERY EQU $10
CART_MBC3 EQU $11
CART_MBC3_RAM EQU $12
CART_MBC3_RAM_BATTERY EQU $13
CART_MBC4 EQU $15
CART_MBC4_RAM EQU $16
CART_MBC4_RAM_BATTERY EQU $17
CART_MBC5 EQU $19
CART_MBC5_RAM EQU $1A
CART_MBC5_RAM_BATTERY EQU $1B
CART_MBC5_RUMBLE EQU $1C
CART_MBC5_RUMBLE_RAM EQU $1D
CART_MBC5_RUMBLE_RAM_BATTERY EQU $1E
CART_POCKET_CAMERA EQU $FC
CART_BANDAI_TAMA5 EQU $FD
CART_HUC3 EQU $FE
CART_HUC1_RAM_BATTERY EQU $FF
ROM_32K EQU $00
ROM_64K EQU $01
ROM_128K EQU $02
ROM_256K EQU $03
ROM_512K EQU $04
ROM_1024K EQU $05
ROM_2048K EQU $06
ROM_4096K EQU $07
ROM_1152K EQU $52
ROM_1280K EQU $53
ROM_1536K EQU $54
RAM_NONE EQU $00
RAM_2K EQU $01
RAM_8K EQU $02
RAM_32K EQU $03
DEST_JAPAN EQU $00
DEST_INTERNATIONAL EQU $01 |
oeis/228/A228245.asm | neoneye/loda-programs | 11 | 161821 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A228245: The integers occurring in the song "Ten green bottles".
; Submitted by <NAME>
; 10,10,1,9,9,1,8,8,1,7,7,1,6,6,1,5,5,1,4,4,1,3,3,1,2,2,1,1,1,1,0
add $0,1
lpb $0
div $0,3
mov $1,9
sub $1,$0
mul $0,3
lpe
mov $0,$1
add $0,1
|
Kernel/asm/inforeg.asm | mlombardia/arqui_tpe | 1 | 24814 | GLOBAL _inforeg
EXTERN printString, printHex, newLine
section .data
info db "Register values:",0
srax db "RAX = " ,0
srbx db "RBX = " ,0
srcx db "RCX = " ,0
srdx db "RDX = " ,0
srbp db "RBP = " ,0
srsi db "RSI = " ,0
srdi db "RDI = " ,0
srsp db "RSP = " ,0
sr8 db "R8 = " ,0
sr9 db "R9 = " ,0
sr10 db "R10 = " ,0
sr12 db "R12 = " ,0
sr13 db "R13 = " ,0
sr14 db "R14 = " ,0
sr11 db "R11 = " ,0
sr15 db "R15 = " ,0
srip db "RIP = " ,0
section .text
%macro pushState 0
push rax
push rbx
push rcx
push rdx
push rbp
push rdi
push rsi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
%endmacro
%macro popState 0
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rsi
pop rdi
pop rbp
pop rdx
pop rcx
pop rbx
pop rax
%endmacro
%macro printRegister 2
pushState
mov rdi, %1
mov rsi, 0xFFFFFF
call printString
mov rdi, %2
call printHex
call newLine
popState
%endmacro
_inforeg:
; Info message
pushState
call newLine
mov rdi, info
mov rsi, 0xFFFFFF
call printString
call newLine
popState
pushState
printRegister srax, rax
printRegister srbx, rbx
printRegister srcx, rcx
printRegister srdx, rdx
printRegister srbp, rbp
printRegister srsi, rsi
printRegister srdi, rdi
printRegister srsp, rsp
printRegister sr8 , r8
printRegister sr9 , r9
printRegister sr10, r10
printRegister sr11, r11
printRegister sr12, r12
printRegister sr13, r13
printRegister sr14, r14
printRegister sr15, r15
popState
ret
|
alloy4fun_models/trashltl/models/4/dZ67sNvryjEbuC27v.als | Kaixi26/org.alloytools.alloy | 0 | 1789 | <filename>alloy4fun_models/trashltl/models/4/dZ67sNvryjEbuC27v.als
open main
pred iddZ67sNvryjEbuC27v_prop5 {
some f:File | eventually Trash' = Trash + f
}
pred __repair { iddZ67sNvryjEbuC27v_prop5 }
check __repair { iddZ67sNvryjEbuC27v_prop5 <=> prop5o } |
src/notcurses-direct.ads | JeremyGrosser/notcursesada | 5 | 10445 | --
-- Copyright 2021 (C) <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: Apache-2.0
--
with Notcurses.Channel; use Notcurses.Channel;
with Notcurses_Direct_Thin;
package Notcurses.Direct is
type Notcurses_Direct is private;
procedure Initialize
(This : out Notcurses_Direct;
Terminal_Type : String := "");
procedure Set_Cursor_Enabled
(This : Notcurses_Direct;
Enabled : Boolean);
function Dimensions
(This : Notcurses_Direct)
return Coordinate;
procedure Put
(This : Notcurses_Direct;
Str : Wide_Wide_String;
Foreground : Notcurses_Channel :=
(Not_Default => False, others => <>);
Background : Notcurses_Channel :=
(Not_Default => False, others => <>));
procedure New_Line
(This : Notcurses_Direct);
procedure Set_Background_RGB
(This : Notcurses_Direct;
R, G, B : Color_Type);
procedure Set_Foreground_RGB
(This : Notcurses_Direct;
R, G, B : Color_Type);
procedure Stop
(This : in out Notcurses_Direct);
private
package Direct_Thin renames Notcurses_Direct_Thin;
type Notcurses_Direct is access all Direct_Thin.ncdirect;
end Notcurses.Direct;
|
MicroProcessor Lab Programs/2b.asm | MyCollegeForums/4thSemISE | 0 | 4406 | <reponame>MyCollegeForums/4thSemISE
assume cs:code, ds:data
data segment
pa equ 20a0h
pb equ 20a1h
pc equ 20a2h
cr equ 20a3h
data ends
code segment
start:
mov ax,data
mov ds,ax
mov dx,cr
mov al,82h
out dx,al
mov al,01
rpt:
mov dx,pa
out dx,al
call delay
ror al,1
push ax
mov ah,06h
mov dl,0ffh
int 21h
pop ax
jz rpt
mov ah,4ch
int 21h
delay proc
mov si,02fffh
l2: mov di,066ffh
l1: dec di
jnz l1
dec si
jnz l2
ret
delay endp
code ends
end start
|
ada-9-loop/abcdefghppp.adb | jackhftang/ABCDEFGHPPP | 51 | 2088 | <filename>ada-9-loop/abcdefghppp.adb
with Ada.Text_IO;
with Ada.Strings.Unbounded;
procedure abcdefghppp is
procedure output_string(A,B,C,D,E,F,G,H,P: Integer) is
begin
Ada.Text_IO.Put_Line(
Integer'image(A*10+B) & "-" &
Integer'image(C*10+D) & "=" &
Integer'image(E*10+F) & ", " &
Integer'image(E*10+F) & "-" &
Integer'image(G*10+H) & "=" &
Integer'image(P*111));
end output_string;
begin
for A in Integer range 1..9 loop
for B in Integer range 0..9 loop
for C in Integer range 1..9 loop
for D in Integer range 0..9 loop
for E in Integer range 1..9 loop
for F in Integer range 0..9 loop
for G in Integer range 1..9 loop
for H in Integer range 0..9 loop
for P in Integer range 1..9 loop
if (A/=B) and (A/=C) and (A/=D) and (A/=E) and (A/=F) and (A/=G) and (A/=H) and (A/=P)
and (B/=C) and (B/=D) and (B/=E) and (B/=F) and (B/=G) and (B/=H) and (B/=P)
and (C/=D) and (C/=E) and (C/=F) and (C/=G) and (C/=H) and (C/=P)
and (D/=E) and (D/=F) and (D/=G) and (D/=H) and (D/=P)
and (E/=F) and (E/=G) and (E/=H) and (E/=P)
and (F/=G) and (F/=H) and (F/=P)
and (G/=H) and (G/=P)
and (H/=P)
and ((A*10+B) - (C*10+D) = (E*10+F)) and ((E*10+F) + (G*10+H) = P*111) then
output_string(A,B,C,D,E,F,G,H,P);
end if;
end loop;
end loop;
end loop;
end loop;
end loop;
end loop ;
end loop ;
end loop ;
end loop ;
end abcdefghppp;
|
Ada/producerconsumer.adb | UdayanSinha/Code_Blocks | 3 | 1002 | <filename>Ada/producerconsumer.adb
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Real_Time;
use Ada.Real_Time;
with Ada.Numerics.Discrete_Random;
with semaphores;
use semaphores;
procedure ProducerConsumer is
X : Integer; -- Shared Variable
N : constant Integer := 40; -- Number of produced and comsumed variables
pragma Volatile(X); -- For a volatile object all reads and updates of
-- the object as a whole are performed directly
-- to memory (Ada Reference Manual, C.6)
-- Random Delays
subtype Delay_Interval is Integer range 50..250;
package Random_Delay is new Ada.Numerics.Discrete_Random (Delay_Interval);
use Random_Delay;
G : Generator;
SemWrite : CountingSemaphore(1, 1); --semaphore for producer
SemRead: CountingSemaphore(1, 0); --semaphore for consumer
task Producer;
task Consumer;
task body Producer is
Next : Time;
begin
Next := Clock;
for I in 1..N loop
-- Write to X
SemWrite.Wait; --SemPend()
X := I;
-- Next 'Release' in 50..250ms
Next := Next + Milliseconds(Random(G));
SemRead.Signal; --SemPost()
delay until Next;
end loop;
end;
task body Consumer is
begin
for I in 1..N loop
-- Read from X
SemRead.Wait; --SemPend()
Put_Line(Integer'Image(X));
SemWrite.Signal; --SemPost()
end loop;
end;
begin -- main task
null;
end ProducerConsumer;
|
deBruijn/Substitution/Data/Basics.agda | nad/dependently-typed-syntax | 5 | 3557 | <gh_stars>1-10
------------------------------------------------------------------------
-- Parallel substitutions (defined using an inductive family)
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Substitution.Data.Basics
{i u e} {Uni : IndexedUniverse i u e} where
import deBruijn.Context; open deBruijn.Context Uni
open import Function using (id; _∘_; _$_)
open import Level using (_⊔_)
open import Relation.Binary.PropositionalEquality as P using (_≡_)
private
module Dummy₁ {t} (T : Term-like t) where
open Term-like T
infixl 5 _▻_
-- Substitutions, represented as sequences of terms.
data Sub : ∀ {Γ Δ} → Γ ⇨̂ Δ → Set (i ⊔ u ⊔ e ⊔ t) where
ε : ∀ {Δ} → Sub ε̂[ Δ ]
_▻_ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ}
(ρ : Sub ρ̂) (t : Δ ⊢ σ /̂ ρ̂) → Sub (ρ̂ ▻̂[ σ ] ⟦ t ⟧)
-- A sequence of matching substitutions. (The reflexive transitive
-- closure of Sub.)
data Subs {Γ} : ∀ {Δ} → Γ ⇨̂ Δ → Set (i ⊔ u ⊔ e ⊔ t) where
ε : Subs îd[ Γ ]
_▻_ : ∀ {Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε}
(ρs : Subs ρ̂₁) (ρ : Sub ρ̂₂) → Subs (ρ̂₁ ∘̂ ρ̂₂)
open Dummy₁ public
-- Originally these substitutions were defined without the context
-- morphism index, but this led to the need to prove lots of lemmas
-- which hold by definition in the current setting. As an example the
-- map function (in deBruijn.Substitution.Data.Map) is currently
-- defined as follows:
--
-- -- Map.
--
-- map : ∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} →
-- [ T₁ ⟶ T₂ ] ρ̂₂ → Sub T₁ ρ̂₁ → Sub T₂ (ρ̂₁ ∘̂ ρ̂₂)
-- map f ε = ε
-- map {ρ̂₂ = ρ̂₂} f (ρ₁ ▻ t) =
-- P.subst (λ v → Sub T₂ (⟦ ρ₁ ⟧⇨ ∘̂ ρ̂₂ ▻̂ v))
-- (≅-Value-⇒-≡ $ P.sym $ corresponds f t)
-- (map f ρ₁ ▻ f · t)
--
-- Previously it was defined roughly as follows (the code below is
-- untested and has been adapted to the current version of the
-- library, as it was at the time of writing, with some imagined
-- changes):
--
-- mutual
--
-- -- Map.
--
-- map : ∀ {Γ Δ Ε} {ρ̂₂ : Δ ⇨̂ Ε} →
-- [ T₁ ⟶ T₂ ] ρ̂₂ → (ρ₁ : Γ ⇨₁ Δ) → Γ ⇨₂ Ε
-- map f ε = ε
-- map f (_▻_ {σ = σ} ρ t) =
-- map f ρ ▻
-- P.subst (λ ρ̂ → _ ⊢₂ σ /̂ ρ̂)
-- (≅-⇨̂-⇒-≡ $ P.sym $ map-lemma f ρ)
-- (f · t)
--
-- abstract
--
-- map-lemma :
-- ∀ {Γ Δ Ε} {ρ̂₂ : Δ ⇨̂ Ε} →
-- (f : [ T₁ ⟶ T₂ ] ρ̂₂) (ρ₁ : Γ ⇨₁ Δ) →
-- ⟦ map f ρ₁ ⟧₂⇨ ≅-⇨̂ ⟦ ρ₁ ⟧₁⇨ ∘̂ ρ₂
-- map-lemma f ε = P.refl
-- map-lemma {ρ₂ = ρ₂} f (_▻_ {σ = σ} ρ t) =
-- ▻̂-cong P.refl (map-lemma f ρ) (begin
-- [ ⟦ P.subst (λ ρ̂ → _ ⊢₂ σ /̂ ρ̂)
-- (≅-⇨̂-⇒-≡ $ P.sym (map-lemma f ρ))
-- (f · t) ⟧₂ ] ≡⟨ Term-like.⟦⟧-cong T₂
-- (Term-like.drop-subst-⊢ T₂
-- (λ ρ̂ → σ /̂ ρ̂)
-- (≅-⇨̂-⇒-≡ $ P.sym (map-lemma f ρ))) ⟩
-- [ ⟦ f · t ⟧₂ ] ≡⟨ P.sym $ corresponds f t ⟩
-- [ ⟦ t ⟧₁ /̂Val ρ₂ ] ∎)
private
module Dummy₂ {t} {T : Term-like t} where
open Term-like T
-- Some variants.
ε⇨[_] : ∀ Δ → Sub T ε̂[ Δ ]
ε⇨[ _ ] = ε
infixl 5 _▻⇨[_]_
_▻⇨[_]_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} →
Sub T ρ̂ → ∀ σ (t : Δ ⊢ σ /̂ ρ̂) → Sub T (ρ̂ ▻̂[ σ ] ⟦ t ⟧)
ρ ▻⇨[ _ ] t = ρ ▻ t
ε⇨⋆[_] : ∀ Γ → Subs T îd[ Γ ]
ε⇨⋆[ _ ] = ε
-- Equality of substitutions.
record [⇨] : Set (i ⊔ u ⊔ e ⊔ t) where
constructor [_]
field
{Γ Δ} : Ctxt
{ρ̂} : Γ ⇨̂ Δ
ρ : Sub T ρ̂
infix 4 _≅-⇨_
_≅-⇨_ : ∀ {Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} (ρ₁ : Sub T ρ̂₁)
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} (ρ₂ : Sub T ρ̂₂) → Set _
ρ₁ ≅-⇨ ρ₂ = _≡_ {A = [⇨]} [ ρ₁ ] [ ρ₂ ]
≅-⇨-⇒-≡ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} {ρ₁ ρ₂ : Sub T ρ̂} →
ρ₁ ≅-⇨ ρ₂ → ρ₁ ≡ ρ₂
≅-⇨-⇒-≡ P.refl = P.refl
-- Certain uses of substitutivity can be removed.
drop-subst-Sub :
∀ {a} {A : Set a} {x₁ x₂ : A} {Γ Δ}
(f : A → Γ ⇨̂ Δ) {ρ} (eq : x₁ ≡ x₂) →
P.subst (λ x → Sub T (f x)) eq ρ ≅-⇨ ρ
drop-subst-Sub f P.refl = P.refl
-- Equality of sequences of substitutions.
record [⇨⋆] : Set (i ⊔ u ⊔ e ⊔ t) where
constructor [_]
field
{Γ Δ} : Ctxt
{ρ̂} : Γ ⇨̂ Δ
ρs : Subs T ρ̂
infix 4 _≅-⇨⋆_
_≅-⇨⋆_ : ∀ {Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} (ρs₁ : Subs T ρ̂₁)
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} (ρs₂ : Subs T ρ̂₂) → Set _
ρs₁ ≅-⇨⋆ ρs₂ = _≡_ {A = [⇨⋆]} [ ρs₁ ] [ ρs₂ ]
≅-⇨⋆-⇒-≡ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} {ρs₁ ρs₂ : Subs T ρ̂} →
ρs₁ ≅-⇨⋆ ρs₂ → ρs₁ ≡ ρs₂
≅-⇨⋆-⇒-≡ P.refl = P.refl
-- Interpretation of substitutions: context morphisms.
⟦_⟧⇨ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Sub T ρ̂ → Γ ⇨̂ Δ
⟦_⟧⇨ {ρ̂ = ρ̂} _ = ρ̂
⟦_⟧⇨⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Subs T ρ̂ → Γ ⇨̂ Δ
⟦_⟧⇨⋆ {ρ̂ = ρ̂} _ = ρ̂
-- Application of substitutions to types.
infixl 8 _/I_ _/_ _/⋆_
_/I_ : ∀ {Γ Δ i} {ρ̂ : Γ ⇨̂ Δ} → IType Γ i → Sub T ρ̂ → IType Δ i
σ /I ρ = σ /̂I ⟦ ρ ⟧⇨
_/_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Type Γ → Sub T ρ̂ → Type Δ
σ / ρ = σ /̂ ⟦ ρ ⟧⇨
_/⋆_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Type Γ → Subs T ρ̂ → Type Δ
σ /⋆ ρs = σ /̂ ⟦ ρs ⟧⇨⋆
-- Application of substitutions to values.
infixl 8 _/Val_
_/Val_ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} →
Value Γ σ → Sub T ρ̂ → Value Δ (σ /̂ ρ̂)
v /Val ρ = v /̂Val ⟦ ρ ⟧⇨
-- Application of substitutions to context extensions.
infixl 8 _/⁺_ _/⁺⋆_ _/₊_ _/₊⋆_
_/⁺_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Ctxt⁺ Γ → Sub T ρ̂ → Ctxt⁺ Δ
Γ⁺ /⁺ ρ = Γ⁺ /̂⁺ ⟦ ρ ⟧⇨
_/⁺⋆_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Ctxt⁺ Γ → Subs T ρ̂ → Ctxt⁺ Δ
Γ⁺ /⁺⋆ ρs = Γ⁺ /̂⁺ ⟦ ρs ⟧⇨⋆
_/₊_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Ctxt₊ Γ → Sub T ρ̂ → Ctxt₊ Δ
Γ₊ /₊ ρ = Γ₊ /̂₊ ⟦ ρ ⟧⇨
_/₊⋆_ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Ctxt₊ Γ → Subs T ρ̂ → Ctxt₊ Δ
Γ₊ /₊⋆ ρs = Γ₊ /̂₊ ⟦ ρs ⟧⇨⋆
-- Application of substitutions to variables.
infixl 8 _/∋_ _/∋-lemma_
_/∋_ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} → Γ ∋ σ → (ρ : Sub T ρ̂) → Δ ⊢ σ / ρ
zero /∋ (ρ ▻ y) = y
suc x /∋ (ρ ▻ y) = x /∋ ρ
abstract
_/∋-lemma_ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (x : Γ ∋ σ) (ρ : Sub T ρ̂) →
x /̂∋ ⟦ ρ ⟧⇨ ≅-Value ⟦ x /∋ ρ ⟧
zero /∋-lemma (ρ ▻ y) = P.refl
suc x /∋-lemma (ρ ▻ y) = x /∋-lemma ρ
app∋ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Sub T ρ̂ → [ Var ⟶ T ] ρ̂
app∋ ρ = record
{ function = λ _ x → x /∋ ρ
; corresponds = λ _ x → x /∋-lemma ρ
}
-- The tail of a nonempty substitution.
tail : ∀ {Γ Δ σ} {ρ̂ : Γ ▻ σ ⇨̂ Δ} → Sub T ρ̂ → Sub T (t̂ail ρ̂)
tail (ρ ▻ t) = ρ
-- The head of a nonempty substitution.
head : ∀ {Γ Δ σ} {ρ̂ : Γ ▻ σ ⇨̂ Δ} (ρ : Sub T ρ̂) → Δ ⊢ σ / tail ρ
head (ρ ▻ t) = t
head-lemma : ∀ {Γ Δ σ} {ρ̂ : Γ ▻ σ ⇨̂ Δ} (ρ : Sub T ρ̂) →
ĥead ⟦ ρ ⟧⇨ ≅-Value ⟦ head ρ ⟧
head-lemma (ρ ▻ t) = P.refl
-- Fold for sequences of substitutions.
fold : ∀ {f} (F : ∀ {Γ Δ} → Γ ⇨̂ Δ → Set f) {Γ} →
F (îd {Γ = Γ}) →
(∀ {Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} →
F ρ̂₁ → Sub T ρ̂₂ → F (ρ̂₁ ∘̂ ρ̂₂)) →
∀ {Δ} {ρ̂ : Γ ⇨̂ Δ} → Subs T ρ̂ → F ρ̂
fold F nil cons ε = nil
fold F nil cons (ρs ▻ ρ) = cons (fold F nil cons ρs) ρ
-- Some congruence lemmas.
ε⇨-cong : ∀ {Δ₁ Δ₂} → Δ₁ ≅-Ctxt Δ₂ → ε⇨[ Δ₁ ] ≅-⇨ ε⇨[ Δ₂ ]
ε⇨-cong P.refl = P.refl
▻⇨-cong :
∀ {Γ₁ Δ₁ σ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁} {t₁ : Δ₁ ⊢ σ₁ / ρ₁}
{Γ₂ Δ₂ σ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} {t₂ : Δ₂ ⊢ σ₂ / ρ₂} →
σ₁ ≅-Type σ₂ → ρ₁ ≅-⇨ ρ₂ → t₁ ≅-⊢ t₂ →
ρ₁ ▻⇨[ σ₁ ] t₁ ≅-⇨ ρ₂ ▻⇨[ σ₂ ] t₂
▻⇨-cong P.refl P.refl P.refl = P.refl
ε⇨⋆-cong : ∀ {Γ₁ Γ₂} → Γ₁ ≡ Γ₂ → ε⇨⋆[ Γ₁ ] ≅-⇨⋆ ε⇨⋆[ Γ₂ ]
ε⇨⋆-cong P.refl = P.refl
▻⇨⋆-cong :
∀ {Γ₁ Δ₁ Ε₁} {ρ̂₁₁ : Γ₁ ⇨̂ Δ₁} {ρ̂₂₁ : Δ₁ ⇨̂ Ε₁}
{ρs₁ : Subs T ρ̂₁₁} {ρ₁ : Sub T ρ̂₂₁}
{Γ₂ Δ₂ Ε₂} {ρ̂₁₂ : Γ₂ ⇨̂ Δ₂} {ρ̂₂₂ : Δ₂ ⇨̂ Ε₂}
{ρs₂ : Subs T ρ̂₁₂} {ρ₂ : Sub T ρ̂₂₂} →
ρs₁ ≅-⇨⋆ ρs₂ → ρ₁ ≅-⇨ ρ₂ → ρs₁ ▻ ρ₁ ≅-⇨⋆ ρs₂ ▻ ρ₂
▻⇨⋆-cong P.refl P.refl = P.refl
⟦⟧⇨-cong : ∀ {Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
ρ₁ ≅-⇨ ρ₂ → ⟦ ρ₁ ⟧⇨ ≅-⇨̂ ⟦ ρ₂ ⟧⇨
⟦⟧⇨-cong P.refl = P.refl
/I-cong :
∀ {i}
{Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {σ₁ : IType Γ₁ i} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {σ₂ : IType Γ₂ i} {ρ₂ : Sub T ρ̂₂} →
σ₁ ≅-IType σ₂ → ρ₁ ≅-⇨ ρ₂ → σ₁ /I ρ₁ ≅-IType σ₂ /I ρ₂
/I-cong P.refl P.refl = P.refl
/-cong : ∀ {Γ₁ Δ₁ σ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ σ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
σ₁ ≅-Type σ₂ → ρ₁ ≅-⇨ ρ₂ → σ₁ / ρ₁ ≅-Type σ₂ / ρ₂
/-cong P.refl P.refl = P.refl
/⁺-cong : ∀ {Γ₁ Δ₁ Γ⁺₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ Γ⁺₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
Γ⁺₁ ≅-Ctxt⁺ Γ⁺₂ → ρ₁ ≅-⇨ ρ₂ → Γ⁺₁ /⁺ ρ₁ ≅-Ctxt⁺ Γ⁺₂ /⁺ ρ₂
/⁺-cong P.refl P.refl = P.refl
/⁺⋆-cong : ∀ {Γ₁ Δ₁ Γ⁺₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρs₁ : Subs T ρ̂₁}
{Γ₂ Δ₂ Γ⁺₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρs₂ : Subs T ρ̂₂} →
Γ⁺₁ ≅-Ctxt⁺ Γ⁺₂ → ρs₁ ≅-⇨⋆ ρs₂ →
Γ⁺₁ /⁺⋆ ρs₁ ≅-Ctxt⁺ Γ⁺₂ /⁺⋆ ρs₂
/⁺⋆-cong P.refl P.refl = P.refl
/₊-cong : ∀ {Γ₁ Δ₁ Γ₊₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ Γ₊₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
Γ₊₁ ≅-Ctxt₊ Γ₊₂ → ρ₁ ≅-⇨ ρ₂ → Γ₊₁ /₊ ρ₁ ≅-Ctxt₊ Γ₊₂ /₊ ρ₂
/₊-cong P.refl P.refl = P.refl
/₊⋆-cong : ∀ {Γ₁ Δ₁ Γ₊₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρs₁ : Subs T ρ̂₁}
{Γ₂ Δ₂ Γ₊₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρs₂ : Subs T ρ̂₂} →
Γ₊₁ ≅-Ctxt₊ Γ₊₂ → ρs₁ ≅-⇨⋆ ρs₂ →
Γ₊₁ /₊⋆ ρs₁ ≅-Ctxt₊ Γ₊₂ /₊⋆ ρs₂
/₊⋆-cong P.refl P.refl = P.refl
/∋-cong : ∀ {Γ₁ Δ₁ σ₁} {x₁ : Γ₁ ∋ σ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ σ₂} {x₂ : Γ₂ ∋ σ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
x₁ ≅-∋ x₂ → ρ₁ ≅-⇨ ρ₂ → x₁ /∋ ρ₁ ≅-⊢ x₂ /∋ ρ₂
/∋-cong P.refl P.refl = P.refl
tail-cong : ∀ {Γ₁ Δ₁ σ₁} {ρ̂₁ : Γ₁ ▻ σ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ σ₂} {ρ̂₂ : Γ₂ ▻ σ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
ρ₁ ≅-⇨ ρ₂ → tail ρ₁ ≅-⇨ tail ρ₂
tail-cong P.refl = P.refl
head-cong : ∀ {Γ₁ Δ₁ σ₁} {ρ̂₁ : Γ₁ ▻ σ₁ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Γ₂ Δ₂ σ₂} {ρ̂₂ : Γ₂ ▻ σ₂ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
ρ₁ ≅-⇨ ρ₂ → head ρ₁ ≅-⊢ head ρ₂
head-cong P.refl = P.refl
abstract
-- Some eta-laws.
ηε : ∀ {Δ} {ρ̂ : ε ⇨̂ Δ} (ρ : Sub T ρ̂) → ρ ≅-⇨ ε⇨[ Δ ]
ηε ε = P.refl
η▻ : ∀ {Γ Δ σ} {ρ̂ : Γ ▻ σ ⇨̂ Δ} (ρ : Sub T ρ̂) →
ρ ≅-⇨ tail ρ ▻⇨[ σ ] head ρ
η▻ (ρ ▻ t) = P.refl
-- Two substitutions are equal if their indices are equal and
-- their projections are pairwise equal.
extensionality :
∀ {Γ Δ₁} {ρ̂₁ : Γ ⇨̂ Δ₁} {ρ₁ : Sub T ρ̂₁}
{Δ₂} {ρ̂₂ : Γ ⇨̂ Δ₂} {ρ₂ : Sub T ρ̂₂} →
Δ₁ ≅-Ctxt Δ₂ → (∀ {σ} (x : Γ ∋ σ) → x /∋ ρ₁ ≅-⊢ x /∋ ρ₂) →
ρ₁ ≅-⇨ ρ₂
extensionality {ρ₁ = ε} {ρ₂ = ε} Δ₁≅Δ₂ hyp = ε⇨-cong Δ₁≅Δ₂
extensionality {ρ₁ = ρ₁ ▻ t₁} {ρ₂ = ρ₂ ▻ t₂} Δ₁≅Δ₂ hyp =
▻⇨-cong P.refl
(extensionality Δ₁≅Δ₂ (hyp ∘ suc))
(hyp zero)
open Dummy₂ public
|
ltst4.asm | adrianna157/CS444-Lab5-Mutexes | 0 | 11082 | <reponame>adrianna157/CS444-Lab5-Mutexes
_ltst4: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#endif // BENNY_MOOTEX
int
main(int argc, char **argv)
{
0: 55 push %ebp
#ifdef BENNY_MOOTEX
int i = 0;
int num_threads = NUM_THREADS;
int begin_date = 0;
int end_date = 0;
benny_thread_t bt[NUM_THREADS] = {0};
1: 31 c0 xor %eax,%eax
{
3: 89 e5 mov %esp,%ebp
benny_thread_t bt[NUM_THREADS] = {0};
5: b9 0a 00 00 00 mov $0xa,%ecx
{
a: 57 push %edi
b: 56 push %esi
c: 53 push %ebx
//benny_mootex_init(&mootex);
lock_func = benny_mootex_spinlock;
printf(1, "spin locking enabled\n");
begin_date = uptime();
for (i = 0; i < num_threads; i++) {
d: 31 db xor %ebx,%ebx
{
f: 83 e4 f0 and $0xfffffff0,%esp
12: 83 ec 50 sub $0x50,%esp
benny_thread_t bt[NUM_THREADS] = {0};
15: 8d 7c 24 28 lea 0x28(%esp),%edi
19: f3 ab rep stos %eax,%es:(%edi)
begin_date = uptime();
1b: 8d 7c 24 28 lea 0x28(%esp),%edi
printf(1, "spin locking enabled\n");
1f: c7 44 24 04 a6 0c 00 movl $0xca6,0x4(%esp)
26: 00
27: c7 04 24 01 00 00 00 movl $0x1,(%esp)
lock_func = benny_mootex_spinlock;
2e: c7 05 e0 11 00 00 80 movl $0xb80,0x11e0
35: 0b 00 00
printf(1, "spin locking enabled\n");
38: e8 33 06 00 00 call 670 <printf>
begin_date = uptime();
3d: e8 18 05 00 00 call 55a <uptime>
42: 89 c6 mov %eax,%esi
44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
benny_thread_create(&(bt[i]), func1, (void *) i);
48: 89 5c 24 08 mov %ebx,0x8(%esp)
for (i = 0; i < num_threads; i++) {
4c: 83 c3 01 add $0x1,%ebx
benny_thread_create(&(bt[i]), func1, (void *) i);
4f: 89 3c 24 mov %edi,(%esp)
52: 83 c7 04 add $0x4,%edi
55: c7 44 24 04 d0 01 00 movl $0x1d0,0x4(%esp)
5c: 00
5d: e8 ae 09 00 00 call a10 <benny_thread_create>
for (i = 0; i < num_threads; i++) {
62: 83 fb 0a cmp $0xa,%ebx
65: 75 e1 jne 48 <main+0x48>
67: 8d 44 24 28 lea 0x28(%esp),%eax
6b: 8d 7c 24 50 lea 0x50(%esp),%edi
6f: 89 c3 mov %eax,%ebx
71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
for (i = 0; i < num_threads; i++) {
benny_thread_join(bt[i]);
78: 8b 03 mov (%ebx),%eax
7a: 83 c3 04 add $0x4,%ebx
7d: 89 04 24 mov %eax,(%esp)
80: e8 3b 0a 00 00 call ac0 <benny_thread_join>
for (i = 0; i < num_threads; i++) {
85: 39 fb cmp %edi,%ebx
87: 75 ef jne 78 <main+0x78>
}
end_date = uptime();
89: e8 cc 04 00 00 call 55a <uptime>
printf(1, "\tglobal value:\t%d\n", global);
8e: c7 44 24 04 bc 0c 00 movl $0xcbc,0x4(%esp)
95: 00
96: c7 04 24 01 00 00 00 movl $0x1,(%esp)
end_date = uptime();
9d: 89 c3 mov %eax,%ebx
printf(1, "\tglobal value:\t%d\n", global);
9f: a1 ec 11 00 00 mov 0x11ec,%eax
printf(1, "\telapse ticks:\t%d\n", end_date - begin_date);
a4: 29 f3 sub %esi,%ebx
printf(1, "\tglobal value:\t%d\n", global);
a6: 89 44 24 08 mov %eax,0x8(%esp)
aa: e8 c1 05 00 00 call 670 <printf>
printf(1, "\telapse ticks:\t%d\n", end_date - begin_date);
af: 89 5c 24 08 mov %ebx,0x8(%esp)
b3: c7 44 24 04 cf 0c 00 movl $0xccf,0x4(%esp)
ba: 00
bb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
c2: e8 a9 05 00 00 call 670 <printf>
assert(global == (ITERATIONS * ITERATIONS * num_threads));
c7: 81 3d ec 11 00 00 00 cmpl $0x3b9aca00,0x11ec
ce: ca 9a 3b
d1: 74 29 je fc <main+0xfc>
d3: c7 44 24 0c 45 00 00 movl $0x45,0xc(%esp)
da: 00
benny_thread_join(bt[i]);
}
end_date = uptime();
printf(1, "\tglobal value:\t%d\n", global);
printf(1, "\telapse ticks:\t%d\n", end_date - begin_date);
assert(global == (ITERATIONS * ITERATIONS * num_threads));
db: c7 44 24 08 e2 0c 00 movl $0xce2,0x8(%esp)
e2: 00
e3: c7 44 24 04 04 0d 00 movl $0xd04,0x4(%esp)
ea: 00
eb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
f2: e8 79 05 00 00 call 670 <printf>
f7: e8 c6 03 00 00 call 4c2 <exit>
printf(1, "yield locking enabled\n");
fc: c7 44 24 04 ea 0c 00 movl $0xcea,0x4(%esp)
103: 00
begin_date = uptime();
104: 8d 74 24 28 lea 0x28(%esp),%esi
for (i = 0; i < num_threads; i++) {
108: 31 db xor %ebx,%ebx
printf(1, "yield locking enabled\n");
10a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
global = 0;
111: c7 05 ec 11 00 00 00 movl $0x0,0x11ec
118: 00 00 00
lock_func = benny_mootex_yieldlock;
11b: c7 05 e0 11 00 00 40 movl $0xb40,0x11e0
122: 0b 00 00
printf(1, "yield locking enabled\n");
125: e8 46 05 00 00 call 670 <printf>
begin_date = uptime();
12a: e8 2b 04 00 00 call 55a <uptime>
12f: 89 44 24 1c mov %eax,0x1c(%esp)
133: 90 nop
134: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
benny_thread_create(&(bt[i]), func1, (void *) i);
138: 89 5c 24 08 mov %ebx,0x8(%esp)
for (i = 0; i < num_threads; i++) {
13c: 83 c3 01 add $0x1,%ebx
benny_thread_create(&(bt[i]), func1, (void *) i);
13f: 89 34 24 mov %esi,(%esp)
142: 83 c6 04 add $0x4,%esi
145: c7 44 24 04 d0 01 00 movl $0x1d0,0x4(%esp)
14c: 00
14d: e8 be 08 00 00 call a10 <benny_thread_create>
for (i = 0; i < num_threads; i++) {
152: 83 fb 0a cmp $0xa,%ebx
155: 75 e1 jne 138 <main+0x138>
157: 8d 5c 24 28 lea 0x28(%esp),%ebx
15b: 90 nop
15c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
benny_thread_join(bt[i]);
160: 8b 03 mov (%ebx),%eax
162: 83 c3 04 add $0x4,%ebx
165: 89 04 24 mov %eax,(%esp)
168: e8 53 09 00 00 call ac0 <benny_thread_join>
for (i = 0; i < num_threads; i++) {
16d: 39 df cmp %ebx,%edi
16f: 75 ef jne 160 <main+0x160>
end_date = uptime();
171: e8 e4 03 00 00 call 55a <uptime>
printf(1, "\tglobal value:\t%d\n", global);
176: c7 44 24 04 bc 0c 00 movl $0xcbc,0x4(%esp)
17d: 00
17e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
end_date = uptime();
185: 89 c3 mov %eax,%ebx
printf(1, "\tglobal value:\t%d\n", global);
187: a1 ec 11 00 00 mov 0x11ec,%eax
18c: 89 44 24 08 mov %eax,0x8(%esp)
190: e8 db 04 00 00 call 670 <printf>
printf(1, "\telapse ticks:\t%d\n", end_date - begin_date);
195: 2b 5c 24 1c sub 0x1c(%esp),%ebx
199: c7 44 24 04 cf 0c 00 movl $0xccf,0x4(%esp)
1a0: 00
1a1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a8: 89 5c 24 08 mov %ebx,0x8(%esp)
1ac: e8 bf 04 00 00 call 670 <printf>
assert(global == (ITERATIONS * ITERATIONS * num_threads));
1b1: 81 3d ec 11 00 00 00 cmpl $0x3b9aca00,0x11ec
1b8: ca 9a 3b
1bb: 0f 84 36 ff ff ff je f7 <main+0xf7>
1c1: c7 44 24 0c 55 00 00 movl $0x55,0xc(%esp)
1c8: 00
1c9: e9 0d ff ff ff jmp db <main+0xdb>
1ce: 66 90 xchg %ax,%ax
000001d0 <func1>:
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 56 push %esi
1d4: 53 push %ebx
benny_mootex_unlock(&mootex);
1d5: bb 10 27 00 00 mov $0x2710,%ebx
{
1da: 83 ec 10 sub $0x10,%esp
1dd: 8b 75 08 mov 0x8(%ebp),%esi
lock_func(&mootex);
1e0: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
1e7: ff 15 e0 11 00 00 call *0x11e0
printf(1, "thread starting %d %d\n", getpid(), bid);
1ed: e8 50 03 00 00 call 542 <getpid>
1f2: 89 74 24 0c mov %esi,0xc(%esp)
1f6: c7 44 24 04 7c 0c 00 movl $0xc7c,0x4(%esp)
1fd: 00
1fe: c7 04 24 01 00 00 00 movl $0x1,(%esp)
205: 89 44 24 08 mov %eax,0x8(%esp)
209: e8 62 04 00 00 call 670 <printf>
benny_mootex_unlock(&mootex);
20e: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
215: e8 96 09 00 00 call bb0 <benny_mootex_unlock>
21a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
lock_func(&mootex);
220: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
227: ff 15 e0 11 00 00 call *0x11e0
benny_mootex_unlock(&mootex);
22d: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
234: 81 05 ec 11 00 00 10 addl $0x2710,0x11ec
23b: 27 00 00
23e: e8 6d 09 00 00 call bb0 <benny_mootex_unlock>
for (i = 0; i < (ITERATIONS); i++) {
243: 83 eb 01 sub $0x1,%ebx
246: 75 d8 jne 220 <func1+0x50>
lock_func(&mootex);
248: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
24f: ff 15 e0 11 00 00 call *0x11e0
printf(1, "thread done %d %d\n", getpid(), bid);
255: e8 e8 02 00 00 call 542 <getpid>
25a: 89 74 24 0c mov %esi,0xc(%esp)
25e: c7 44 24 04 93 0c 00 movl $0xc93,0x4(%esp)
265: 00
266: c7 04 24 01 00 00 00 movl $0x1,(%esp)
26d: 89 44 24 08 mov %eax,0x8(%esp)
271: e8 fa 03 00 00 call 670 <printf>
benny_mootex_unlock(&mootex);
276: c7 04 24 e4 11 00 00 movl $0x11e4,(%esp)
27d: e8 2e 09 00 00 call bb0 <benny_mootex_unlock>
benny_thread_exit(0);
282: c7 45 08 00 00 00 00 movl $0x0,0x8(%ebp)
}
289: 83 c4 10 add $0x10,%esp
28c: 5b pop %ebx
28d: 5e pop %esi
28e: 5d pop %ebp
benny_thread_exit(0);
28f: e9 7c 08 00 00 jmp b10 <benny_thread_exit>
294: 66 90 xchg %ax,%ax
296: 66 90 xchg %ax,%ax
298: 66 90 xchg %ax,%ax
29a: 66 90 xchg %ax,%ax
29c: 66 90 xchg %ax,%ax
29e: 66 90 xchg %ax,%ax
000002a0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
2a0: 55 push %ebp
2a1: 89 e5 mov %esp,%ebp
2a3: 8b 45 08 mov 0x8(%ebp),%eax
2a6: 8b 4d 0c mov 0xc(%ebp),%ecx
2a9: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
2aa: 89 c2 mov %eax,%edx
2ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2b0: 83 c1 01 add $0x1,%ecx
2b3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
2b7: 83 c2 01 add $0x1,%edx
2ba: 84 db test %bl,%bl
2bc: 88 5a ff mov %bl,-0x1(%edx)
2bf: 75 ef jne 2b0 <strcpy+0x10>
;
return os;
}
2c1: 5b pop %ebx
2c2: 5d pop %ebp
2c3: c3 ret
2c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
2ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000002d0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
2d0: 55 push %ebp
2d1: 89 e5 mov %esp,%ebp
2d3: 8b 55 08 mov 0x8(%ebp),%edx
2d6: 53 push %ebx
2d7: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
2da: 0f b6 02 movzbl (%edx),%eax
2dd: 84 c0 test %al,%al
2df: 74 2d je 30e <strcmp+0x3e>
2e1: 0f b6 19 movzbl (%ecx),%ebx
2e4: 38 d8 cmp %bl,%al
2e6: 74 0e je 2f6 <strcmp+0x26>
2e8: eb 2b jmp 315 <strcmp+0x45>
2ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
2f0: 38 c8 cmp %cl,%al
2f2: 75 15 jne 309 <strcmp+0x39>
p++, q++;
2f4: 89 d9 mov %ebx,%ecx
2f6: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
2f9: 0f b6 02 movzbl (%edx),%eax
p++, q++;
2fc: 8d 59 01 lea 0x1(%ecx),%ebx
while(*p && *p == *q)
2ff: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
303: 84 c0 test %al,%al
305: 75 e9 jne 2f0 <strcmp+0x20>
307: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
309: 29 c8 sub %ecx,%eax
}
30b: 5b pop %ebx
30c: 5d pop %ebp
30d: c3 ret
30e: 0f b6 09 movzbl (%ecx),%ecx
while(*p && *p == *q)
311: 31 c0 xor %eax,%eax
313: eb f4 jmp 309 <strcmp+0x39>
315: 0f b6 cb movzbl %bl,%ecx
318: eb ef jmp 309 <strcmp+0x39>
31a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000320 <strlen>:
uint
strlen(const char *s)
{
320: 55 push %ebp
321: 89 e5 mov %esp,%ebp
323: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
326: 80 39 00 cmpb $0x0,(%ecx)
329: 74 12 je 33d <strlen+0x1d>
32b: 31 d2 xor %edx,%edx
32d: 8d 76 00 lea 0x0(%esi),%esi
330: 83 c2 01 add $0x1,%edx
333: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
337: 89 d0 mov %edx,%eax
339: 75 f5 jne 330 <strlen+0x10>
;
return n;
}
33b: 5d pop %ebp
33c: c3 ret
for(n = 0; s[n]; n++)
33d: 31 c0 xor %eax,%eax
}
33f: 5d pop %ebp
340: c3 ret
341: eb 0d jmp 350 <memset>
343: 90 nop
344: 90 nop
345: 90 nop
346: 90 nop
347: 90 nop
348: 90 nop
349: 90 nop
34a: 90 nop
34b: 90 nop
34c: 90 nop
34d: 90 nop
34e: 90 nop
34f: 90 nop
00000350 <memset>:
void*
memset(void *dst, int c, uint n)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 8b 55 08 mov 0x8(%ebp),%edx
356: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
357: 8b 4d 10 mov 0x10(%ebp),%ecx
35a: 8b 45 0c mov 0xc(%ebp),%eax
35d: 89 d7 mov %edx,%edi
35f: fc cld
360: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
362: 89 d0 mov %edx,%eax
364: 5f pop %edi
365: 5d pop %ebp
366: c3 ret
367: 89 f6 mov %esi,%esi
369: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000370 <strchr>:
char*
strchr(const char *s, char c)
{
370: 55 push %ebp
371: 89 e5 mov %esp,%ebp
373: 8b 45 08 mov 0x8(%ebp),%eax
376: 53 push %ebx
377: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
37a: 0f b6 18 movzbl (%eax),%ebx
37d: 84 db test %bl,%bl
37f: 74 1d je 39e <strchr+0x2e>
if(*s == c)
381: 38 d3 cmp %dl,%bl
383: 89 d1 mov %edx,%ecx
385: 75 0d jne 394 <strchr+0x24>
387: eb 17 jmp 3a0 <strchr+0x30>
389: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
390: 38 ca cmp %cl,%dl
392: 74 0c je 3a0 <strchr+0x30>
for(; *s; s++)
394: 83 c0 01 add $0x1,%eax
397: 0f b6 10 movzbl (%eax),%edx
39a: 84 d2 test %dl,%dl
39c: 75 f2 jne 390 <strchr+0x20>
return (char*)s;
return 0;
39e: 31 c0 xor %eax,%eax
}
3a0: 5b pop %ebx
3a1: 5d pop %ebp
3a2: c3 ret
3a3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
3a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000003b0 <gets>:
char*
gets(char *buf, int max)
{
3b0: 55 push %ebp
3b1: 89 e5 mov %esp,%ebp
3b3: 57 push %edi
3b4: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
3b5: 31 f6 xor %esi,%esi
{
3b7: 53 push %ebx
3b8: 83 ec 2c sub $0x2c,%esp
cc = read(0, &c, 1);
3bb: 8d 7d e7 lea -0x19(%ebp),%edi
for(i=0; i+1 < max; ){
3be: eb 31 jmp 3f1 <gets+0x41>
cc = read(0, &c, 1);
3c0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3c7: 00
3c8: 89 7c 24 04 mov %edi,0x4(%esp)
3cc: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3d3: e8 02 01 00 00 call 4da <read>
if(cc < 1)
3d8: 85 c0 test %eax,%eax
3da: 7e 1d jle 3f9 <gets+0x49>
break;
buf[i++] = c;
3dc: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
for(i=0; i+1 < max; ){
3e0: 89 de mov %ebx,%esi
buf[i++] = c;
3e2: 8b 55 08 mov 0x8(%ebp),%edx
if(c == '\n' || c == '\r')
3e5: 3c 0d cmp $0xd,%al
buf[i++] = c;
3e7: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
3eb: 74 0c je 3f9 <gets+0x49>
3ed: 3c 0a cmp $0xa,%al
3ef: 74 08 je 3f9 <gets+0x49>
for(i=0; i+1 < max; ){
3f1: 8d 5e 01 lea 0x1(%esi),%ebx
3f4: 3b 5d 0c cmp 0xc(%ebp),%ebx
3f7: 7c c7 jl 3c0 <gets+0x10>
break;
}
buf[i] = '\0';
3f9: 8b 45 08 mov 0x8(%ebp),%eax
3fc: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
400: 83 c4 2c add $0x2c,%esp
403: 5b pop %ebx
404: 5e pop %esi
405: 5f pop %edi
406: 5d pop %ebp
407: c3 ret
408: 90 nop
409: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000410 <stat>:
int
stat(const char *n, struct stat *st)
{
410: 55 push %ebp
411: 89 e5 mov %esp,%ebp
413: 56 push %esi
414: 53 push %ebx
415: 83 ec 10 sub $0x10,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
418: 8b 45 08 mov 0x8(%ebp),%eax
41b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
422: 00
423: 89 04 24 mov %eax,(%esp)
426: e8 d7 00 00 00 call 502 <open>
if(fd < 0)
42b: 85 c0 test %eax,%eax
fd = open(n, O_RDONLY);
42d: 89 c3 mov %eax,%ebx
if(fd < 0)
42f: 78 27 js 458 <stat+0x48>
return -1;
r = fstat(fd, st);
431: 8b 45 0c mov 0xc(%ebp),%eax
434: 89 1c 24 mov %ebx,(%esp)
437: 89 44 24 04 mov %eax,0x4(%esp)
43b: e8 da 00 00 00 call 51a <fstat>
close(fd);
440: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
443: 89 c6 mov %eax,%esi
close(fd);
445: e8 a0 00 00 00 call 4ea <close>
return r;
44a: 89 f0 mov %esi,%eax
}
44c: 83 c4 10 add $0x10,%esp
44f: 5b pop %ebx
450: 5e pop %esi
451: 5d pop %ebp
452: c3 ret
453: 90 nop
454: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
458: b8 ff ff ff ff mov $0xffffffff,%eax
45d: eb ed jmp 44c <stat+0x3c>
45f: 90 nop
00000460 <atoi>:
int
atoi(const char *s)
{
460: 55 push %ebp
461: 89 e5 mov %esp,%ebp
463: 8b 4d 08 mov 0x8(%ebp),%ecx
466: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
467: 0f be 11 movsbl (%ecx),%edx
46a: 8d 42 d0 lea -0x30(%edx),%eax
46d: 3c 09 cmp $0x9,%al
n = 0;
46f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
474: 77 17 ja 48d <atoi+0x2d>
476: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
478: 83 c1 01 add $0x1,%ecx
47b: 8d 04 80 lea (%eax,%eax,4),%eax
47e: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
482: 0f be 11 movsbl (%ecx),%edx
485: 8d 5a d0 lea -0x30(%edx),%ebx
488: 80 fb 09 cmp $0x9,%bl
48b: 76 eb jbe 478 <atoi+0x18>
return n;
}
48d: 5b pop %ebx
48e: 5d pop %ebp
48f: c3 ret
00000490 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
490: 55 push %ebp
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
491: 31 d2 xor %edx,%edx
{
493: 89 e5 mov %esp,%ebp
495: 56 push %esi
496: 8b 45 08 mov 0x8(%ebp),%eax
499: 53 push %ebx
49a: 8b 5d 10 mov 0x10(%ebp),%ebx
49d: 8b 75 0c mov 0xc(%ebp),%esi
while(n-- > 0)
4a0: 85 db test %ebx,%ebx
4a2: 7e 12 jle 4b6 <memmove+0x26>
4a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
4a8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
4ac: 88 0c 10 mov %cl,(%eax,%edx,1)
4af: 83 c2 01 add $0x1,%edx
while(n-- > 0)
4b2: 39 da cmp %ebx,%edx
4b4: 75 f2 jne 4a8 <memmove+0x18>
return vdst;
}
4b6: 5b pop %ebx
4b7: 5e pop %esi
4b8: 5d pop %ebp
4b9: c3 ret
000004ba <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
4ba: b8 01 00 00 00 mov $0x1,%eax
4bf: cd 40 int $0x40
4c1: c3 ret
000004c2 <exit>:
SYSCALL(exit)
4c2: b8 02 00 00 00 mov $0x2,%eax
4c7: cd 40 int $0x40
4c9: c3 ret
000004ca <wait>:
SYSCALL(wait)
4ca: b8 03 00 00 00 mov $0x3,%eax
4cf: cd 40 int $0x40
4d1: c3 ret
000004d2 <pipe>:
SYSCALL(pipe)
4d2: b8 04 00 00 00 mov $0x4,%eax
4d7: cd 40 int $0x40
4d9: c3 ret
000004da <read>:
SYSCALL(read)
4da: b8 05 00 00 00 mov $0x5,%eax
4df: cd 40 int $0x40
4e1: c3 ret
000004e2 <write>:
SYSCALL(write)
4e2: b8 10 00 00 00 mov $0x10,%eax
4e7: cd 40 int $0x40
4e9: c3 ret
000004ea <close>:
SYSCALL(close)
4ea: b8 15 00 00 00 mov $0x15,%eax
4ef: cd 40 int $0x40
4f1: c3 ret
000004f2 <kill>:
SYSCALL(kill)
4f2: b8 06 00 00 00 mov $0x6,%eax
4f7: cd 40 int $0x40
4f9: c3 ret
000004fa <exec>:
SYSCALL(exec)
4fa: b8 07 00 00 00 mov $0x7,%eax
4ff: cd 40 int $0x40
501: c3 ret
00000502 <open>:
SYSCALL(open)
502: b8 0f 00 00 00 mov $0xf,%eax
507: cd 40 int $0x40
509: c3 ret
0000050a <mknod>:
SYSCALL(mknod)
50a: b8 11 00 00 00 mov $0x11,%eax
50f: cd 40 int $0x40
511: c3 ret
00000512 <unlink>:
SYSCALL(unlink)
512: b8 12 00 00 00 mov $0x12,%eax
517: cd 40 int $0x40
519: c3 ret
0000051a <fstat>:
SYSCALL(fstat)
51a: b8 08 00 00 00 mov $0x8,%eax
51f: cd 40 int $0x40
521: c3 ret
00000522 <link>:
SYSCALL(link)
522: b8 13 00 00 00 mov $0x13,%eax
527: cd 40 int $0x40
529: c3 ret
0000052a <mkdir>:
SYSCALL(mkdir)
52a: b8 14 00 00 00 mov $0x14,%eax
52f: cd 40 int $0x40
531: c3 ret
00000532 <chdir>:
SYSCALL(chdir)
532: b8 09 00 00 00 mov $0x9,%eax
537: cd 40 int $0x40
539: c3 ret
0000053a <dup>:
SYSCALL(dup)
53a: b8 0a 00 00 00 mov $0xa,%eax
53f: cd 40 int $0x40
541: c3 ret
00000542 <getpid>:
SYSCALL(getpid)
542: b8 0b 00 00 00 mov $0xb,%eax
547: cd 40 int $0x40
549: c3 ret
0000054a <sbrk>:
SYSCALL(sbrk)
54a: b8 0c 00 00 00 mov $0xc,%eax
54f: cd 40 int $0x40
551: c3 ret
00000552 <sleep>:
SYSCALL(sleep)
552: b8 0d 00 00 00 mov $0xd,%eax
557: cd 40 int $0x40
559: c3 ret
0000055a <uptime>:
SYSCALL(uptime)
55a: b8 0e 00 00 00 mov $0xe,%eax
55f: cd 40 int $0x40
561: c3 ret
00000562 <getppid>:
#ifdef GETPPID
SYSCALL(getppid)
562: b8 16 00 00 00 mov $0x16,%eax
567: cd 40 int $0x40
569: c3 ret
0000056a <cps>:
#endif // GETPPID
#ifdef CPS
SYSCALL(cps)
56a: b8 17 00 00 00 mov $0x17,%eax
56f: cd 40 int $0x40
571: c3 ret
00000572 <halt>:
#endif // CPS
#ifdef HALT
SYSCALL(halt)
572: b8 18 00 00 00 mov $0x18,%eax
577: cd 40 int $0x40
579: c3 ret
0000057a <kdebug>:
#endif // HALT
#ifdef KDEBUG
SYSCALL(kdebug)
57a: b8 19 00 00 00 mov $0x19,%eax
57f: cd 40 int $0x40
581: c3 ret
00000582 <va2pa>:
#endif // KDEBUG
#ifdef VA2PA
SYSCALL(va2pa)
582: b8 1a 00 00 00 mov $0x1a,%eax
587: cd 40 int $0x40
589: c3 ret
0000058a <kthread_create>:
#endif // VA2PA
#ifdef KTHREADS
SYSCALL(kthread_create)
58a: b8 1b 00 00 00 mov $0x1b,%eax
58f: cd 40 int $0x40
591: c3 ret
00000592 <kthread_join>:
SYSCALL(kthread_join)
592: b8 1c 00 00 00 mov $0x1c,%eax
597: cd 40 int $0x40
599: c3 ret
0000059a <kthread_exit>:
SYSCALL(kthread_exit)
59a: b8 1d 00 00 00 mov $0x1d,%eax
59f: cd 40 int $0x40
5a1: c3 ret
000005a2 <kthread_self>:
#endif // KTHREADS
#ifdef BENNY_MOOTEX
SYSCALL(kthread_self)
5a2: b8 1e 00 00 00 mov $0x1e,%eax
5a7: cd 40 int $0x40
5a9: c3 ret
000005aa <kthread_yield>:
SYSCALL(kthread_yield)
5aa: b8 1f 00 00 00 mov $0x1f,%eax
5af: cd 40 int $0x40
5b1: c3 ret
000005b2 <kthread_cpu_count>:
SYSCALL(kthread_cpu_count)
5b2: b8 20 00 00 00 mov $0x20,%eax
5b7: cd 40 int $0x40
5b9: c3 ret
000005ba <kthread_thread_count>:
SYSCALL(kthread_thread_count)
5ba: b8 21 00 00 00 mov $0x21,%eax
5bf: cd 40 int $0x40
5c1: c3 ret
5c2: 66 90 xchg %ax,%ax
5c4: 66 90 xchg %ax,%ax
5c6: 66 90 xchg %ax,%ax
5c8: 66 90 xchg %ax,%ax
5ca: 66 90 xchg %ax,%ax
5cc: 66 90 xchg %ax,%ax
5ce: 66 90 xchg %ax,%ax
000005d0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
5d0: 55 push %ebp
5d1: 89 e5 mov %esp,%ebp
5d3: 57 push %edi
5d4: 56 push %esi
5d5: 89 c6 mov %eax,%esi
5d7: 53 push %ebx
5d8: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
5db: 8b 5d 08 mov 0x8(%ebp),%ebx
5de: 85 db test %ebx,%ebx
5e0: 74 09 je 5eb <printint+0x1b>
5e2: 89 d0 mov %edx,%eax
5e4: c1 e8 1f shr $0x1f,%eax
5e7: 84 c0 test %al,%al
5e9: 75 75 jne 660 <printint+0x90>
neg = 1;
x = -xx;
} else {
x = xx;
5eb: 89 d0 mov %edx,%eax
neg = 0;
5ed: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
5f4: 89 75 c0 mov %esi,-0x40(%ebp)
}
i = 0;
5f7: 31 ff xor %edi,%edi
5f9: 89 ce mov %ecx,%esi
5fb: 8d 5d d7 lea -0x29(%ebp),%ebx
5fe: eb 02 jmp 602 <printint+0x32>
do{
buf[i++] = digits[x % base];
600: 89 cf mov %ecx,%edi
602: 31 d2 xor %edx,%edx
604: f7 f6 div %esi
606: 8d 4f 01 lea 0x1(%edi),%ecx
609: 0f b6 92 2f 0d 00 00 movzbl 0xd2f(%edx),%edx
}while((x /= base) != 0);
610: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
612: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
615: 75 e9 jne 600 <printint+0x30>
if(neg)
617: 8b 55 c4 mov -0x3c(%ebp),%edx
buf[i++] = digits[x % base];
61a: 89 c8 mov %ecx,%eax
61c: 8b 75 c0 mov -0x40(%ebp),%esi
if(neg)
61f: 85 d2 test %edx,%edx
621: 74 08 je 62b <printint+0x5b>
buf[i++] = '-';
623: 8d 4f 02 lea 0x2(%edi),%ecx
626: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
62b: 8d 79 ff lea -0x1(%ecx),%edi
62e: 66 90 xchg %ax,%ax
630: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax
635: 83 ef 01 sub $0x1,%edi
write(fd, &c, 1);
638: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
63f: 00
640: 89 5c 24 04 mov %ebx,0x4(%esp)
644: 89 34 24 mov %esi,(%esp)
647: 88 45 d7 mov %al,-0x29(%ebp)
64a: e8 93 fe ff ff call 4e2 <write>
while(--i >= 0)
64f: 83 ff ff cmp $0xffffffff,%edi
652: 75 dc jne 630 <printint+0x60>
putc(fd, buf[i]);
}
654: 83 c4 4c add $0x4c,%esp
657: 5b pop %ebx
658: 5e pop %esi
659: 5f pop %edi
65a: 5d pop %ebp
65b: c3 ret
65c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
x = -xx;
660: 89 d0 mov %edx,%eax
662: f7 d8 neg %eax
neg = 1;
664: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
66b: eb 87 jmp 5f4 <printint+0x24>
66d: 8d 76 00 lea 0x0(%esi),%esi
00000670 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
670: 55 push %ebp
671: 89 e5 mov %esp,%ebp
673: 57 push %edi
char *s;
int c, i, state;
uint *ap;
state = 0;
674: 31 ff xor %edi,%edi
{
676: 56 push %esi
677: 53 push %ebx
678: 83 ec 3c sub $0x3c,%esp
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
67b: 8b 5d 0c mov 0xc(%ebp),%ebx
ap = (uint*)(void*)&fmt + 1;
67e: 8d 45 10 lea 0x10(%ebp),%eax
{
681: 8b 75 08 mov 0x8(%ebp),%esi
ap = (uint*)(void*)&fmt + 1;
684: 89 45 d4 mov %eax,-0x2c(%ebp)
for(i = 0; fmt[i]; i++){
687: 0f b6 13 movzbl (%ebx),%edx
68a: 83 c3 01 add $0x1,%ebx
68d: 84 d2 test %dl,%dl
68f: 75 39 jne 6ca <printf+0x5a>
691: e9 ca 00 00 00 jmp 760 <printf+0xf0>
696: 66 90 xchg %ax,%ax
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
698: 83 fa 25 cmp $0x25,%edx
69b: 0f 84 c7 00 00 00 je 768 <printf+0xf8>
write(fd, &c, 1);
6a1: 8d 45 e0 lea -0x20(%ebp),%eax
6a4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
6ab: 00
6ac: 89 44 24 04 mov %eax,0x4(%esp)
6b0: 89 34 24 mov %esi,(%esp)
state = '%';
} else {
putc(fd, c);
6b3: 88 55 e0 mov %dl,-0x20(%ebp)
write(fd, &c, 1);
6b6: e8 27 fe ff ff call 4e2 <write>
6bb: 83 c3 01 add $0x1,%ebx
for(i = 0; fmt[i]; i++){
6be: 0f b6 53 ff movzbl -0x1(%ebx),%edx
6c2: 84 d2 test %dl,%dl
6c4: 0f 84 96 00 00 00 je 760 <printf+0xf0>
if(state == 0){
6ca: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
6cc: 0f be c2 movsbl %dl,%eax
if(state == 0){
6cf: 74 c7 je 698 <printf+0x28>
}
} else if(state == '%'){
6d1: 83 ff 25 cmp $0x25,%edi
6d4: 75 e5 jne 6bb <printf+0x4b>
if(c == 'd' || c == 'u'){
6d6: 83 fa 75 cmp $0x75,%edx
6d9: 0f 84 99 00 00 00 je 778 <printf+0x108>
6df: 83 fa 64 cmp $0x64,%edx
6e2: 0f 84 90 00 00 00 je 778 <printf+0x108>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
6e8: 25 f7 00 00 00 and $0xf7,%eax
6ed: 83 f8 70 cmp $0x70,%eax
6f0: 0f 84 aa 00 00 00 je 7a0 <printf+0x130>
putc(fd, '0');
putc(fd, 'x');
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
6f6: 83 fa 73 cmp $0x73,%edx
6f9: 0f 84 e9 00 00 00 je 7e8 <printf+0x178>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
6ff: 83 fa 63 cmp $0x63,%edx
702: 0f 84 2b 01 00 00 je 833 <printf+0x1c3>
putc(fd, *ap);
ap++;
} else if(c == '%'){
708: 83 fa 25 cmp $0x25,%edx
70b: 0f 84 4f 01 00 00 je 860 <printf+0x1f0>
write(fd, &c, 1);
711: 8d 45 e6 lea -0x1a(%ebp),%eax
714: 83 c3 01 add $0x1,%ebx
717: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
71e: 00
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
71f: 31 ff xor %edi,%edi
write(fd, &c, 1);
721: 89 44 24 04 mov %eax,0x4(%esp)
725: 89 34 24 mov %esi,(%esp)
728: 89 55 d0 mov %edx,-0x30(%ebp)
72b: c6 45 e6 25 movb $0x25,-0x1a(%ebp)
72f: e8 ae fd ff ff call 4e2 <write>
putc(fd, c);
734: 8b 55 d0 mov -0x30(%ebp),%edx
write(fd, &c, 1);
737: 8d 45 e7 lea -0x19(%ebp),%eax
73a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
741: 00
742: 89 44 24 04 mov %eax,0x4(%esp)
746: 89 34 24 mov %esi,(%esp)
putc(fd, c);
749: 88 55 e7 mov %dl,-0x19(%ebp)
write(fd, &c, 1);
74c: e8 91 fd ff ff call 4e2 <write>
for(i = 0; fmt[i]; i++){
751: 0f b6 53 ff movzbl -0x1(%ebx),%edx
755: 84 d2 test %dl,%dl
757: 0f 85 6d ff ff ff jne 6ca <printf+0x5a>
75d: 8d 76 00 lea 0x0(%esi),%esi
}
}
}
760: 83 c4 3c add $0x3c,%esp
763: 5b pop %ebx
764: 5e pop %esi
765: 5f pop %edi
766: 5d pop %ebp
767: c3 ret
state = '%';
768: bf 25 00 00 00 mov $0x25,%edi
76d: e9 49 ff ff ff jmp 6bb <printf+0x4b>
772: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 10, 1);
778: c7 04 24 01 00 00 00 movl $0x1,(%esp)
77f: b9 0a 00 00 00 mov $0xa,%ecx
printint(fd, *ap, 16, 0);
784: 8b 45 d4 mov -0x2c(%ebp),%eax
state = 0;
787: 31 ff xor %edi,%edi
printint(fd, *ap, 16, 0);
789: 8b 10 mov (%eax),%edx
78b: 89 f0 mov %esi,%eax
78d: e8 3e fe ff ff call 5d0 <printint>
ap++;
792: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
796: e9 20 ff ff ff jmp 6bb <printf+0x4b>
79b: 90 nop
79c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
write(fd, &c, 1);
7a0: 8d 45 e1 lea -0x1f(%ebp),%eax
7a3: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
7aa: 00
7ab: 89 44 24 04 mov %eax,0x4(%esp)
7af: 89 34 24 mov %esi,(%esp)
7b2: c6 45 e1 30 movb $0x30,-0x1f(%ebp)
7b6: e8 27 fd ff ff call 4e2 <write>
7bb: 8d 45 e2 lea -0x1e(%ebp),%eax
7be: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
7c5: 00
7c6: 89 44 24 04 mov %eax,0x4(%esp)
7ca: 89 34 24 mov %esi,(%esp)
7cd: c6 45 e2 78 movb $0x78,-0x1e(%ebp)
7d1: e8 0c fd ff ff call 4e2 <write>
printint(fd, *ap, 16, 0);
7d6: b9 10 00 00 00 mov $0x10,%ecx
7db: c7 04 24 00 00 00 00 movl $0x0,(%esp)
7e2: eb a0 jmp 784 <printf+0x114>
7e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
7e8: 8b 45 d4 mov -0x2c(%ebp),%eax
ap++;
7eb: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
s = (char*)*ap;
7ef: 8b 38 mov (%eax),%edi
s = "(null)";
7f1: b8 28 0d 00 00 mov $0xd28,%eax
7f6: 85 ff test %edi,%edi
7f8: 0f 44 f8 cmove %eax,%edi
while(*s != 0){
7fb: 0f b6 07 movzbl (%edi),%eax
7fe: 84 c0 test %al,%al
800: 74 2a je 82c <printf+0x1bc>
802: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
808: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
80b: 8d 45 e3 lea -0x1d(%ebp),%eax
s++;
80e: 83 c7 01 add $0x1,%edi
write(fd, &c, 1);
811: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
818: 00
819: 89 44 24 04 mov %eax,0x4(%esp)
81d: 89 34 24 mov %esi,(%esp)
820: e8 bd fc ff ff call 4e2 <write>
while(*s != 0){
825: 0f b6 07 movzbl (%edi),%eax
828: 84 c0 test %al,%al
82a: 75 dc jne 808 <printf+0x198>
state = 0;
82c: 31 ff xor %edi,%edi
82e: e9 88 fe ff ff jmp 6bb <printf+0x4b>
putc(fd, *ap);
833: 8b 45 d4 mov -0x2c(%ebp),%eax
state = 0;
836: 31 ff xor %edi,%edi
putc(fd, *ap);
838: 8b 00 mov (%eax),%eax
write(fd, &c, 1);
83a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
841: 00
842: 89 34 24 mov %esi,(%esp)
putc(fd, *ap);
845: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
848: 8d 45 e4 lea -0x1c(%ebp),%eax
84b: 89 44 24 04 mov %eax,0x4(%esp)
84f: e8 8e fc ff ff call 4e2 <write>
ap++;
854: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
858: e9 5e fe ff ff jmp 6bb <printf+0x4b>
85d: 8d 76 00 lea 0x0(%esi),%esi
write(fd, &c, 1);
860: 8d 45 e5 lea -0x1b(%ebp),%eax
state = 0;
863: 31 ff xor %edi,%edi
write(fd, &c, 1);
865: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
86c: 00
86d: 89 44 24 04 mov %eax,0x4(%esp)
871: 89 34 24 mov %esi,(%esp)
874: c6 45 e5 25 movb $0x25,-0x1b(%ebp)
878: e8 65 fc ff ff call 4e2 <write>
87d: e9 39 fe ff ff jmp 6bb <printf+0x4b>
882: 66 90 xchg %ax,%ax
884: 66 90 xchg %ax,%ax
886: 66 90 xchg %ax,%ax
888: 66 90 xchg %ax,%ax
88a: 66 90 xchg %ax,%ax
88c: 66 90 xchg %ax,%ax
88e: 66 90 xchg %ax,%ax
00000890 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
890: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
891: a1 f0 11 00 00 mov 0x11f0,%eax
{
896: 89 e5 mov %esp,%ebp
898: 57 push %edi
899: 56 push %esi
89a: 53 push %ebx
89b: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
89e: 8b 08 mov (%eax),%ecx
bp = (Header*)ap - 1;
8a0: 8d 53 f8 lea -0x8(%ebx),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
8a3: 39 d0 cmp %edx,%eax
8a5: 72 11 jb 8b8 <free+0x28>
8a7: 90 nop
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
8a8: 39 c8 cmp %ecx,%eax
8aa: 72 04 jb 8b0 <free+0x20>
8ac: 39 ca cmp %ecx,%edx
8ae: 72 10 jb 8c0 <free+0x30>
8b0: 89 c8 mov %ecx,%eax
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
8b2: 39 d0 cmp %edx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
8b4: 8b 08 mov (%eax),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
8b6: 73 f0 jae 8a8 <free+0x18>
8b8: 39 ca cmp %ecx,%edx
8ba: 72 04 jb 8c0 <free+0x30>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
8bc: 39 c8 cmp %ecx,%eax
8be: 72 f0 jb 8b0 <free+0x20>
break;
if(bp + bp->s.size == p->s.ptr){
8c0: 8b 73 fc mov -0x4(%ebx),%esi
8c3: 8d 3c f2 lea (%edx,%esi,8),%edi
8c6: 39 cf cmp %ecx,%edi
8c8: 74 1e je 8e8 <free+0x58>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
8ca: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
8cd: 8b 48 04 mov 0x4(%eax),%ecx
8d0: 8d 34 c8 lea (%eax,%ecx,8),%esi
8d3: 39 f2 cmp %esi,%edx
8d5: 74 28 je 8ff <free+0x6f>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
8d7: 89 10 mov %edx,(%eax)
freep = p;
8d9: a3 f0 11 00 00 mov %eax,0x11f0
}
8de: 5b pop %ebx
8df: 5e pop %esi
8e0: 5f pop %edi
8e1: 5d pop %ebp
8e2: c3 ret
8e3: 90 nop
8e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
8e8: 03 71 04 add 0x4(%ecx),%esi
8eb: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
8ee: 8b 08 mov (%eax),%ecx
8f0: 8b 09 mov (%ecx),%ecx
8f2: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
8f5: 8b 48 04 mov 0x4(%eax),%ecx
8f8: 8d 34 c8 lea (%eax,%ecx,8),%esi
8fb: 39 f2 cmp %esi,%edx
8fd: 75 d8 jne 8d7 <free+0x47>
p->s.size += bp->s.size;
8ff: 03 4b fc add -0x4(%ebx),%ecx
freep = p;
902: a3 f0 11 00 00 mov %eax,0x11f0
p->s.size += bp->s.size;
907: 89 48 04 mov %ecx,0x4(%eax)
p->s.ptr = bp->s.ptr;
90a: 8b 53 f8 mov -0x8(%ebx),%edx
90d: 89 10 mov %edx,(%eax)
}
90f: 5b pop %ebx
910: 5e pop %esi
911: 5f pop %edi
912: 5d pop %ebp
913: c3 ret
914: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
91a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000920 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
920: 55 push %ebp
921: 89 e5 mov %esp,%ebp
923: 57 push %edi
924: 56 push %esi
925: 53 push %ebx
926: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
929: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
92c: 8b 1d f0 11 00 00 mov 0x11f0,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
932: 8d 48 07 lea 0x7(%eax),%ecx
935: c1 e9 03 shr $0x3,%ecx
if((prevp = freep) == 0){
938: 85 db test %ebx,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
93a: 8d 71 01 lea 0x1(%ecx),%esi
if((prevp = freep) == 0){
93d: 0f 84 9b 00 00 00 je 9de <malloc+0xbe>
943: 8b 13 mov (%ebx),%edx
945: 8b 7a 04 mov 0x4(%edx),%edi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
948: 39 fe cmp %edi,%esi
94a: 76 64 jbe 9b0 <malloc+0x90>
94c: 8d 04 f5 00 00 00 00 lea 0x0(,%esi,8),%eax
if(nu < 4096)
953: bb 00 80 00 00 mov $0x8000,%ebx
958: 89 45 e4 mov %eax,-0x1c(%ebp)
95b: eb 0e jmp 96b <malloc+0x4b>
95d: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
960: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
962: 8b 78 04 mov 0x4(%eax),%edi
965: 39 fe cmp %edi,%esi
967: 76 4f jbe 9b8 <malloc+0x98>
969: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
96b: 3b 15 f0 11 00 00 cmp 0x11f0,%edx
971: 75 ed jne 960 <malloc+0x40>
if(nu < 4096)
973: 8b 45 e4 mov -0x1c(%ebp),%eax
976: 81 fe 00 10 00 00 cmp $0x1000,%esi
97c: bf 00 10 00 00 mov $0x1000,%edi
981: 0f 43 fe cmovae %esi,%edi
984: 0f 42 c3 cmovb %ebx,%eax
p = sbrk(nu * sizeof(Header));
987: 89 04 24 mov %eax,(%esp)
98a: e8 bb fb ff ff call 54a <sbrk>
if(p == (char*)-1)
98f: 83 f8 ff cmp $0xffffffff,%eax
992: 74 18 je 9ac <malloc+0x8c>
hp->s.size = nu;
994: 89 78 04 mov %edi,0x4(%eax)
free((void*)(hp + 1));
997: 83 c0 08 add $0x8,%eax
99a: 89 04 24 mov %eax,(%esp)
99d: e8 ee fe ff ff call 890 <free>
return freep;
9a2: 8b 15 f0 11 00 00 mov 0x11f0,%edx
if((p = morecore(nunits)) == 0)
9a8: 85 d2 test %edx,%edx
9aa: 75 b4 jne 960 <malloc+0x40>
return 0;
9ac: 31 c0 xor %eax,%eax
9ae: eb 20 jmp 9d0 <malloc+0xb0>
if(p->s.size >= nunits){
9b0: 89 d0 mov %edx,%eax
9b2: 89 da mov %ebx,%edx
9b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
9b8: 39 fe cmp %edi,%esi
9ba: 74 1c je 9d8 <malloc+0xb8>
p->s.size -= nunits;
9bc: 29 f7 sub %esi,%edi
9be: 89 78 04 mov %edi,0x4(%eax)
p += p->s.size;
9c1: 8d 04 f8 lea (%eax,%edi,8),%eax
p->s.size = nunits;
9c4: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
9c7: 89 15 f0 11 00 00 mov %edx,0x11f0
return (void*)(p + 1);
9cd: 83 c0 08 add $0x8,%eax
}
}
9d0: 83 c4 1c add $0x1c,%esp
9d3: 5b pop %ebx
9d4: 5e pop %esi
9d5: 5f pop %edi
9d6: 5d pop %ebp
9d7: c3 ret
prevp->s.ptr = p->s.ptr;
9d8: 8b 08 mov (%eax),%ecx
9da: 89 0a mov %ecx,(%edx)
9dc: eb e9 jmp 9c7 <malloc+0xa7>
base.s.ptr = freep = prevp = &base;
9de: c7 05 f0 11 00 00 f4 movl $0x11f4,0x11f0
9e5: 11 00 00
base.s.size = 0;
9e8: ba f4 11 00 00 mov $0x11f4,%edx
base.s.ptr = freep = prevp = &base;
9ed: c7 05 f4 11 00 00 f4 movl $0x11f4,0x11f4
9f4: 11 00 00
base.s.size = 0;
9f7: c7 05 f8 11 00 00 00 movl $0x0,0x11f8
9fe: 00 00 00
a01: e9 46 ff ff ff jmp 94c <malloc+0x2c>
a06: 66 90 xchg %ax,%ax
a08: 66 90 xchg %ax,%ax
a0a: 66 90 xchg %ax,%ax
a0c: 66 90 xchg %ax,%ax
a0e: 66 90 xchg %ax,%ax
00000a10 <benny_thread_create>:
static struct benny_thread_s *bt_new(void);
int
benny_thread_create(benny_thread_t *abt, void (*func)(void*), void *arg_ptr)
{
a10: 55 push %ebp
a11: 89 e5 mov %esp,%ebp
a13: 56 push %esi
a14: 53 push %ebx
a15: 83 ec 10 sub $0x10,%esp
}
static struct benny_thread_s *
bt_new(void)
{
struct benny_thread_s *bt = malloc(sizeof(struct benny_thread_s));
a18: c7 04 24 0c 00 00 00 movl $0xc,(%esp)
a1f: e8 fc fe ff ff call 920 <malloc>
if (bt == NULL) {
a24: 85 c0 test %eax,%eax
struct benny_thread_s *bt = malloc(sizeof(struct benny_thread_s));
a26: 89 c6 mov %eax,%esi
if (bt == NULL) {
a28: 74 66 je a90 <benny_thread_create+0x80>
// allocate 2 pages worth of memory and then make sure the
// beginning address used for the stack is page alligned.
// we want it page alligned so that we don't generate a
// page fault by accessing the stack for a thread.
bt->bt_stack = bt->mem_stack = malloc(PGSIZE * 2);
a2a: c7 04 24 00 20 00 00 movl $0x2000,(%esp)
a31: e8 ea fe ff ff call 920 <malloc>
if (bt->bt_stack == NULL) {
a36: 85 c0 test %eax,%eax
bt->bt_stack = bt->mem_stack = malloc(PGSIZE * 2);
a38: 89 c3 mov %eax,%ebx
a3a: 89 46 08 mov %eax,0x8(%esi)
a3d: 89 46 04 mov %eax,0x4(%esi)
if (bt->bt_stack == NULL) {
a40: 74 5d je a9f <benny_thread_create+0x8f>
free(bt);
return NULL;
}
if (((uint) bt->bt_stack) % PGSIZE != 0) {
a42: 25 ff 0f 00 00 and $0xfff,%eax
a47: 75 37 jne a80 <benny_thread_create+0x70>
// allign the thread stack to a page boundary
bt->bt_stack += (PGSIZE - ((uint) bt->bt_stack) % PGSIZE);
}
bt->bid = -1;
a49: c7 06 ff ff ff ff movl $0xffffffff,(%esi)
bt->bid = kthread_create(func, arg_ptr, bt->bt_stack);
a4f: 8b 45 10 mov 0x10(%ebp),%eax
a52: 89 5c 24 08 mov %ebx,0x8(%esp)
a56: 89 44 24 04 mov %eax,0x4(%esp)
a5a: 8b 45 0c mov 0xc(%ebp),%eax
a5d: 89 04 24 mov %eax,(%esp)
a60: e8 25 fb ff ff call 58a <kthread_create>
if (bt->bid != 0) {
a65: 85 c0 test %eax,%eax
bt->bid = kthread_create(func, arg_ptr, bt->bt_stack);
a67: 89 06 mov %eax,(%esi)
if (bt->bid != 0) {
a69: 74 2d je a98 <benny_thread_create+0x88>
*abt = (benny_thread_t) bt;
a6b: 8b 45 08 mov 0x8(%ebp),%eax
a6e: 89 30 mov %esi,(%eax)
result = 0;
a70: 31 c0 xor %eax,%eax
}
a72: 83 c4 10 add $0x10,%esp
a75: 5b pop %ebx
a76: 5e pop %esi
a77: 5d pop %ebp
a78: c3 ret
a79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
bt->bt_stack += (PGSIZE - ((uint) bt->bt_stack) % PGSIZE);
a80: 29 c3 sub %eax,%ebx
a82: 81 c3 00 10 00 00 add $0x1000,%ebx
a88: 89 5e 04 mov %ebx,0x4(%esi)
a8b: eb bc jmp a49 <benny_thread_create+0x39>
a8d: 8d 76 00 lea 0x0(%esi),%esi
a90: 8b 1d 04 00 00 00 mov 0x4,%ebx
a96: eb b7 jmp a4f <benny_thread_create+0x3f>
int result = -1;
a98: b8 ff ff ff ff mov $0xffffffff,%eax
a9d: eb d3 jmp a72 <benny_thread_create+0x62>
free(bt);
a9f: 89 34 24 mov %esi,(%esp)
return NULL;
aa2: 31 f6 xor %esi,%esi
free(bt);
aa4: e8 e7 fd ff ff call 890 <free>
aa9: 8b 5b 04 mov 0x4(%ebx),%ebx
aac: eb a1 jmp a4f <benny_thread_create+0x3f>
aae: 66 90 xchg %ax,%ax
00000ab0 <benny_thread_bid>:
{
ab0: 55 push %ebp
ab1: 89 e5 mov %esp,%ebp
return bt->bid;
ab3: 8b 45 08 mov 0x8(%ebp),%eax
}
ab6: 5d pop %ebp
return bt->bid;
ab7: 8b 00 mov (%eax),%eax
}
ab9: c3 ret
aba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000ac0 <benny_thread_join>:
{
ac0: 55 push %ebp
ac1: 89 e5 mov %esp,%ebp
ac3: 53 push %ebx
ac4: 83 ec 14 sub $0x14,%esp
ac7: 8b 5d 08 mov 0x8(%ebp),%ebx
retVal = kthread_join(bt->bid);
aca: 8b 03 mov (%ebx),%eax
acc: 89 04 24 mov %eax,(%esp)
acf: e8 be fa ff ff call 592 <kthread_join>
if (retVal == 0) {
ad4: 85 c0 test %eax,%eax
ad6: 75 27 jne aff <benny_thread_join+0x3f>
free(bt->mem_stack);
ad8: 8b 53 08 mov 0x8(%ebx),%edx
adb: 89 45 f4 mov %eax,-0xc(%ebp)
ade: 89 14 24 mov %edx,(%esp)
ae1: e8 aa fd ff ff call 890 <free>
bt->bt_stack = bt->mem_stack = NULL;
ae6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
aed: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
free(bt);
af4: 89 1c 24 mov %ebx,(%esp)
af7: e8 94 fd ff ff call 890 <free>
afc: 8b 45 f4 mov -0xc(%ebp),%eax
}
aff: 83 c4 14 add $0x14,%esp
b02: 5b pop %ebx
b03: 5d pop %ebp
b04: c3 ret
b05: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
b09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000b10 <benny_thread_exit>:
{
b10: 55 push %ebp
b11: 89 e5 mov %esp,%ebp
}
b13: 5d pop %ebp
return kthread_exit(exitValue);
b14: e9 81 fa ff ff jmp 59a <kthread_exit>
b19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000b20 <benny_mootex_init>:
}
# ifdef BENNY_MOOTEX
int
benny_mootex_init(benny_mootex_t *benny_mootex)
{
b20: 55 push %ebp
b21: 89 e5 mov %esp,%ebp
b23: 8b 45 08 mov 0x8(%ebp),%eax
benny_mootex->locked = 0;
b26: c7 00 00 00 00 00 movl $0x0,(%eax)
benny_mootex->bid = -1;
b2c: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax)
return 0;
}
b33: 31 c0 xor %eax,%eax
b35: 5d pop %ebp
b36: c3 ret
b37: 89 f6 mov %esi,%esi
b39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000b40 <benny_mootex_yieldlock>:
int
benny_mootex_yieldlock(benny_mootex_t *benny_mootex)
{
b40: 55 push %ebp
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
b41: b8 01 00 00 00 mov $0x1,%eax
b46: 89 e5 mov %esp,%ebp
b48: 56 push %esi
b49: 53 push %ebx
b4a: 8b 5d 08 mov 0x8(%ebp),%ebx
b4d: f0 87 03 lock xchg %eax,(%ebx)
// #error this is the call to lock the mootex that will yield in a
// #error loop until the lock is acquired.
while(xchg(&benny_mootex->locked, 1) != 0){
b50: 85 c0 test %eax,%eax
b52: be 01 00 00 00 mov $0x1,%esi
b57: 74 15 je b6e <benny_mootex_yieldlock+0x2e>
b59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
benny_yield(void)
{
// # error This just gives up the rest of this scheduled time slice to
// # error another process/thread.
return kthread_yield();
b60: e8 45 fa ff ff call 5aa <kthread_yield>
b65: 89 f0 mov %esi,%eax
b67: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&benny_mootex->locked, 1) != 0){
b6a: 85 c0 test %eax,%eax
b6c: 75 f2 jne b60 <benny_mootex_yieldlock+0x20>
return kthread_self();
b6e: e8 2f fa ff ff call 5a2 <kthread_self>
benny_mootex->bid = benny_self();
b73: 89 43 04 mov %eax,0x4(%ebx)
}
b76: 31 c0 xor %eax,%eax
b78: 5b pop %ebx
b79: 5e pop %esi
b7a: 5d pop %ebp
b7b: c3 ret
b7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000b80 <benny_mootex_spinlock>:
{
b80: 55 push %ebp
b81: ba 01 00 00 00 mov $0x1,%edx
b86: 89 e5 mov %esp,%ebp
b88: 53 push %ebx
b89: 83 ec 04 sub $0x4,%esp
b8c: 8b 5d 08 mov 0x8(%ebp),%ebx
b8f: 90 nop
b90: 89 d0 mov %edx,%eax
b92: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&benny_mootex->locked, 1) != 0){
b95: 85 c0 test %eax,%eax
b97: 75 f7 jne b90 <benny_mootex_spinlock+0x10>
return kthread_self();
b99: e8 04 fa ff ff call 5a2 <kthread_self>
benny_mootex->bid = benny_self();
b9e: 89 43 04 mov %eax,0x4(%ebx)
}
ba1: 83 c4 04 add $0x4,%esp
ba4: 31 c0 xor %eax,%eax
ba6: 5b pop %ebx
ba7: 5d pop %ebp
ba8: c3 ret
ba9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000bb0 <benny_mootex_unlock>:
{
bb0: 55 push %ebp
bb1: 89 e5 mov %esp,%ebp
bb3: 53 push %ebx
bb4: 83 ec 04 sub $0x4,%esp
bb7: 8b 5d 08 mov 0x8(%ebp),%ebx
return kthread_self();
bba: e8 e3 f9 ff ff call 5a2 <kthread_self>
if(tid == benny_mootex->bid){
bbf: 39 43 04 cmp %eax,0x4(%ebx)
bc2: 75 1c jne be0 <benny_mootex_unlock+0x30>
__sync_synchronize();
bc4: 0f ae f0 mfence
return 0;
bc7: 31 c0 xor %eax,%eax
benny_mootex->bid = -1;
bc9: c7 43 04 ff ff ff ff movl $0xffffffff,0x4(%ebx)
__sync_lock_release(&benny_mootex->locked);
bd0: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
bd6: 83 c4 04 add $0x4,%esp
bd9: 5b pop %ebx
bda: 5d pop %ebp
bdb: c3 ret
bdc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
be0: 83 c4 04 add $0x4,%esp
return -1;
be3: b8 ff ff ff ff mov $0xffffffff,%eax
}
be8: 5b pop %ebx
be9: 5d pop %ebp
bea: c3 ret
beb: 90 nop
bec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000bf0 <benny_mootex_trylock>:
{
bf0: 55 push %ebp
bf1: b8 01 00 00 00 mov $0x1,%eax
bf6: 89 e5 mov %esp,%ebp
bf8: 53 push %ebx
bf9: 83 ec 04 sub $0x4,%esp
bfc: 8b 5d 08 mov 0x8(%ebp),%ebx
bff: f0 87 03 lock xchg %eax,(%ebx)
if(xchg(&benny_mootex->locked, 1) != 0){
c02: 85 c0 test %eax,%eax
c04: 75 08 jne c0e <benny_mootex_trylock+0x1e>
int tid = kthread_self();
c06: e8 97 f9 ff ff call 5a2 <kthread_self>
benny_mootex->bid = tid;
c0b: 89 43 04 mov %eax,0x4(%ebx)
}
c0e: 83 c4 04 add $0x4,%esp
c11: b8 ff ff ff ff mov $0xffffffff,%eax
c16: 5b pop %ebx
c17: 5d pop %ebp
c18: c3 ret
c19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000c20 <benny_mootex_wholock>:
{
c20: 55 push %ebp
c21: 89 e5 mov %esp,%ebp
return benny_mootex->bid;
c23: 8b 45 08 mov 0x8(%ebp),%eax
}
c26: 5d pop %ebp
return benny_mootex->bid;
c27: 8b 40 04 mov 0x4(%eax),%eax
}
c2a: c3 ret
c2b: 90 nop
c2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000c30 <benny_mootex_islocked>:
{
c30: 55 push %ebp
c31: 89 e5 mov %esp,%ebp
return benny_mootex->locked;
c33: 8b 45 08 mov 0x8(%ebp),%eax
}
c36: 5d pop %ebp
return benny_mootex->locked;
c37: 8b 00 mov (%eax),%eax
}
c39: c3 ret
c3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000c40 <benny_self>:
{
c40: 55 push %ebp
c41: 89 e5 mov %esp,%ebp
}
c43: 5d pop %ebp
return kthread_self();
c44: e9 59 f9 ff ff jmp 5a2 <kthread_self>
c49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000c50 <benny_yield>:
{
c50: 55 push %ebp
c51: 89 e5 mov %esp,%ebp
}
c53: 5d pop %ebp
return kthread_yield();
c54: e9 51 f9 ff ff jmp 5aa <kthread_yield>
c59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000c60 <benny_cpu_count>:
int
benny_cpu_count(void)
{
c60: 55 push %ebp
c61: 89 e5 mov %esp,%ebp
// # error call the kthread_cpu_count() function.
// kthread_cpu_count();
return kthread_cpu_count();
}
c63: 5d pop %ebp
return kthread_cpu_count();
c64: e9 49 f9 ff ff jmp 5b2 <kthread_cpu_count>
c69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000c70 <benny_thread_count>:
int
benny_thread_count(void)
{
c70: 55 push %ebp
c71: 89 e5 mov %esp,%ebp
// # error call the kthread_thread_count() function.
// kthread_thread_count()
return kthread_thread_count();
}
c73: 5d pop %ebp
return kthread_thread_count();
c74: e9 41 f9 ff ff jmp 5ba <kthread_thread_count>
|
extras/asm/flag_test.asm | crmaykish/easy80 | 0 | 24219 | <reponame>crmaykish/easy80
; Flag testing
org &8000
LD A,&FA
LD B,&0F
ADD B
HALT
|
source/amf/uml/amf-internals-uml_combined_fragments.ads | svn2github/matreshka | 24 | 20065 | <reponame>svn2github/matreshka
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Named_Elements;
with AMF.UML.Combined_Fragments;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Gates.Collections;
with AMF.UML.General_Orderings.Collections;
with AMF.UML.Interaction_Operands.Collections;
with AMF.UML.Interactions;
with AMF.UML.Lifelines.Collections;
with AMF.UML.Named_Elements;
with AMF.UML.Namespaces;
with AMF.UML.Packages.Collections;
with AMF.UML.String_Expressions;
with AMF.Visitors;
package AMF.Internals.UML_Combined_Fragments is
type UML_Combined_Fragment_Proxy is
limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
and AMF.UML.Combined_Fragments.UML_Combined_Fragment with null record;
overriding function Get_Cfragment_Gate
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Gates.Collections.Set_Of_UML_Gate;
-- Getter of CombinedFragment::cfragmentGate.
--
-- Specifies the gates that form the interface between this
-- CombinedFragment and its surroundings
overriding function Get_Interaction_Operator
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.UML_Interaction_Operator_Kind;
-- Getter of CombinedFragment::interactionOperator.
--
-- Specifies the operation which defines the semantics of this combination
-- of InteractionFragments.
overriding procedure Set_Interaction_Operator
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.UML_Interaction_Operator_Kind);
-- Setter of CombinedFragment::interactionOperator.
--
-- Specifies the operation which defines the semantics of this combination
-- of InteractionFragments.
overriding function Get_Operand
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interaction_Operands.Collections.Ordered_Set_Of_UML_Interaction_Operand;
-- Getter of CombinedFragment::operand.
--
-- The set of operands of the combined fragment.
overriding function Get_Covered
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline;
-- Getter of InteractionFragment::covered.
--
-- References the Lifelines that the InteractionFragment involves.
overriding function Get_Enclosing_Interaction
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interactions.UML_Interaction_Access;
-- Getter of InteractionFragment::enclosingInteraction.
--
-- The Interaction enclosing this InteractionFragment.
overriding procedure Set_Enclosing_Interaction
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.Interactions.UML_Interaction_Access);
-- Setter of InteractionFragment::enclosingInteraction.
--
-- The Interaction enclosing this InteractionFragment.
overriding function Get_Enclosing_Operand
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access;
-- Getter of InteractionFragment::enclosingOperand.
--
-- The operand enclosing this InteractionFragment (they may nest
-- recursively)
overriding procedure Set_Enclosing_Operand
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access);
-- Setter of InteractionFragment::enclosingOperand.
--
-- The operand enclosing this InteractionFragment (they may nest
-- recursively)
overriding function Get_General_Ordering
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.General_Orderings.Collections.Set_Of_UML_General_Ordering;
-- Getter of InteractionFragment::generalOrdering.
--
-- The general ordering relationships contained in this fragment.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function All_Owning_Packages
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Combined_Fragment_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding procedure Enter_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Combined_Fragments;
|
libsrc/_DEVELOPMENT/l/sccz80/9-common/i32/l_long_rl_mde.asm | ahjelm/z88dk | 4 | 240765 | <gh_stars>1-10
; Z88 Small C+ Run Time Library
; Long functions
;
; feilipu 10/2021
SECTION code_clib
SECTION code_l_sccz80
PUBLIC l_long_rl_mde
;primary = primary<<1
;enter with primary in (de)
.l_long_rl_mde
ld a,(de)
rla
ld (de),a
inc de
ld a,(de)
rla
ld (de),a
inc de
ld a,(de)
rla
ld (de),a
inc de
ld a,(de)
rla
ld (de),a
ret
|
programs/oeis/059/A059952.asm | neoneye/loda | 22 | 96991 | <reponame>neoneye/loda
; A059952: Ordering of a deck of 52 cards after an in-shuffle.
; 27,1,28,2,29,3,30,4,31,5,32,6,33,7,34,8,35,9,36,10,37,11,38,12,39,13,40,14,41,15,42,16,43,17,44,18,45,19,46,20,47,21,48,22,49,23,50,24,51,25,52,26
trn $2,$0
add $2,2
sub $0,$2
mov $1,$0
gcd $1,2
sub $2,55
mul $1,$2
sub $0,$1
div $0,2
sub $0,25
|
test/interaction/Issue3130Split.agda | cruhland/agda | 1,989 | 2275 | <filename>test/interaction/Issue3130Split.agda
-- Andreas, 2018-06-19, issue #3130
-- Produce parenthesized dot pattern .(p) instead of .p
-- when is a projection.
-- {-# OPTIONS -v reify.pat:80 #-}
record R : Set₁ where
field p : Set
open R
data D : (R → Set) → Set₁ where
c : D p
test : (f : R → Set) (x : D f) → Set₁
test f x = {!x!} -- split on x
-- Expected:
-- test .(p) c = ?
|
tent.adb | ssebastianoo/Tent | 3 | 24096 | <filename>tent.adb<gh_stars>1-10
with Ada.Text_IO; use Ada.Text_IO;
procedure Tent is
begin
Put_Line(" _____________________");
Put_Line(" / / \\ z");
Put_Line(" / / \\ z");
Put_Line(" / / \\ z");
Put_Line("/ / \\ z");
Put_Line("___________________/---------\\");
Put_Line(" ");
end Tent;
|
libsrc/_DEVELOPMENT/adt/bv_stack/c/sccz80/bv_stack_destroy.asm | jpoikela/z88dk | 640 | 170390 |
; void bv_stack_destroy(bv_stack_t *s)
SECTION code_clib
SECTION code_adt_bv_stack
PUBLIC bv_stack_destroy
EXTERN asm_bv_stack_destroy
defc bv_stack_destroy = asm_bv_stack_destroy
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _bv_stack_destroy
defc _bv_stack_destroy = bv_stack_destroy
ENDIF
|
src/AbsoluteGraphicsPlatform.AGPx.DSS/Grammar/DssParser.g4 | evorine/AbsoluteGraphicsPlatform | 0 | 7162 | <gh_stars>0
/*
* Licensed under the MIT license.
* See the LICENSE file in the project root for more information.
*/
parser grammar DssParser;
options {
tokenVocab = DssLexer;
}
stylesheet
: statement*
;
statement
: ruleset
| propertyStatement
| asignmentStatement
;
ruleset
: selector block
;
block
: '{' statement* '}'
;
selector
: selectorPart
//(selectorSeparatorType selectorPart)*
;
selectorPart
: COMPONENT=identifier
| (HASH NAME=identifier)
| (DOT CLASS=identifier)
;
identifier
: IDENTIFIER
;
propertyStatement
: propertyKey ':' propertyValue ';'
;
propertyKey
: identifier ('.' SUBKEY=identifier)?
;
propertyValue
: expression+
;
asignmentStatement
: variable ':' propertyValue ';'
;
expression
: '(' expression ')'
| LEFT=expression OP=('*'|'/'|'%') RIGHT=expression
| LEFT=expression OP=('+'|'-') RIGHT=expression
| LEFT=expression OP=('<=' | '>=' | '>' | '<') RIGHT=expression
| LEFT=expression OP=('==' | '!=') RIGHT=expression
| literal
| variable
;
literal
: NUMBER UNIT
| NUMBER
| color
| list
| NULL
| NONE
| OTHER=IDENTIFIER
;
list
: listRanged
| listWithValues
;
listRanged: '{' FROM=NUMBER '...' TO=NUMBER '}';
listWithValues: '{' literal (',' literal)? '}';
color
: '#' HEXADECIMAL HEXADECIMAL HEXADECIMAL HEXADECIMAL HEXADECIMAL HEXADECIMAL
;
variable
: '$' IDENTIFIER
;
|
Src/BE6502/blink.asm | rprouse/65C02_SBC | 0 | 82835 | .setcpu "65C02"
.segment "OS"
.org $8000
reset:
lda #$ff
sta $6002
lda #$50
sta $6000
loop:
ror
sta $6000
jmp loop
nmi:
jmp nmi
irq_brk:
jmp irq_brk
.segment "VECTORS"
.org $FFFA
.word nmi
.word reset
.word irq_brk |
llvm/test/tools/llvm-ml/variable_redef_errors.asm | mkinsner/llvm | 2,338 | 94223 | <gh_stars>1000+
; RUN: not llvm-ml -filetype=s %s /Fo - 2>&1 | FileCheck %s --implicit-check-not=error:
.data
; <var> EQU <expression> can't be redefined to a new value
equated_number equ 3
; CHECK: :[[# @LINE + 1]]:21: error: invalid variable redefinition
equated_number equ 4
; CHECK: :[[# @LINE + 1]]:1: error: cannot redefine a built-in symbol
@Line equ 5
; CHECK: :[[# @LINE + 1]]:1: error: cannot redefine a built-in symbol
@Version equ 6
.code
end
|
Sources/Globe_3d/gl/gl-frustums.ads | ForYouEyesOnly/Space-Convoy | 1 | 2493 | -------------------------------------------------------------------------
-- GL.Frustum
--
-- Copyright (c) <NAME>/<NAME> 2001 .. 2007
-- CH - 8810 Horgen
-- SWITZERLAND
--
-- Permission granted to:
-- 1/ use this library, without any warranty, for any purpose;
-- 2/ modify this library's sources (specification, body of this
-- package and of child packages on which it depends) in any
-- way, with an appropriate commenting of changes;
-- 3/ copy and distribute this library's sources without restriction,
-- provided this copyright note remains attached and unmodified.
-------------------------------------------------------------------------
with GL.Geometry;
package GL.Frustums is
type plane_Id is (Left, Right, High, Low, Near, Far);
type plane_Array is array (plane_Id) of GL.Geometry.Plane;
procedure Normalise (the_Planes : in out plane_Array);
function Current_Planes return plane_Array;
--
-- returns the frustum planes calculated from the current GL projection and modelview matrices.
end GL.Frustums;
|
programs/oeis/185/A185270.asm | neoneye/loda | 22 | 19468 | ; A185270: a(n) = 648 * n^6.
; 0,648,41472,472392,2654208,10125000,30233088,76236552,169869312,344373768,648000000,1147971528,1934917632,3127772232,4879139328,7381125000,10871635968,15641144712,22039921152,30485730888,41472000000,55576446408,73470177792,95927256072,123834728448,158203125000,200177422848,251048476872,312264916992,385445512008,472392000000,575102385288,695784701952,836871243912,1001033261568,1191196125000,1410554953728,1662590713032,1951086776832,2280145957128,2654208000000,3078067548168,3556892570112,4096243255752,4702091378688,5380840125000,6139344388608,6984931533192,7925422620672,8969154106248,10125000000000,11402394495048,12811355062272,14362506011592,16067102519808,17937055125000,19984954687488,22224097817352,24668512768512,27332985799368,30233088000000,33385202585928,36806552658432,40515229431432,44530220924928,48871441125000,53559759610368,58617031645512,64066128740352,69930969676488,76236552000000,83008983980808,90275517038592,98064578635272,106405805634048,115330078125000,124869553717248,135057702297672,145929341256192,157520671177608,169869312000000,183014339639688,196996323082752,211857361943112,227641124487168,244392886125000,262159568368128,280989778253832,300933848236032,322043876542728,344373768000000,367979275322568,392918040870912,419249638874952,447035618124288,476339545125000,507227047723008,539765859193992,574025862799872,610079136811848
pow $0,6
mul $0,648
|
test/bugs/RecursiveRecord.agda | alhassy/agda | 3 | 8492 | -- Make the type checker loop. How can we ensure that the record is not
-- recursive?
module RecursiveRecord where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
F : Set -> Set
F _ = R
where
record R : Set where
field x : F Nat
r : F Nat
r = _
|
generated-src/win-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.asm | jylama99/aws-lc | 0 | 164257 | ; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.
default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
%ifdef BORINGSSL_PREFIX
%include "boringssl_prefix_symbols_nasm.inc"
%endif
section .text code align=64
ALIGN 32
_aesni_ctr32_ghash_6x:
vmovdqu xmm2,XMMWORD[32+r11]
sub rdx,6
vpxor xmm4,xmm4,xmm4
vmovdqu xmm15,XMMWORD[((0-128))+rcx]
vpaddb xmm10,xmm1,xmm2
vpaddb xmm11,xmm10,xmm2
vpaddb xmm12,xmm11,xmm2
vpaddb xmm13,xmm12,xmm2
vpaddb xmm14,xmm13,xmm2
vpxor xmm9,xmm1,xmm15
vmovdqu XMMWORD[(16+8)+rsp],xmm4
jmp NEAR $L$oop6x
ALIGN 32
$L$oop6x:
add ebx,100663296
jc NEAR $L$handle_ctr32
vmovdqu xmm3,XMMWORD[((0-32))+r9]
vpaddb xmm1,xmm14,xmm2
vpxor xmm10,xmm10,xmm15
vpxor xmm11,xmm11,xmm15
$L$resume_ctr32:
vmovdqu XMMWORD[r8],xmm1
vpclmulqdq xmm5,xmm7,xmm3,0x10
vpxor xmm12,xmm12,xmm15
vmovups xmm2,XMMWORD[((16-128))+rcx]
vpclmulqdq xmm6,xmm7,xmm3,0x01
xor r12,r12
cmp r15,r14
vaesenc xmm9,xmm9,xmm2
vmovdqu xmm0,XMMWORD[((48+8))+rsp]
vpxor xmm13,xmm13,xmm15
vpclmulqdq xmm1,xmm7,xmm3,0x00
vaesenc xmm10,xmm10,xmm2
vpxor xmm14,xmm14,xmm15
setnc r12b
vpclmulqdq xmm7,xmm7,xmm3,0x11
vaesenc xmm11,xmm11,xmm2
vmovdqu xmm3,XMMWORD[((16-32))+r9]
neg r12
vaesenc xmm12,xmm12,xmm2
vpxor xmm6,xmm6,xmm5
vpclmulqdq xmm5,xmm0,xmm3,0x00
vpxor xmm8,xmm8,xmm4
vaesenc xmm13,xmm13,xmm2
vpxor xmm4,xmm1,xmm5
and r12,0x60
vmovups xmm15,XMMWORD[((32-128))+rcx]
vpclmulqdq xmm1,xmm0,xmm3,0x10
vaesenc xmm14,xmm14,xmm2
vpclmulqdq xmm2,xmm0,xmm3,0x01
lea r14,[r12*1+r14]
vaesenc xmm9,xmm9,xmm15
vpxor xmm8,xmm8,XMMWORD[((16+8))+rsp]
vpclmulqdq xmm3,xmm0,xmm3,0x11
vmovdqu xmm0,XMMWORD[((64+8))+rsp]
vaesenc xmm10,xmm10,xmm15
movbe r13,QWORD[88+r14]
vaesenc xmm11,xmm11,xmm15
movbe r12,QWORD[80+r14]
vaesenc xmm12,xmm12,xmm15
mov QWORD[((32+8))+rsp],r13
vaesenc xmm13,xmm13,xmm15
mov QWORD[((40+8))+rsp],r12
vmovdqu xmm5,XMMWORD[((48-32))+r9]
vaesenc xmm14,xmm14,xmm15
vmovups xmm15,XMMWORD[((48-128))+rcx]
vpxor xmm6,xmm6,xmm1
vpclmulqdq xmm1,xmm0,xmm5,0x00
vaesenc xmm9,xmm9,xmm15
vpxor xmm6,xmm6,xmm2
vpclmulqdq xmm2,xmm0,xmm5,0x10
vaesenc xmm10,xmm10,xmm15
vpxor xmm7,xmm7,xmm3
vpclmulqdq xmm3,xmm0,xmm5,0x01
vaesenc xmm11,xmm11,xmm15
vpclmulqdq xmm5,xmm0,xmm5,0x11
vmovdqu xmm0,XMMWORD[((80+8))+rsp]
vaesenc xmm12,xmm12,xmm15
vaesenc xmm13,xmm13,xmm15
vpxor xmm4,xmm4,xmm1
vmovdqu xmm1,XMMWORD[((64-32))+r9]
vaesenc xmm14,xmm14,xmm15
vmovups xmm15,XMMWORD[((64-128))+rcx]
vpxor xmm6,xmm6,xmm2
vpclmulqdq xmm2,xmm0,xmm1,0x00
vaesenc xmm9,xmm9,xmm15
vpxor xmm6,xmm6,xmm3
vpclmulqdq xmm3,xmm0,xmm1,0x10
vaesenc xmm10,xmm10,xmm15
movbe r13,QWORD[72+r14]
vpxor xmm7,xmm7,xmm5
vpclmulqdq xmm5,xmm0,xmm1,0x01
vaesenc xmm11,xmm11,xmm15
movbe r12,QWORD[64+r14]
vpclmulqdq xmm1,xmm0,xmm1,0x11
vmovdqu xmm0,XMMWORD[((96+8))+rsp]
vaesenc xmm12,xmm12,xmm15
mov QWORD[((48+8))+rsp],r13
vaesenc xmm13,xmm13,xmm15
mov QWORD[((56+8))+rsp],r12
vpxor xmm4,xmm4,xmm2
vmovdqu xmm2,XMMWORD[((96-32))+r9]
vaesenc xmm14,xmm14,xmm15
vmovups xmm15,XMMWORD[((80-128))+rcx]
vpxor xmm6,xmm6,xmm3
vpclmulqdq xmm3,xmm0,xmm2,0x00
vaesenc xmm9,xmm9,xmm15
vpxor xmm6,xmm6,xmm5
vpclmulqdq xmm5,xmm0,xmm2,0x10
vaesenc xmm10,xmm10,xmm15
movbe r13,QWORD[56+r14]
vpxor xmm7,xmm7,xmm1
vpclmulqdq xmm1,xmm0,xmm2,0x01
vpxor xmm8,xmm8,XMMWORD[((112+8))+rsp]
vaesenc xmm11,xmm11,xmm15
movbe r12,QWORD[48+r14]
vpclmulqdq xmm2,xmm0,xmm2,0x11
vaesenc xmm12,xmm12,xmm15
mov QWORD[((64+8))+rsp],r13
vaesenc xmm13,xmm13,xmm15
mov QWORD[((72+8))+rsp],r12
vpxor xmm4,xmm4,xmm3
vmovdqu xmm3,XMMWORD[((112-32))+r9]
vaesenc xmm14,xmm14,xmm15
vmovups xmm15,XMMWORD[((96-128))+rcx]
vpxor xmm6,xmm6,xmm5
vpclmulqdq xmm5,xmm8,xmm3,0x10
vaesenc xmm9,xmm9,xmm15
vpxor xmm6,xmm6,xmm1
vpclmulqdq xmm1,xmm8,xmm3,0x01
vaesenc xmm10,xmm10,xmm15
movbe r13,QWORD[40+r14]
vpxor xmm7,xmm7,xmm2
vpclmulqdq xmm2,xmm8,xmm3,0x00
vaesenc xmm11,xmm11,xmm15
movbe r12,QWORD[32+r14]
vpclmulqdq xmm8,xmm8,xmm3,0x11
vaesenc xmm12,xmm12,xmm15
mov QWORD[((80+8))+rsp],r13
vaesenc xmm13,xmm13,xmm15
mov QWORD[((88+8))+rsp],r12
vpxor xmm6,xmm6,xmm5
vaesenc xmm14,xmm14,xmm15
vpxor xmm6,xmm6,xmm1
vmovups xmm15,XMMWORD[((112-128))+rcx]
vpslldq xmm5,xmm6,8
vpxor xmm4,xmm4,xmm2
vmovdqu xmm3,XMMWORD[16+r11]
vaesenc xmm9,xmm9,xmm15
vpxor xmm7,xmm7,xmm8
vaesenc xmm10,xmm10,xmm15
vpxor xmm4,xmm4,xmm5
movbe r13,QWORD[24+r14]
vaesenc xmm11,xmm11,xmm15
movbe r12,QWORD[16+r14]
vpalignr xmm0,xmm4,xmm4,8
vpclmulqdq xmm4,xmm4,xmm3,0x10
mov QWORD[((96+8))+rsp],r13
vaesenc xmm12,xmm12,xmm15
mov QWORD[((104+8))+rsp],r12
vaesenc xmm13,xmm13,xmm15
vmovups xmm1,XMMWORD[((128-128))+rcx]
vaesenc xmm14,xmm14,xmm15
vaesenc xmm9,xmm9,xmm1
vmovups xmm15,XMMWORD[((144-128))+rcx]
vaesenc xmm10,xmm10,xmm1
vpsrldq xmm6,xmm6,8
vaesenc xmm11,xmm11,xmm1
vpxor xmm7,xmm7,xmm6
vaesenc xmm12,xmm12,xmm1
vpxor xmm4,xmm4,xmm0
movbe r13,QWORD[8+r14]
vaesenc xmm13,xmm13,xmm1
movbe r12,QWORD[r14]
vaesenc xmm14,xmm14,xmm1
vmovups xmm1,XMMWORD[((160-128))+rcx]
cmp ebp,11
jb NEAR $L$enc_tail
vaesenc xmm9,xmm9,xmm15
vaesenc xmm10,xmm10,xmm15
vaesenc xmm11,xmm11,xmm15
vaesenc xmm12,xmm12,xmm15
vaesenc xmm13,xmm13,xmm15
vaesenc xmm14,xmm14,xmm15
vaesenc xmm9,xmm9,xmm1
vaesenc xmm10,xmm10,xmm1
vaesenc xmm11,xmm11,xmm1
vaesenc xmm12,xmm12,xmm1
vaesenc xmm13,xmm13,xmm1
vmovups xmm15,XMMWORD[((176-128))+rcx]
vaesenc xmm14,xmm14,xmm1
vmovups xmm1,XMMWORD[((192-128))+rcx]
je NEAR $L$enc_tail
vaesenc xmm9,xmm9,xmm15
vaesenc xmm10,xmm10,xmm15
vaesenc xmm11,xmm11,xmm15
vaesenc xmm12,xmm12,xmm15
vaesenc xmm13,xmm13,xmm15
vaesenc xmm14,xmm14,xmm15
vaesenc xmm9,xmm9,xmm1
vaesenc xmm10,xmm10,xmm1
vaesenc xmm11,xmm11,xmm1
vaesenc xmm12,xmm12,xmm1
vaesenc xmm13,xmm13,xmm1
vmovups xmm15,XMMWORD[((208-128))+rcx]
vaesenc xmm14,xmm14,xmm1
vmovups xmm1,XMMWORD[((224-128))+rcx]
jmp NEAR $L$enc_tail
ALIGN 32
$L$handle_ctr32:
vmovdqu xmm0,XMMWORD[r11]
vpshufb xmm6,xmm1,xmm0
vmovdqu xmm5,XMMWORD[48+r11]
vpaddd xmm10,xmm6,XMMWORD[64+r11]
vpaddd xmm11,xmm6,xmm5
vmovdqu xmm3,XMMWORD[((0-32))+r9]
vpaddd xmm12,xmm10,xmm5
vpshufb xmm10,xmm10,xmm0
vpaddd xmm13,xmm11,xmm5
vpshufb xmm11,xmm11,xmm0
vpxor xmm10,xmm10,xmm15
vpaddd xmm14,xmm12,xmm5
vpshufb xmm12,xmm12,xmm0
vpxor xmm11,xmm11,xmm15
vpaddd xmm1,xmm13,xmm5
vpshufb xmm13,xmm13,xmm0
vpshufb xmm14,xmm14,xmm0
vpshufb xmm1,xmm1,xmm0
jmp NEAR $L$resume_ctr32
ALIGN 32
$L$enc_tail:
vaesenc xmm9,xmm9,xmm15
vmovdqu XMMWORD[(16+8)+rsp],xmm7
vpalignr xmm8,xmm4,xmm4,8
vaesenc xmm10,xmm10,xmm15
vpclmulqdq xmm4,xmm4,xmm3,0x10
vpxor xmm2,xmm1,XMMWORD[rdi]
vaesenc xmm11,xmm11,xmm15
vpxor xmm0,xmm1,XMMWORD[16+rdi]
vaesenc xmm12,xmm12,xmm15
vpxor xmm5,xmm1,XMMWORD[32+rdi]
vaesenc xmm13,xmm13,xmm15
vpxor xmm6,xmm1,XMMWORD[48+rdi]
vaesenc xmm14,xmm14,xmm15
vpxor xmm7,xmm1,XMMWORD[64+rdi]
vpxor xmm3,xmm1,XMMWORD[80+rdi]
vmovdqu xmm1,XMMWORD[r8]
vaesenclast xmm9,xmm9,xmm2
vmovdqu xmm2,XMMWORD[32+r11]
vaesenclast xmm10,xmm10,xmm0
vpaddb xmm0,xmm1,xmm2
mov QWORD[((112+8))+rsp],r13
lea rdi,[96+rdi]
vaesenclast xmm11,xmm11,xmm5
vpaddb xmm5,xmm0,xmm2
mov QWORD[((120+8))+rsp],r12
lea rsi,[96+rsi]
vmovdqu xmm15,XMMWORD[((0-128))+rcx]
vaesenclast xmm12,xmm12,xmm6
vpaddb xmm6,xmm5,xmm2
vaesenclast xmm13,xmm13,xmm7
vpaddb xmm7,xmm6,xmm2
vaesenclast xmm14,xmm14,xmm3
vpaddb xmm3,xmm7,xmm2
add r10,0x60
sub rdx,0x6
jc NEAR $L$6x_done
vmovups XMMWORD[(-96)+rsi],xmm9
vpxor xmm9,xmm1,xmm15
vmovups XMMWORD[(-80)+rsi],xmm10
vmovdqa xmm10,xmm0
vmovups XMMWORD[(-64)+rsi],xmm11
vmovdqa xmm11,xmm5
vmovups XMMWORD[(-48)+rsi],xmm12
vmovdqa xmm12,xmm6
vmovups XMMWORD[(-32)+rsi],xmm13
vmovdqa xmm13,xmm7
vmovups XMMWORD[(-16)+rsi],xmm14
vmovdqa xmm14,xmm3
vmovdqu xmm7,XMMWORD[((32+8))+rsp]
jmp NEAR $L$oop6x
$L$6x_done:
vpxor xmm8,xmm8,XMMWORD[((16+8))+rsp]
vpxor xmm8,xmm8,xmm4
DB 0F3h,0C3h ;repret
global aesni_gcm_decrypt
ALIGN 32
aesni_gcm_decrypt:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_aesni_gcm_decrypt:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD[40+rsp]
mov r9,QWORD[48+rsp]
xor r10,r10
cmp rdx,0x60
jb NEAR $L$gcm_dec_abort
lea rax,[rsp]
push rbx
push rbp
push r12
push r13
push r14
push r15
lea rsp,[((-168))+rsp]
movaps XMMWORD[(-216)+rax],xmm6
movaps XMMWORD[(-200)+rax],xmm7
movaps XMMWORD[(-184)+rax],xmm8
movaps XMMWORD[(-168)+rax],xmm9
movaps XMMWORD[(-152)+rax],xmm10
movaps XMMWORD[(-136)+rax],xmm11
movaps XMMWORD[(-120)+rax],xmm12
movaps XMMWORD[(-104)+rax],xmm13
movaps XMMWORD[(-88)+rax],xmm14
movaps XMMWORD[(-72)+rax],xmm15
$L$gcm_dec_body:
vzeroupper
vmovdqu xmm1,XMMWORD[r8]
add rsp,-128
mov ebx,DWORD[12+r8]
lea r11,[$L$bswap_mask]
lea r14,[((-128))+rcx]
mov r15,0xf80
vmovdqu xmm8,XMMWORD[r9]
and rsp,-128
vmovdqu xmm0,XMMWORD[r11]
lea rcx,[128+rcx]
lea r9,[((32+32))+r9]
mov ebp,DWORD[((240-128))+rcx]
vpshufb xmm8,xmm8,xmm0
and r14,r15
and r15,rsp
sub r15,r14
jc NEAR $L$dec_no_key_aliasing
cmp r15,768
jnc NEAR $L$dec_no_key_aliasing
sub rsp,r15
$L$dec_no_key_aliasing:
vmovdqu xmm7,XMMWORD[80+rdi]
lea r14,[rdi]
vmovdqu xmm4,XMMWORD[64+rdi]
lea r15,[((-192))+rdx*1+rdi]
vmovdqu xmm5,XMMWORD[48+rdi]
shr rdx,4
xor r10,r10
vmovdqu xmm6,XMMWORD[32+rdi]
vpshufb xmm7,xmm7,xmm0
vmovdqu xmm2,XMMWORD[16+rdi]
vpshufb xmm4,xmm4,xmm0
vmovdqu xmm3,XMMWORD[rdi]
vpshufb xmm5,xmm5,xmm0
vmovdqu XMMWORD[48+rsp],xmm4
vpshufb xmm6,xmm6,xmm0
vmovdqu XMMWORD[64+rsp],xmm5
vpshufb xmm2,xmm2,xmm0
vmovdqu XMMWORD[80+rsp],xmm6
vpshufb xmm3,xmm3,xmm0
vmovdqu XMMWORD[96+rsp],xmm2
vmovdqu XMMWORD[112+rsp],xmm3
call _aesni_ctr32_ghash_6x
vmovups XMMWORD[(-96)+rsi],xmm9
vmovups XMMWORD[(-80)+rsi],xmm10
vmovups XMMWORD[(-64)+rsi],xmm11
vmovups XMMWORD[(-48)+rsi],xmm12
vmovups XMMWORD[(-32)+rsi],xmm13
vmovups XMMWORD[(-16)+rsi],xmm14
vpshufb xmm8,xmm8,XMMWORD[r11]
vmovdqu XMMWORD[(-64)+r9],xmm8
vzeroupper
movaps xmm6,XMMWORD[((-216))+rax]
movaps xmm7,XMMWORD[((-200))+rax]
movaps xmm8,XMMWORD[((-184))+rax]
movaps xmm9,XMMWORD[((-168))+rax]
movaps xmm10,XMMWORD[((-152))+rax]
movaps xmm11,XMMWORD[((-136))+rax]
movaps xmm12,XMMWORD[((-120))+rax]
movaps xmm13,XMMWORD[((-104))+rax]
movaps xmm14,XMMWORD[((-88))+rax]
movaps xmm15,XMMWORD[((-72))+rax]
mov r15,QWORD[((-48))+rax]
mov r14,QWORD[((-40))+rax]
mov r13,QWORD[((-32))+rax]
mov r12,QWORD[((-24))+rax]
mov rbp,QWORD[((-16))+rax]
mov rbx,QWORD[((-8))+rax]
lea rsp,[rax]
$L$gcm_dec_abort:
mov rax,r10
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_aesni_gcm_decrypt:
ALIGN 32
_aesni_ctr32_6x:
vmovdqu xmm4,XMMWORD[((0-128))+rcx]
vmovdqu xmm2,XMMWORD[32+r11]
lea r13,[((-1))+rbp]
vmovups xmm15,XMMWORD[((16-128))+rcx]
lea r12,[((32-128))+rcx]
vpxor xmm9,xmm1,xmm4
add ebx,100663296
jc NEAR $L$handle_ctr32_2
vpaddb xmm10,xmm1,xmm2
vpaddb xmm11,xmm10,xmm2
vpxor xmm10,xmm10,xmm4
vpaddb xmm12,xmm11,xmm2
vpxor xmm11,xmm11,xmm4
vpaddb xmm13,xmm12,xmm2
vpxor xmm12,xmm12,xmm4
vpaddb xmm14,xmm13,xmm2
vpxor xmm13,xmm13,xmm4
vpaddb xmm1,xmm14,xmm2
vpxor xmm14,xmm14,xmm4
jmp NEAR $L$oop_ctr32
ALIGN 16
$L$oop_ctr32:
vaesenc xmm9,xmm9,xmm15
vaesenc xmm10,xmm10,xmm15
vaesenc xmm11,xmm11,xmm15
vaesenc xmm12,xmm12,xmm15
vaesenc xmm13,xmm13,xmm15
vaesenc xmm14,xmm14,xmm15
vmovups xmm15,XMMWORD[r12]
lea r12,[16+r12]
dec r13d
jnz NEAR $L$oop_ctr32
vmovdqu xmm3,XMMWORD[r12]
vaesenc xmm9,xmm9,xmm15
vpxor xmm4,xmm3,XMMWORD[rdi]
vaesenc xmm10,xmm10,xmm15
vpxor xmm5,xmm3,XMMWORD[16+rdi]
vaesenc xmm11,xmm11,xmm15
vpxor xmm6,xmm3,XMMWORD[32+rdi]
vaesenc xmm12,xmm12,xmm15
vpxor xmm8,xmm3,XMMWORD[48+rdi]
vaesenc xmm13,xmm13,xmm15
vpxor xmm2,xmm3,XMMWORD[64+rdi]
vaesenc xmm14,xmm14,xmm15
vpxor xmm3,xmm3,XMMWORD[80+rdi]
lea rdi,[96+rdi]
vaesenclast xmm9,xmm9,xmm4
vaesenclast xmm10,xmm10,xmm5
vaesenclast xmm11,xmm11,xmm6
vaesenclast xmm12,xmm12,xmm8
vaesenclast xmm13,xmm13,xmm2
vaesenclast xmm14,xmm14,xmm3
vmovups XMMWORD[rsi],xmm9
vmovups XMMWORD[16+rsi],xmm10
vmovups XMMWORD[32+rsi],xmm11
vmovups XMMWORD[48+rsi],xmm12
vmovups XMMWORD[64+rsi],xmm13
vmovups XMMWORD[80+rsi],xmm14
lea rsi,[96+rsi]
DB 0F3h,0C3h ;repret
ALIGN 32
$L$handle_ctr32_2:
vpshufb xmm6,xmm1,xmm0
vmovdqu xmm5,XMMWORD[48+r11]
vpaddd xmm10,xmm6,XMMWORD[64+r11]
vpaddd xmm11,xmm6,xmm5
vpaddd xmm12,xmm10,xmm5
vpshufb xmm10,xmm10,xmm0
vpaddd xmm13,xmm11,xmm5
vpshufb xmm11,xmm11,xmm0
vpxor xmm10,xmm10,xmm4
vpaddd xmm14,xmm12,xmm5
vpshufb xmm12,xmm12,xmm0
vpxor xmm11,xmm11,xmm4
vpaddd xmm1,xmm13,xmm5
vpshufb xmm13,xmm13,xmm0
vpxor xmm12,xmm12,xmm4
vpshufb xmm14,xmm14,xmm0
vpxor xmm13,xmm13,xmm4
vpshufb xmm1,xmm1,xmm0
vpxor xmm14,xmm14,xmm4
jmp NEAR $L$oop_ctr32
global aesni_gcm_encrypt
ALIGN 32
aesni_gcm_encrypt:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_aesni_gcm_encrypt:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD[40+rsp]
mov r9,QWORD[48+rsp]
%ifdef BORINGSSL_DISPATCH_TEST
EXTERN BORINGSSL_function_hit
mov BYTE[((BORINGSSL_function_hit+2))],1
%endif
xor r10,r10
cmp rdx,0x60*3
jb NEAR $L$gcm_enc_abort
lea rax,[rsp]
push rbx
push rbp
push r12
push r13
push r14
push r15
lea rsp,[((-168))+rsp]
movaps XMMWORD[(-216)+rax],xmm6
movaps XMMWORD[(-200)+rax],xmm7
movaps XMMWORD[(-184)+rax],xmm8
movaps XMMWORD[(-168)+rax],xmm9
movaps XMMWORD[(-152)+rax],xmm10
movaps XMMWORD[(-136)+rax],xmm11
movaps XMMWORD[(-120)+rax],xmm12
movaps XMMWORD[(-104)+rax],xmm13
movaps XMMWORD[(-88)+rax],xmm14
movaps XMMWORD[(-72)+rax],xmm15
$L$gcm_enc_body:
vzeroupper
vmovdqu xmm1,XMMWORD[r8]
add rsp,-128
mov ebx,DWORD[12+r8]
lea r11,[$L$bswap_mask]
lea r14,[((-128))+rcx]
mov r15,0xf80
lea rcx,[128+rcx]
vmovdqu xmm0,XMMWORD[r11]
and rsp,-128
mov ebp,DWORD[((240-128))+rcx]
and r14,r15
and r15,rsp
sub r15,r14
jc NEAR $L$enc_no_key_aliasing
cmp r15,768
jnc NEAR $L$enc_no_key_aliasing
sub rsp,r15
$L$enc_no_key_aliasing:
lea r14,[rsi]
lea r15,[((-192))+rdx*1+rsi]
shr rdx,4
call _aesni_ctr32_6x
vpshufb xmm8,xmm9,xmm0
vpshufb xmm2,xmm10,xmm0
vmovdqu XMMWORD[112+rsp],xmm8
vpshufb xmm4,xmm11,xmm0
vmovdqu XMMWORD[96+rsp],xmm2
vpshufb xmm5,xmm12,xmm0
vmovdqu XMMWORD[80+rsp],xmm4
vpshufb xmm6,xmm13,xmm0
vmovdqu XMMWORD[64+rsp],xmm5
vpshufb xmm7,xmm14,xmm0
vmovdqu XMMWORD[48+rsp],xmm6
call _aesni_ctr32_6x
vmovdqu xmm8,XMMWORD[r9]
lea r9,[((32+32))+r9]
sub rdx,12
mov r10,0x60*2
vpshufb xmm8,xmm8,xmm0
call _aesni_ctr32_ghash_6x
vmovdqu xmm7,XMMWORD[32+rsp]
vmovdqu xmm0,XMMWORD[r11]
vmovdqu xmm3,XMMWORD[((0-32))+r9]
vpunpckhqdq xmm1,xmm7,xmm7
vmovdqu xmm15,XMMWORD[((32-32))+r9]
vmovups XMMWORD[(-96)+rsi],xmm9
vpshufb xmm9,xmm9,xmm0
vpxor xmm1,xmm1,xmm7
vmovups XMMWORD[(-80)+rsi],xmm10
vpshufb xmm10,xmm10,xmm0
vmovups XMMWORD[(-64)+rsi],xmm11
vpshufb xmm11,xmm11,xmm0
vmovups XMMWORD[(-48)+rsi],xmm12
vpshufb xmm12,xmm12,xmm0
vmovups XMMWORD[(-32)+rsi],xmm13
vpshufb xmm13,xmm13,xmm0
vmovups XMMWORD[(-16)+rsi],xmm14
vpshufb xmm14,xmm14,xmm0
vmovdqu XMMWORD[16+rsp],xmm9
vmovdqu xmm6,XMMWORD[48+rsp]
vmovdqu xmm0,XMMWORD[((16-32))+r9]
vpunpckhqdq xmm2,xmm6,xmm6
vpclmulqdq xmm5,xmm7,xmm3,0x00
vpxor xmm2,xmm2,xmm6
vpclmulqdq xmm7,xmm7,xmm3,0x11
vpclmulqdq xmm1,xmm1,xmm15,0x00
vmovdqu xmm9,XMMWORD[64+rsp]
vpclmulqdq xmm4,xmm6,xmm0,0x00
vmovdqu xmm3,XMMWORD[((48-32))+r9]
vpxor xmm4,xmm4,xmm5
vpunpckhqdq xmm5,xmm9,xmm9
vpclmulqdq xmm6,xmm6,xmm0,0x11
vpxor xmm5,xmm5,xmm9
vpxor xmm6,xmm6,xmm7
vpclmulqdq xmm2,xmm2,xmm15,0x10
vmovdqu xmm15,XMMWORD[((80-32))+r9]
vpxor xmm2,xmm2,xmm1
vmovdqu xmm1,XMMWORD[80+rsp]
vpclmulqdq xmm7,xmm9,xmm3,0x00
vmovdqu xmm0,XMMWORD[((64-32))+r9]
vpxor xmm7,xmm7,xmm4
vpunpckhqdq xmm4,xmm1,xmm1
vpclmulqdq xmm9,xmm9,xmm3,0x11
vpxor xmm4,xmm4,xmm1
vpxor xmm9,xmm9,xmm6
vpclmulqdq xmm5,xmm5,xmm15,0x00
vpxor xmm5,xmm5,xmm2
vmovdqu xmm2,XMMWORD[96+rsp]
vpclmulqdq xmm6,xmm1,xmm0,0x00
vmovdqu xmm3,XMMWORD[((96-32))+r9]
vpxor xmm6,xmm6,xmm7
vpunpckhqdq xmm7,xmm2,xmm2
vpclmulqdq xmm1,xmm1,xmm0,0x11
vpxor xmm7,xmm7,xmm2
vpxor xmm1,xmm1,xmm9
vpclmulqdq xmm4,xmm4,xmm15,0x10
vmovdqu xmm15,XMMWORD[((128-32))+r9]
vpxor xmm4,xmm4,xmm5
vpxor xmm8,xmm8,XMMWORD[112+rsp]
vpclmulqdq xmm5,xmm2,xmm3,0x00
vmovdqu xmm0,XMMWORD[((112-32))+r9]
vpunpckhqdq xmm9,xmm8,xmm8
vpxor xmm5,xmm5,xmm6
vpclmulqdq xmm2,xmm2,xmm3,0x11
vpxor xmm9,xmm9,xmm8
vpxor xmm2,xmm2,xmm1
vpclmulqdq xmm7,xmm7,xmm15,0x00
vpxor xmm4,xmm7,xmm4
vpclmulqdq xmm6,xmm8,xmm0,0x00
vmovdqu xmm3,XMMWORD[((0-32))+r9]
vpunpckhqdq xmm1,xmm14,xmm14
vpclmulqdq xmm8,xmm8,xmm0,0x11
vpxor xmm1,xmm1,xmm14
vpxor xmm5,xmm6,xmm5
vpclmulqdq xmm9,xmm9,xmm15,0x10
vmovdqu xmm15,XMMWORD[((32-32))+r9]
vpxor xmm7,xmm8,xmm2
vpxor xmm6,xmm9,xmm4
vmovdqu xmm0,XMMWORD[((16-32))+r9]
vpxor xmm9,xmm7,xmm5
vpclmulqdq xmm4,xmm14,xmm3,0x00
vpxor xmm6,xmm6,xmm9
vpunpckhqdq xmm2,xmm13,xmm13
vpclmulqdq xmm14,xmm14,xmm3,0x11
vpxor xmm2,xmm2,xmm13
vpslldq xmm9,xmm6,8
vpclmulqdq xmm1,xmm1,xmm15,0x00
vpxor xmm8,xmm5,xmm9
vpsrldq xmm6,xmm6,8
vpxor xmm7,xmm7,xmm6
vpclmulqdq xmm5,xmm13,xmm0,0x00
vmovdqu xmm3,XMMWORD[((48-32))+r9]
vpxor xmm5,xmm5,xmm4
vpunpckhqdq xmm9,xmm12,xmm12
vpclmulqdq xmm13,xmm13,xmm0,0x11
vpxor xmm9,xmm9,xmm12
vpxor xmm13,xmm13,xmm14
vpalignr xmm14,xmm8,xmm8,8
vpclmulqdq xmm2,xmm2,xmm15,0x10
vmovdqu xmm15,XMMWORD[((80-32))+r9]
vpxor xmm2,xmm2,xmm1
vpclmulqdq xmm4,xmm12,xmm3,0x00
vmovdqu xmm0,XMMWORD[((64-32))+r9]
vpxor xmm4,xmm4,xmm5
vpunpckhqdq xmm1,xmm11,xmm11
vpclmulqdq xmm12,xmm12,xmm3,0x11
vpxor xmm1,xmm1,xmm11
vpxor xmm12,xmm12,xmm13
vxorps xmm7,xmm7,XMMWORD[16+rsp]
vpclmulqdq xmm9,xmm9,xmm15,0x00
vpxor xmm9,xmm9,xmm2
vpclmulqdq xmm8,xmm8,XMMWORD[16+r11],0x10
vxorps xmm8,xmm8,xmm14
vpclmulqdq xmm5,xmm11,xmm0,0x00
vmovdqu xmm3,XMMWORD[((96-32))+r9]
vpxor xmm5,xmm5,xmm4
vpunpckhqdq xmm2,xmm10,xmm10
vpclmulqdq xmm11,xmm11,xmm0,0x11
vpxor xmm2,xmm2,xmm10
vpalignr xmm14,xmm8,xmm8,8
vpxor xmm11,xmm11,xmm12
vpclmulqdq xmm1,xmm1,xmm15,0x10
vmovdqu xmm15,XMMWORD[((128-32))+r9]
vpxor xmm1,xmm1,xmm9
vxorps xmm14,xmm14,xmm7
vpclmulqdq xmm8,xmm8,XMMWORD[16+r11],0x10
vxorps xmm8,xmm8,xmm14
vpclmulqdq xmm4,xmm10,xmm3,0x00
vmovdqu xmm0,XMMWORD[((112-32))+r9]
vpxor xmm4,xmm4,xmm5
vpunpckhqdq xmm9,xmm8,xmm8
vpclmulqdq xmm10,xmm10,xmm3,0x11
vpxor xmm9,xmm9,xmm8
vpxor xmm10,xmm10,xmm11
vpclmulqdq xmm2,xmm2,xmm15,0x00
vpxor xmm2,xmm2,xmm1
vpclmulqdq xmm5,xmm8,xmm0,0x00
vpclmulqdq xmm7,xmm8,xmm0,0x11
vpxor xmm5,xmm5,xmm4
vpclmulqdq xmm6,xmm9,xmm15,0x10
vpxor xmm7,xmm7,xmm10
vpxor xmm6,xmm6,xmm2
vpxor xmm4,xmm7,xmm5
vpxor xmm6,xmm6,xmm4
vpslldq xmm1,xmm6,8
vmovdqu xmm3,XMMWORD[16+r11]
vpsrldq xmm6,xmm6,8
vpxor xmm8,xmm5,xmm1
vpxor xmm7,xmm7,xmm6
vpalignr xmm2,xmm8,xmm8,8
vpclmulqdq xmm8,xmm8,xmm3,0x10
vpxor xmm8,xmm8,xmm2
vpalignr xmm2,xmm8,xmm8,8
vpclmulqdq xmm8,xmm8,xmm3,0x10
vpxor xmm2,xmm2,xmm7
vpxor xmm8,xmm8,xmm2
vpshufb xmm8,xmm8,XMMWORD[r11]
vmovdqu XMMWORD[(-64)+r9],xmm8
vzeroupper
movaps xmm6,XMMWORD[((-216))+rax]
movaps xmm7,XMMWORD[((-200))+rax]
movaps xmm8,XMMWORD[((-184))+rax]
movaps xmm9,XMMWORD[((-168))+rax]
movaps xmm10,XMMWORD[((-152))+rax]
movaps xmm11,XMMWORD[((-136))+rax]
movaps xmm12,XMMWORD[((-120))+rax]
movaps xmm13,XMMWORD[((-104))+rax]
movaps xmm14,XMMWORD[((-88))+rax]
movaps xmm15,XMMWORD[((-72))+rax]
mov r15,QWORD[((-48))+rax]
mov r14,QWORD[((-40))+rax]
mov r13,QWORD[((-32))+rax]
mov r12,QWORD[((-24))+rax]
mov rbp,QWORD[((-16))+rax]
mov rbx,QWORD[((-8))+rax]
lea rsp,[rax]
$L$gcm_enc_abort:
mov rax,r10
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_aesni_gcm_encrypt:
ALIGN 64
$L$bswap_mask:
DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
$L$poly:
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
$L$one_msb:
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
$L$two_lsb:
DB 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
$L$one_lsb:
DB 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 65,69,83,45,78,73,32,71,67,77,32,109,111,100,117,108
DB 101,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82
DB 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112
DB 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
ALIGN 64
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
gcm_se_handler:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD[120+r8]
mov rbx,QWORD[248+r8]
mov rsi,QWORD[8+r9]
mov r11,QWORD[56+r9]
mov r10d,DWORD[r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jb NEAR $L$common_seh_tail
mov rax,QWORD[152+r8]
mov r10d,DWORD[4+r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jae NEAR $L$common_seh_tail
mov rax,QWORD[120+r8]
mov r15,QWORD[((-48))+rax]
mov r14,QWORD[((-40))+rax]
mov r13,QWORD[((-32))+rax]
mov r12,QWORD[((-24))+rax]
mov rbp,QWORD[((-16))+rax]
mov rbx,QWORD[((-8))+rax]
mov QWORD[240+r8],r15
mov QWORD[232+r8],r14
mov QWORD[224+r8],r13
mov QWORD[216+r8],r12
mov QWORD[160+r8],rbp
mov QWORD[144+r8],rbx
lea rsi,[((-216))+rax]
lea rdi,[512+r8]
mov ecx,20
DD 0xa548f3fc
$L$common_seh_tail:
mov rdi,QWORD[8+rax]
mov rsi,QWORD[16+rax]
mov QWORD[152+r8],rax
mov QWORD[168+r8],rsi
mov QWORD[176+r8],rdi
mov rdi,QWORD[40+r9]
mov rsi,r8
mov ecx,154
DD 0xa548f3fc
mov rsi,r9
xor rcx,rcx
mov rdx,QWORD[8+rsi]
mov r8,QWORD[rsi]
mov r9,QWORD[16+rsi]
mov r10,QWORD[40+rsi]
lea r11,[56+rsi]
lea r12,[24+rsi]
mov QWORD[32+rsp],r10
mov QWORD[40+rsp],r11
mov QWORD[48+rsp],r12
mov QWORD[56+rsp],rcx
call QWORD[__imp_RtlVirtualUnwind]
mov eax,1
add rsp,64
popfq
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
DB 0F3h,0C3h ;repret
section .pdata rdata align=4
ALIGN 4
DD $L$SEH_begin_aesni_gcm_decrypt wrt ..imagebase
DD $L$SEH_end_aesni_gcm_decrypt wrt ..imagebase
DD $L$SEH_gcm_dec_info wrt ..imagebase
DD $L$SEH_begin_aesni_gcm_encrypt wrt ..imagebase
DD $L$SEH_end_aesni_gcm_encrypt wrt ..imagebase
DD $L$SEH_gcm_enc_info wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_gcm_dec_info:
DB 9,0,0,0
DD gcm_se_handler wrt ..imagebase
DD $L$gcm_dec_body wrt ..imagebase,$L$gcm_dec_abort wrt ..imagebase
$L$SEH_gcm_enc_info:
DB 9,0,0,0
DD gcm_se_handler wrt ..imagebase
DD $L$gcm_enc_body wrt ..imagebase,$L$gcm_enc_abort wrt ..imagebase
|
alloy4fun_models/trainstlt/models/3/row4qJpDvf2qxo94C.als | Kaixi26/org.alloytools.alloy | 0 | 716 | <gh_stars>0
open main
pred idrow4qJpDvf2qxo94C_prop4 {
all disj s1, s2 : Signal | s1.pos != s2.pos
}
pred __repair { idrow4qJpDvf2qxo94C_prop4 }
check __repair { idrow4qJpDvf2qxo94C_prop4 <=> prop4o } |
chat_messages.ads | cborao/Ada-P3 | 0 | 10617 |
--PRÁCTICA 3: <NAME> (Chat_Messages.ads)
with Lower_Layer_UDP;
with Ada.Strings.Unbounded;
package Chat_Messages is
package LLU renames Lower_Layer_UDP;
package ASU renames Ada.Strings.Unbounded;
type Message_Type is (Init, Welcome, Writer, Server, Logout);
procedure Init_Message (Server_EP: LLU.End_Point_Type;
Client_EP_Receive: LLU.End_Point_Type;
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
O_Buffer: Access LLU.Buffer_Type);
procedure Welcome_Message (Client_EP_Handler: LLU.End_Point_Type;
Accepted: Boolean;
O_Buffer: Access LLU.Buffer_Type);
procedure Server_Message (Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
O_Buffer: Access LLU.Buffer_Type);
procedure Writer_Message (Server_EP: LLU.End_Point_Type;
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
O_Buffer: Access LLU.Buffer_Type);
procedure Logout_Message (Server_EP: LLU.End_Point_Type;
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
O_Buffer: Access LLU.Buffer_Type);
end Chat_Messages;
|
programs/oeis/164/A164743.asm | neoneye/loda | 22 | 25832 | <filename>programs/oeis/164/A164743.asm
; A164743: Digital root of 3*A000045(n).
; 3,3,6,9,6,6,3,9,3,3,6,9,6,6,3,9,3,3,6,9,6,6,3,9,3,3,6,9,6,6,3,9
mod $0,8
trn $0,1
lpb $0
mul $0,2
mod $0,5
lpe
mul $0,3
add $0,3
|
programs/oeis/064/A064911.asm | jmorken/loda | 1 | 16204 | ; A064911: If n is semiprime (or 2-almost prime) then 1 else 0.
; 0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,1,1,0,1,1,1,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,1,1,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,1,1,0,0,1,0,0,0,1,1,1,0,1,1,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0
cal $0,86436 ; Maximum number of parts possible in a factorization of n; a(1) = 1, and for n > 1, a(n) = A001222(n) = bigomega(n).
cmp $0,2
mov $1,$0
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/einfo.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 23791 | <gh_stars>0
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E I N F O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Snames; use Snames;
with Types; use Types;
with Uintp; use Uintp;
with Urealp; use Urealp;
package Einfo is
-- This package defines the annotations to the abstract syntax tree that
-- are needed to support semantic processing of an Ada compilation.
-- Note that after editing this spec and the corresponding body it is
-- required to run ceinfo to check the consistentcy of spec and body.
-- See ceinfo.adb for more information about the checks made.
-- These annotations are for the most part attributes of declared entities,
-- and they correspond to conventional symbol table information. Other
-- attributes include sets of meanings for overloaded names, possible
-- types for overloaded expressions, flags to indicate deferred constants,
-- incomplete types, etc. These attributes are stored in available fields in
-- tree nodes (i.e. fields not used by the parser, as defined by the Sinfo
-- package specification), and accessed by means of a set of subprograms
-- which define an abstract interface.
-- There are two kinds of semantic information
-- First, the tree nodes with the following Nkind values:
-- N_Defining_Identifier
-- N_Defining_Character_Literal
-- N_Defining_Operator_Symbol
-- are called Entities, and constitute the information that would often
-- be stored separately in a symbol table. These nodes are all extended
-- to provide extra space, and contain fields which depend on the entity
-- kind, as defined by the contents of the Ekind field. The use of the
-- Ekind field, and the associated fields in the entity, are defined
-- in this package, as are the access functions to these fields.
-- Second, in some cases semantic information is stored directly in other
-- kinds of nodes, e.g. the Etype field, used to indicate the type of an
-- expression. The access functions to these fields are defined in the
-- Sinfo package, but their full documentation is to be found in
-- the Einfo package specification.
-- Declaration processing places information in the nodes of their defining
-- identifiers. Name resolution places in all other occurrences of an
-- identifier a pointer to the corresponding defining occurrence.
--------------------------------
-- The XEINFO Utility Program --
--------------------------------
-- XEINFO is a utility program which automatically produces a C header file,
-- einfo.h from the spec and body of package Einfo. It reads the input files
-- einfo.ads and einfo.adb and produces the output file einfo.h. XEINFO is run
-- automatically by the build scripts when you do a full bootstrap.
-- In order for this utility program to operate correctly, the form of the
-- einfo.ads and einfo.adb files must meet certain requirements and be laid
-- out in a specific manner.
-- The general form of einfo.ads is as follows:
-- type declaration for type Entity_Kind
-- subtype declarations declaring subranges of Entity_Kind
-- subtype declarations declaring synonyms for some standard types
-- function specs for attributes
-- procedure specs
-- pragma Inline declarations
-- This order must be observed. There are no restrictions on the procedures,
-- since the C header file only includes functions (The back end is not
-- allowed to modify the generated tree). However, functions are required to
-- have headers that fit on a single line.
-- XEINFO reads and processes the function specs and the pragma Inlines. For
-- functions that are declared as inlined, XEINFO reads the corresponding body
-- from einfo.adb, and processes it into C code. This results in some strict
-- restrictions on which functions can be inlined:
-- The function spec must be on a single line
-- There can only be a single return statement, not counting any pragma
-- Assert statements, possibly followed by a comment.
-- This single statement must either contain a function call with simple,
-- single token arguments, or it must contain a membership test of the form
-- a in b, where a and b are single tokens, or it must contain an equality
-- or inequality test of single tokens, or it must contain a disjunction of
-- the preceding constructs.
-- For functions that are not inlined, there is no restriction on the body,
-- and XEINFO generates a direct reference in the C header file which allows
-- the C code in the backend to directly call the corresponding Ada body.
----------------------------------
-- Handling of Type'Size Values --
----------------------------------
-- The Ada 95 RM contains some rather peculiar (to us) rules on the value
-- of type'Size (see RM 13.3(55)). We have found that attempting to use
-- these RM Size values generally, and in particular for determining the
-- default size of objects, creates chaos, and major incompatibilities in
-- existing code.
-- The Ada 2020 RM acknowledges it and adopts GNAT's Object_Size attribute
-- for determining the default size of objects, but stops short of applying
-- it universally like GNAT. Indeed the notable exceptions are nonaliased
-- stand-alone objects, which are not covered by Object_Size in Ada 2020.
-- We proceed as follows, for discrete and fixed-point subtypes, we have
-- two separate sizes for each subtype:
-- The Object_Size, which is used for determining the default size of
-- objects and components. This size value can be referred to using the
-- Object_Size attribute. The phrase "is used" here means that it is
-- the basis of the determination of the size. The back end is free to
-- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone
-- character might be stored in 32 bits on a machine with no efficient
-- byte access instructions such as the Alpha.
-- The default rules for the value of Object_Size are as follows:
-- The Object_Size for base subtypes reflect the natural hardware
-- size in bits (see Ttypes and Cstand for integer types). For
-- enumeration and fixed-point base subtypes have 8, 16, 32, or 64
-- bits for this size, depending on the range of values to be stored.
-- The Object_Size of a subtype is the same as the Object_Size of
-- the subtype from which it is obtained.
-- The Object_Size of a derived base type is copied from the parent
-- base type, and the Object_Size of a derived first subtype is copied
-- from the parent first subtype.
-- The Ada 2020 RM defined attribute Object_Size uses this implementation.
-- The Value_Size, which is the number of bits required to store a value
-- of the type. This size can be referred to using the Value_Size
-- attribute. This value is used for determining how tightly to pack
-- records or arrays with components of this type, and also affects
-- the semantics of unchecked conversion (unchecked conversions where
-- the Value_Size values differ generate a warning, and are potentially
-- target dependent).
-- The default rules for the value of Value_Size are as follows:
-- The Value_Size for a base subtype is the minimum number of bits
-- required to store all values of the type (including the sign bit
-- only if negative values are possible).
-- If a subtype statically matches the first subtype, then it has
-- by default the same Value_Size as the first subtype. This is a
-- consequence of RM 13.1(14) ("if two subtypes statically match,
-- then their subtype-specific aspects are the same".)
-- All other subtypes have a Value_Size corresponding to the minimum
-- number of bits required to store all values of the subtype. For
-- dynamic bounds, it is assumed that the value can range down or up
-- to the corresponding bound of the ancestor.
-- The Ada 95 RM defined attribute Size is identified with Value_Size.
-- The Size attribute may be defined for a first-named subtype. This sets
-- the Value_Size of the first-named subtype to the given value, and the
-- Object_Size of this first-named subtype to the given value padded up
-- to an appropriate boundary. It is a consequence of the default rules
-- above that this Object_Size will apply to all further subtypes. On the
-- other hand, Value_Size is affected only for the first subtype, any
-- dynamic subtypes obtained from it directly, and any statically matching
-- subtypes. The Value_Size of any other static subtypes is not affected.
-- Value_Size and Object_Size may be explicitly set for any subtype using
-- an attribute definition clause. Note that the use of such a clause can
-- cause the RM 13.1(14) rule to be violated, in Ada 95 and 2020 for the
-- Value_Size attribute, but only in Ada 95 for the Object_Size attribute.
-- If access types reference aliased objects whose subtypes have differing
-- Object_Size values as a result of explicit attribute definition clauses,
-- then it is erroneous to convert from one access subtype to the other.
-- At the implementation level, the Esize field stores the Object_Size
-- and the RM_Size field stores the Value_Size (hence the value of the
-- Size attribute, which, as noted above, is equivalent to Value_Size).
-- To get a feel for the difference, consider the following examples (note
-- that in each case the base is short_short_integer with a size of 8):
-- Object_Size Value_Size
-- type x1 is range 0..5; 8 3
-- type x2 is range 0..5;
-- for x2'size use 12; 16 12
-- subtype x3 is x2 range 0 .. 3; 16 2
-- subtype x4 is x2'base range 0 .. 10; 8 4
-- dynamic : x2'Base range -64 .. +63;
-- subtype x5 is x2 range 0 .. dynamic; 16 3*
-- subtype x6 is x2'base range 0 .. dynamic; 8 7*
-- Note: the entries marked * are not actually specified by the Ada 95 RM,
-- but it seems in the spirit of the RM rules to allocate the minimum number
-- of bits known to be large enough to hold the given range of values.
-- So far, so good, but GNAT has to obey the RM rules, so the question is
-- under what conditions must the RM Size be used. The following is a list
-- of the occasions on which the RM Size must be used:
-- Component size for packed arrays or records
-- Value of the attribute Size for a type
-- Warning about sizes not matching for unchecked conversion
-- The RM_Size field keeps track of the RM Size as needed in these
-- three situations.
-- For elementary types other than discrete and fixed-point types, the
-- Object_Size and Value_Size are the same (and equivalent to the RM
-- attribute Size). Only Size may be specified for such types.
-- For composite types, Object_Size and Value_Size are computed from their
-- respective value for the type of each element as well as the layout.
-- All size attributes are stored as Uint values. Negative values are used to
-- reference GCC expressions for the case of non-static sizes, as explained
-- in Repinfo.
--------------------------------------
-- Delayed Freezing and Elaboration --
--------------------------------------
-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
-- freeze node, which appears later in the expanded tree.
-- a) The flag is used by the front end to trigger expansion activities which
-- include the generation of that freeze node. Typically this happens at the
-- end of the current compilation unit, or before the first subprogram body is
-- encountered in the current unit. See units Freeze and Exp_Ch13 for details
-- on the actions triggered by a freeze node, which include the construction
-- of initialization procedures and dispatch tables.
-- b) The presence of a freeze node on an entity is used by the back end to
-- defer elaboration of the entity until its freeze node is seen. In the
-- absence of an explicit freeze node, an entity is frozen (and elaborated)
-- at the point of declaration.
-- For object declarations, the flag is set when an address clause for the
-- object is encountered. Legality checks on the address expression only take
-- place at the freeze point of the object. In Ada 2012, the flag is also set
-- when an address aspect for the object is encountered.
-- Most types have an explicit freeze node, because they cannot be elaborated
-- until all representation and operational items that apply to them have been
-- analyzed. Private types and incomplete types have the flag set as well, as
-- do task and protected types.
-- Implicit base types created for type derivations, as well as class-wide
-- types created for all tagged types, have the flag set.
-- If a subprogram has an access parameter whose designated type is incomplete
-- the subprogram has the flag set.
-----------------------
-- Entity Attributes --
-----------------------
-- This section contains a complete list of the attributes that are defined
-- on entities. Some attributes apply to all entities, others only to certain
-- kinds of entities. In the latter case the attribute should only be set or
-- accessed if the Ekind field indicates an appropriate entity.
-- There are two kinds of attributes that apply to entities, stored and
-- synthesized. Stored attributes correspond to a field or flag in the entity
-- itself. Such attributes are identified in the table below by giving the
-- field or flag in the attribute that is used to hold the attribute value.
-- Synthesized attributes are not stored directly, but are rather computed as
-- needed from other attributes, or from information in the tree. These are
-- marked "synthesized" in the table below. The stored attributes have both
-- access functions and set procedures to set the corresponding values, while
-- synthesized attributes have only access functions.
-- Note: in the case of Node, Uint, or Elist fields, there are cases where the
-- same physical field is used for different purposes in different entities,
-- so these access functions should only be referenced for the class of
-- entities in which they are defined as being present. Flags are not
-- overlapped in this way, but nevertheless as a matter of style and
-- abstraction (which may or may not be checked by assertions in the
-- body), this restriction should be observed for flag fields as well.
-- Note: certain of the attributes on types apply only to base types, and
-- are so noted by the notation [base type only]. These are cases where the
-- attribute of any subtype is the same as the attribute of the base type.
-- The attribute can be referenced on a subtype (and automatically retrieves
-- the value from the base type). However, it is an error to try to set the
-- attribute on other than the base type, and if assertions are enabled,
-- an attempt to set the attribute on a subtype will raise an assert error.
-- Other attributes are noted as applying to the [implementation base type
-- only]. These are representation attributes which must always apply to a
-- full non-private type, and where the attributes are always on the full
-- type. The attribute can be referenced on a subtype (and automatically
-- retrieves the value from the implementation base type). However, it is an
-- error to try to set the attribute on other than the implementation base
-- type, and if assertions are enabled, an attempt to set the attribute on a
-- subtype will raise an assert error.
-- Abstract_States (Elist25)
-- Defined for E_Package entities. Contains a list of all the abstract
-- states declared by the related package.
-- Accept_Address (Elist21)
-- Defined in entries. If an accept has a statement sequence, then an
-- address variable is created, which is used to hold the address of the
-- parameters, as passed by the runtime. Accept_Address holds an element
-- list which represents a stack of entities for these address variables.
-- The current entry is the top of the stack, which is the last element
-- on the list. A stack is required to handle the case of nested select
-- statements referencing the same entry.
-- Access_Disp_Table (Elist16) [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
-- types to point to their dispatch tables. The first two entities are
-- associated with the primary dispatch table: 1) primary dispatch table
-- with user-defined primitives 2) primary dispatch table with predefined
-- primitives. For each interface type covered by the tagged type we also
-- have: 3) secondary dispatch table with thunks of primitives covering
-- user-defined interface primitives, 4) secondary dispatch table with
-- thunks of predefined primitives, 5) secondary dispatch table with user
-- defined primitives, and 6) secondary dispatch table with predefined
-- primitives. The last entity of this list is an access type declaration
-- used to expand dispatching calls through the primary dispatch table.
-- For an untagged record, contains No_Elist.
-- Access_Disp_Table_Elab_Flag (Node30) [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
-- types whose dispatch table elaboration must be completed at run time
-- by the IP routine to point to its pending elaboration flag entity.
-- This flag is needed when the elaboration of the dispatch table relies
-- on attribute 'Position applied to an object of the type; it is used by
-- the IP routine to avoid performing this elaboration twice.
-- Access_Subprogram_Wrapper (Node41)
-- Entity created for access_to_subprogram types that have pre/post
-- conditions. Wrapper subprogram is created when analyzing corresponding
-- aspect, and inherits said aspects. Body of subprogram includes code
-- to check contracts, and a direct call to the designated subprogram.
-- The body is part of the freeze actions for the type.
-- The Subprogram_Type created for the Access_To_Subprogram carries the
-- Access_Subprogram_Wrapper for use in the expansion of indirect calls.
-- Activation_Record_Component (Node31)
-- Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal
-- parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case
-- a reference to an uplevel entity produces a corresponding component
-- in the generated ARECnT activation record (Exp_Unst for details).
-- Actual_Subtype (Node17)
-- Defined in variables, constants, and formal parameters. This is the
-- subtype imposed by the value of the object, as opposed to its nominal
-- subtype, which is imposed by the declaration. The actual subtype
-- differs from the nominal one when the latter is indefinite (as in the
-- case of an unconstrained formal parameter, or a variable declared
-- with an unconstrained type and an initial value). The nominal subtype
-- is the Etype entry for the entity. The Actual_Subtype field is set
-- only if the actual subtype differs from the nominal subtype. If the
-- actual and nominal subtypes are the same, then the Actual_Subtype
-- field is Empty, and Etype indicates both types.
--
-- For objects, the Actual_Subtype is set only if this is a discriminated
-- type. For arrays, the bounds of the expression are obtained and the
-- Etype of the object is directly the constrained subtype. This is
-- rather irregular, and the semantic checks that depend on the nominal
-- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
-- Address_Clause (synthesized)
-- Applies to entries, objects and subprograms. Set if an address clause
-- is present which references the object or subprogram and points to
-- the N_Attribute_Definition_Clause node. Empty if no Address clause.
-- The expression in the address clause is always a constant that is
-- defined before the entity to which the address clause applies.
-- Note: The backend references this field in E_Task_Type entities???
-- Address_Taken (Flag104)
-- Defined in all entities. Set if the Address or Unrestricted_Access
-- attribute is applied directly to the entity, i.e. the entity is the
-- entity of the prefix of the attribute reference. Also set if the
-- entity is the second argument of an Asm_Input or Asm_Output attribute,
-- as the construct may entail taking its address. And also set if the
-- entity is a subprogram and the Access or Unchecked_Access attribute is
-- applied. Used by the backend to make sure that the address can be
-- meaningfully taken, and also in the case of subprograms to control
-- output of certain warnings.
-- Aft_Value (synthesized)
-- Applies to fixed and decimal types. Computes a universal integer that
-- holds value of the Aft attribute for the type.
-- Alias (Node18)
-- Defined in overloadable entities (literals, subprograms, entries) and
-- subprograms that cover a primitive operation of an abstract interface
-- (that is, subprograms with the Interface_Alias attribute). In case of
-- overloaded entities it points to the parent subprogram of a derived
-- subprogram. In case of abstract interface subprograms it points to the
-- subprogram that covers the abstract interface primitive. Also used for
-- a subprogram renaming, where it points to the renamed subprogram. For
-- an inherited operation (of a type extension) that is overridden in a
-- private part, the Alias is the overriding operation. In this fashion a
-- call from outside the package ends up executing the new body even if
-- non-dispatching, and a call from inside calls the overriding operation
-- because it hides the implicit one. Alias is always empty for entries.
-- Alignment (Uint14)
-- Defined in entities for types and also in constants, variables
-- (including exceptions where it refers to the static data allocated for
-- an exception), loop parameters, and formal parameters. This indicates
-- the desired alignment for a type, or the actual alignment for an
-- object. A value of zero (Uint_0) indicates that the alignment has not
-- been set yet. The alignment can be set by an explicit alignment
-- clause, or set by the front-end in package Layout, or set by the
-- back-end as part of the back-end back-annotation process. The
-- alignment field is also defined in E_Exception entities, but there it
-- is used only by the back-end for back annotation.
-- Alignment_Clause (synthesized)
-- Applies to all entities for types and objects. If an alignment
-- attribute definition clause is present for the entity, then this
-- function returns the N_Attribute_Definition clause that specifies the
-- alignment. If no alignment clause applies to the type, then the call
-- to this function returns Empty. Note that the call can return a
-- non-Empty value even if Has_Alignment_Clause is not set (happens with
-- subtype and derived type declarations). Note also that a record
-- definition clause with an (obsolescent) mod clause is converted
-- into an attribute definition clause for this purpose.
-- Anonymous_Designated_Type (Node35)
-- Defined in variables which represent anonymous finalization masters.
-- Contains the designated type which is being serviced by the master.
-- Anonymous_Masters (Elist29)
-- Defined in packages, subprograms, and subprogram bodies. Contains a
-- list of anonymous finalization masters declared within the related
-- unit. The list acts as a mapping between a master and a designated
-- type.
-- Anonymous_Object (Node30)
-- Present in protected and task type entities. Contains the entity of
-- the anonymous object created for a single protected or task type.
-- Associated_Entity (Node37)
-- Defined in all entities. This field is similar to Associated_Node, but
-- applied to entities. The attribute links an entity from the generic
-- template with its corresponding entity in the analyzed generic copy.
-- The global references mechanism relies on the Associated_Entity to
-- infer the context.
-- Associated_Formal_Package (Node12)
-- Defined in packages that are the actuals of formal_packages. Points
-- to the entity in the declaration for the formal package.
-- Associated_Node_For_Itype (Node8)
-- Defined in all type and subtype entities. Set non-Empty only for
-- Itypes. Set to point to the associated node for the Itype, i.e.
-- the node whose elaboration generated the Itype. This is used for
-- copying trees, to determine whether or not to copy an Itype, and
-- also for accessibility checks on anonymous access types. This
-- node is typically an object declaration, component declaration,
-- type or subtype declaration.
-- For an access discriminant in a type declaration, the associated_
-- node_for_itype is the corresponding discriminant specification.
-- For an access parameter it is the enclosing subprogram declaration.
-- For an access_to_protected_subprogram parameter it is the declaration
-- of the corresponding formal parameter.
--
-- Itypes have no explicit declaration, and therefore are not attached to
-- the tree: their Parent field is always empty. The Associated_Node_For_
-- Itype is the only way to determine the construct that leads to the
-- creation of a given itype entity.
-- Associated_Storage_Pool (Node22) [root type only]
-- Defined in simple and general access type entities. References the
-- storage pool to be used for the corresponding collection. A value of
-- Empty means that the default pool is to be used. This is defined
-- only in the root type, since derived types must have the same pool
-- as the parent type.
-- Barrier_Function (Node12)
-- Defined in protected entries and entry families. This is the
-- subprogram declaration for the body of the function that returns
-- the value of the entry barrier.
-- Base_Type (synthesized)
-- Applies to all type and subtype entities. Returns the base type of a
-- type or subtype. The base type of a type is the type itself. The base
-- type of a subtype is the type that it constrains (which is always
-- a type entity, not some other subtype). Note that in the case of a
-- subtype of a private type, it is possible for the base type attribute
-- to return a private type, even if the subtype to which it applies is
-- non-private. See also Implementation_Base_Type. Note: it is allowed to
-- apply Base_Type to other than a type, in which case it simply returns
-- the entity unchanged.
-- Block_Node (Node11)
-- Defined in block entities. Points to the identifier in the
-- Block_Statement itself. Used when retrieving the block construct
-- for finalization purposes, the block entity has an implicit label
-- declaration in the enclosing declarative part, and has otherwise
-- no direct connection in the tree with the block statement. The
-- link is to the identifier (which is an occurrence of the entity)
-- and not to the block_statement itself, because the statement may
-- be rewritten, e.g. in the process of removing dead code.
-- Body_Entity (Node19)
-- Defined in package and generic package entities, points to the
-- corresponding package body entity if one is present.
-- Body_Needed_For_SAL (Flag40)
-- Defined in package and subprogram entities that are compilation
-- units. Indicates that the source for the body must be included
-- when the unit is part of a standalone library.
-- Body_Needed_For_Inlining (Flag299)
-- Defined in package entities that are compilation units. Used to
-- determine whether the body unit needs to be compiled when the
-- package declaration appears in the list of units to inline. A body
-- is needed for inline processing if the unit declaration contains
-- functions that carry pragma Inline or Inline_Always, or if it
-- contains a generic unit that requires a body.
--
-- Body_References (Elist16)
-- Defined in abstract state entities. Contains an element list of
-- references (identifiers) that appear in a package body whose spec
-- defines the related state. If the body refines the said state, all
-- references on this list are illegal due to the visible refinement.
-- BIP_Initialization_Call (Node29)
-- Defined in constants and variables whose corresponding declaration
-- is wrapped in a transient block and the inital value is provided by
-- a build-in-place function call. Contains the relocated build-in-place
-- call after the expansion has decoupled the call from the object. This
-- attribute is used by the finalization machinery to insert cleanup code
-- for all additional transient objects found in the transient block.
-- C_Pass_By_Copy (Flag125) [implementation base type only]
-- Defined in record types. Set if a pragma Convention for the record
-- type specifies convention C_Pass_By_Copy. This convention name is
-- treated as identical in all respects to convention C, except that
-- if it is specified for a record type, then the C_Pass_By_Copy flag
-- is set, and if a foreign convention subprogram has a formal of the
-- corresponding type, then the parameter passing mechanism will be
-- set to By_Copy (unless specifically overridden by an Import or
-- Export pragma).
-- Can_Never_Be_Null (Flag38)
-- This flag is defined in all entities. It is set in an object which can
-- never have a null value. Set for constant access values initialized to
-- a non-null value. This is also set for all access parameters in Ada 83
-- and Ada 95 modes, and for access parameters that explicitly exclude
-- null in Ada 2005 mode.
--
-- This is used to avoid unnecessary resetting of the Is_Known_Non_Null
-- flag for such entities. In Ada 2005 mode, this is also used when
-- determining subtype conformance of subprogram profiles to ensure
-- that two formals have the same null-exclusion status.
--
-- This is also set on some access types, e.g. the Etype of the anonymous
-- access type of a controlling formal.
-- Can_Use_Internal_Rep (Flag229) [base type only]
-- Defined in Access_Subprogram_Kind nodes. This flag is set by the
-- front end and used by the backend. False means that the backend
-- must represent the type in the same way as Convention-C types (and
-- other foreign-convention types). On many targets, this means that
-- the backend will use dynamically generated trampolines for nested
-- subprograms. True means that the backend can represent the type in
-- some internal way. On the aforementioned targets, this means that the
-- backend will not use dynamically generated trampolines. This flag
-- must be False if Has_Foreign_Convention is True; otherwise, the front
-- end is free to set the policy.
--
-- Setting this False in all cases corresponds to the traditional back
-- end strategy, where all access-to-subprogram types are represented the
-- same way, independent of the Convention. For further details, see also
-- Always_Compatible_Rep in Targparm.
--
-- Efficiency note: On targets that use dynamically generated
-- trampolines, False generally favors efficiency of top-level
-- subprograms, whereas True generally favors efficiency of nested
-- ones. On other targets, this flag has little or no effect on
-- efficiency. The front end should take this into account. In
-- particular, pragma Favor_Top_Level gives a hint that the flag
-- should be False.
--
-- Note: We considered using Convention-C for this purpose, but we need
-- this separate flag, because Convention-C implies that in the case of
-- P'[Unrestricted_]Access, P also have convention C. Sometimes we want
-- to have Can_Use_Internal_Rep False for an access type, but allow P to
-- have convention Ada.
-- Chars (Name1)
-- Defined in all entities. This field contains an entry into the names
-- table that has the character string of the identifier, character
-- literal or operator symbol. See Namet for further details. Note that
-- throughout the processing of the front end, this name is the simple
-- unqualified name. However, just before the backend is called, a call
-- is made to Qualify_All_Entity_Names. This causes entity names to be
-- qualified using the encoding described in exp_dbug.ads, and from that
-- point (including post backend steps, e.g. cross-reference generation),
-- the entities will contain the encoded qualified names.
-- Checks_May_Be_Suppressed (Flag31)
-- Defined in all entities. Set if a pragma Suppress or Unsuppress
-- mentions the entity specifically in the second argument. If this
-- flag is set the Global_Entity_Suppress and Local_Entity_Suppress
-- tables must be consulted to determine if there actually is an active
-- Suppress or Unsuppress pragma that applies to the entity.
-- Class_Wide_Clone (Node38)
-- Defined on subprogram entities. Set if the subprogram has a class-wide
-- ore- or postcondition, and the expression contains calls to other
-- primitive funtions of the type. Used to implement properly the
-- semantics of inherited operations whose class-wide condition may
-- be different from that of the ancestor (See AI012-0195).
-- Class_Wide_Type (Node9)
-- Defined in all type entities. For a tagged type or subtype, returns
-- the corresponding implicitly declared class-wide type. For a
-- class-wide type, returns itself. Set to Empty for untagged types.
-- Cloned_Subtype (Node16)
-- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
-- Each such entity can either have a Discriminant_Constraint, in
-- which case it represents a distinct type from the base type (and
-- will have a list of components and discriminants in the list headed by
-- First_Entity) or else no such constraint, in which case it will be a
-- copy of the base type.
--
-- o Each element of the list in First_Entity is copied from the base
-- type; in that case, this field is Empty.
--
-- o The list in First_Entity is shared with the base type; in that
-- case, this field points to that entity.
--
-- A record or classwide subtype may also be a copy of some other
-- subtype and share the entities in the First_Entity with that subtype.
-- In that case, this field points to that subtype.
--
-- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
-- this field. Note that this field ONLY appears in subtype entities, not
-- in type entities, it is not defined, and it is an error to reference
-- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
-- Comes_From_Source
-- This flag appears on all nodes, including entities, and indicates
-- that the node was created by the scanner or parser from the original
-- source. Thus for entities, it indicates that the entity is defined
-- in the original source program.
-- Component_Alignment (special field) [base type only]
-- Defined in array and record entities. Contains a value of type
-- Component_Alignment_Kind indicating the alignment of components.
-- Set to Calign_Default normally, but can be overridden by use of
-- the Component_Alignment pragma. Note: this field is currently
-- stored in a non-standard way, see body for details.
-- Component_Bit_Offset (Uint11)
-- Defined in record components (E_Component, E_Discriminant). First
-- bit position of given component, computed from the first bit and
-- position values given in the component clause. A value of No_Uint
-- means that the value is not yet known. The value can be set by the
-- appearance of an explicit component clause in a record representation
-- clause, or it can be set by the front-end in package Layout, or it can
-- be set by the backend. By the time backend processing is completed,
-- this field is always set. A negative value is used to represent
-- a value which is not known at compile time, and must be computed
-- at run-time (this happens if fields of a record have variable
-- lengths). See package Layout for details of these values.
--
-- Note: Component_Bit_Offset is redundant with respect to the fields
-- Normalized_First_Bit and Normalized_Position, and could in principle
-- be eliminated, but it is convenient in several situations, including
-- use in the backend, to have this redundant field.
-- Component_Clause (Node13)
-- Defined in record components and discriminants. If a record
-- representation clause is present for the corresponding record type a
-- that specifies a position for the component, then the Component_Clause
-- field of the E_Component entity points to the N_Component_Clause node.
-- Set to Empty if no record representation clause was present, or if
-- there was no specification for this component.
-- Component_Size (Uint22) [implementation base type only]
-- Defined in array types. It contains the component size value for
-- the array. A value of No_Uint means that the value is not yet set.
-- The value can be set by the use of a component size clause, or
-- by the front end in package Layout, or by the backend. A negative
-- value is used to represent a value which is not known at compile
-- time, and must be computed at run-time (this happens if the type
-- of the component has a variable length size). See package Layout
-- for details of these values.
-- Component_Type (Node20) [implementation base type only]
-- Defined in array types and string types. References component type.
-- Contains_Ignored_Ghost_Code (Flag279)
-- Defined in blocks, packages and their bodies, subprograms and their
-- bodies. Set if the entity contains any ignored Ghost code in the form
-- of declaration, procedure call, assignment statement or pragma.
-- Contract (Node34)
-- Defined in constant, entry, entry family, operator, [generic] package,
-- package body, protected unit, [generic] subprogram, subprogram body,
-- variable, task unit, and type entities. Points to the contract of the
-- entity, holding various assertion items and data classifiers.
-- Contract_Wrapper (Node25)
-- Defined in entry and entry family entities. Set only when the entry
-- [family] has contract cases, preconditions, and/or postconditions.
-- Contains the entity of a wrapper procedure which encapsulates the
-- original entry and implements precondition/postcondition semantics.
-- Corresponding_Concurrent_Type (Node18)
-- Defined in record types that are constructed by the expander to
-- represent task and protected types (Is_Concurrent_Record_Type flag
-- set). Points to the entity for the corresponding task type or the
-- protected type.
-- Corresponding_Discriminant (Node19)
-- Defined in discriminants of a derived type, when the discriminant is
-- used to constrain a discriminant of the parent type. Points to the
-- corresponding discriminant in the parent type. Otherwise it is Empty.
-- Corresponding_Equality (Node30)
-- Defined in function entities for implicit inequality operators.
-- Denotes the explicit or derived equality operation that creates
-- the implicit inequality. Note that this field is not present in
-- other function entities, only in implicit inequality routines,
-- where Comes_From_Source is always False.
-- Corresponding_Function (Node32)
-- Defined on procedures internally built with an extra out parameter
-- to return a constrained array type, when Modify_Tree_For_C is set.
-- Denotes the function that returns the constrained array type for
-- which this procedure was built.
-- Corresponding_Procedure (Node32)
-- Defined on functions that return a constrained array type, when
-- Modify_Tree_For_C is set. Denotes the internally built procedure
-- with an extra out parameter created for it.
-- Corresponding_Protected_Entry (Node18)
-- Defined in subprogram bodies. Set for subprogram bodies that implement
-- a protected type entry to point to the entity for the entry.
-- Corresponding_Record_Component (Node21)
-- Defined in components of a derived untagged record type, including
-- discriminants. For a regular component or a girder discriminant,
-- points to the corresponding component in the parent type. Set to
-- Empty for a non-girder discriminant. It is used by the back end to
-- ensure the layout of the derived type matches that of the parent
-- type when there is no representation clause on the derived type.
-- Corresponding_Record_Type (Node18)
-- Defined in protected and task types and subtypes. References the
-- entity for the corresponding record type constructed by the expander
-- (see Exp_Ch9). This type is used to represent values of the task type.
-- Corresponding_Remote_Type (Node22)
-- Defined in record types that describe the fat pointer structure for
-- Remote_Access_To_Subprogram types. References the original access
-- to subprogram type.
-- CR_Discriminant (Node23)
-- Defined in discriminants of concurrent types. Denotes the homologous
-- discriminant of the corresponding record type. The CR_Discriminant is
-- created at the same time as the discriminal, and used to replace
-- occurrences of the discriminant within the type declaration.
-- Current_Use_Clause (Node27)
-- Defined in packages and in types. For packages, denotes the use
-- package clause currently in scope that makes the package use_visible.
-- For types, it denotes the use_type clause that makes the operators of
-- the type visible. Used for more precise warning messages on redundant
-- use clauses.
-- Current_Value (Node9)
-- Defined in all object entities. Set in E_Variable, E_Constant, formal
-- parameters and E_Loop_Parameter entities if we have trackable current
-- values. Set non-Empty if the (constant) current value of the variable
-- is known. This value is valid only for references from the same
-- sequential scope as the entity. The sequential scope of an entity
-- includes the immediate scope and any contained scopes that are package
-- specs, package bodies, blocks (at any nesting level) or statement
-- sequences in IF or loop statements.
--
-- Another related use of this field is to record information about the
-- value obtained from an IF or WHILE statement condition. If the IF or
-- ELSIF or WHILE condition has the form "NOT {,NOT] OBJ RELOP VAL ",
-- or OBJ [AND [THEN]] expr, where OBJ refers to an entity with a
-- Current_Value field, RELOP is one of the six relational operators, and
-- VAL is a compile-time known value then the Current_Value field of OBJ
-- points to the N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme node
-- of the relevant construct, and the Condition field of this can be
-- consulted to give information about the value of OBJ. For more details
-- on this usage, see the procedure Exp_Util.Get_Current_Value_Condition.
-- Debug_Info_Off (Flag166)
-- Defined in all entities. Set if a pragma Suppress_Debug_Info applies
-- to the entity, or if internal processing in the compiler determines
-- that suppression of debug information is desirable. Note that this
-- flag is only for use by the front end as part of the processing for
-- determining if Needs_Debug_Info should be set. The backend should
-- always test Needs_Debug_Info, it should never test Debug_Info_Off.
-- Debug_Renaming_Link (Node25)
-- Used to link the variable associated with a debug renaming declaration
-- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
-- details of the use of this field.
-- Declaration_Node (synthesized)
-- Applies to all entities. Returns the tree node for the construct that
-- declared the entity. Normally this is just the Parent of the entity.
-- One exception arises with child units, where the parent of the entity
-- is a selected component/defining program unit name. Another exception
-- is that if the entity is an incomplete type that has been completed or
-- a private type, then we obtain the declaration node denoted by the
-- full type, i.e. the full type declaration node. Also note that for
-- subprograms, this returns the {function,procedure}_specification, not
-- the subprogram_declaration.
-- Default_Aspect_Component_Value (Node19) [base type only]
-- Defined in array types. Holds the static value specified in a
-- Default_Component_Value aspect specification for the array type,
-- or inherited on derivation.
-- Default_Aspect_Value (Node19) [base type only]
-- Defined in scalar types. Holds the static value specified in a
-- Default_Value aspect specification for the type, or inherited
-- on derivation.
-- Default_Expr_Function (Node21)
-- Defined in parameters. It holds the entity of the parameterless
-- function that is built to evaluate the default expression if it is
-- more complex than a simple identifier or literal. For the latter
-- simple cases or if there is no default value, this field is Empty.
-- Default_Expressions_Processed (Flag108)
-- A flag in subprograms (functions, operators, procedures) and in
-- entries and entry families used to indicate that default expressions
-- have been processed and to avoid multiple calls to process the
-- default expressions (see Freeze.Process_Default_Expressions), which
-- would not only waste time, but also generate false error messages.
-- Default_Value (Node20)
-- Defined in formal parameters. Points to the node representing the
-- expression for the default value for the parameter. Empty if the
-- parameter has no default value (which is always the case for OUT
-- and IN OUT parameters in the absence of errors).
-- Delay_Cleanups (Flag114)
-- Defined in entities that have finalization lists (subprograms
-- blocks, and tasks). Set if there are pending generic body
-- instantiations for the corresponding entity. If this flag is
-- set, then generation of cleanup actions for the corresponding
-- entity must be delayed, since the insertion of the generic body
-- may affect cleanup generation (see Inline for further details).
-- Delay_Subprogram_Descriptors (Flag50)
-- Defined in entities for which exception subprogram descriptors
-- are generated (subprograms, package declarations and package
-- bodies). Defined if there are pending generic body instantiations
-- for the corresponding entity. If this flag is set, then generation
-- of the subprogram descriptor for the corresponding enities must
-- be delayed, since the insertion of the generic body may add entries
-- to the list of handlers.
--
-- Note: for subprograms, Delay_Subprogram_Descriptors is set if and
-- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a
-- a block (in which case Delay_Subprogram_Descriptors is set for the
-- containing subprogram). In addition Delay_Subprogram_Descriptors is
-- set for a library level package declaration or body which contains
-- delayed instantiations (in this case the descriptor refers to the
-- enclosing elaboration procedure).
-- Delta_Value (Ureal18)
-- Defined in fixed and decimal types. Points to a universal real
-- that holds value of delta for the type, as given in the declaration
-- or as inherited by a subtype or derived type.
-- Dependent_Instances (Elist8)
-- Defined in packages that are instances. Holds list of instances
-- of inner generics. Used to place freeze nodes for those instances
-- after that of the current one, i.e. after the corresponding generic
-- bodies.
-- Depends_On_Private (Flag14)
-- Defined in all type entities. Set if the type is private or if it
-- depends on a private type.
-- Derived_Type_Link (Node31)
-- Defined in all type and subtype entities. Set in a base type if
-- a derived type declaration is encountered which derives from
-- this base type or one of its subtypes, and there are already
-- primitive operations declared. In this case, it references the
-- entity for the type declared by the derived type declaration.
-- For example:
--
-- type R is ...
-- subtype RS is R ...
-- ...
-- type G is new RS ...
--
-- In this case, if primitive operations have been declared for R, at
-- the point of declaration of G, then the Derived_Type_Link of R is set
-- to point to the entity for G. This is used to generate warnings and
-- errors for rep clauses that appear later on for R, which might result
-- in an unexpected (or illegal) implicit conversion operation.
--
-- Note: if there is more than one such derived type, the link will point
-- to the last one.
-- Designated_Type (synthesized)
-- Applies to access types. Returns the designated type. Differs from
-- Directly_Designated_Type in that if the access type refers to an
-- incomplete type, and the full type is available, then this full type
-- is returned instead of the incomplete type.
-- DIC_Procedure (synthesized)
-- Defined in all type entities. Set for a private type and its full view
-- when the type is subject to pragma Default_Initial_Condition (DIC), or
-- when the type inherits a DIC pragma from a parent type. Points to the
-- entity of a procedure which takes a single argument of the given type
-- and verifies the assertion expression of the DIC pragma at run time.
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- Digits_Value (Uint17)
-- Defined in floating point types and subtypes and decimal types and
-- subtypes. Contains the Digits value specified in the declaration.
-- Direct_Primitive_Operations (Elist10)
-- Defined in tagged types and subtypes (including synchronized types),
-- in tagged private types and in tagged incomplete types. Element list
-- of entities for primitive operations of the tagged type. Not defined
-- in untagged types. In order to follow the C++ ABI, entities of
-- primitives that come from source must be stored in this list in the
-- order of their occurrence in the sources. For incomplete types the
-- list is always empty.
-- When expansion is disabled the corresponding record type of a
-- synchronized type is not constructed. In that case, such types
-- carry this attribute directly.
-- Directly_Designated_Type (Node20)
-- Defined in access types. This field points to the type that is
-- directly designated by the access type. In the case of an access
-- type to an incomplete type, this field references the incomplete
-- type. Directly_Designated_Type is typically used in implementing the
-- static semantics of the language; in implementing dynamic semantics,
-- we typically want the full view of the designated type. The function
-- Designated_Type obtains this full type in the case of access to an
-- incomplete type.
-- Disable_Controlled (Flag253)
-- Present in all entities. Set for a controlled type subject to aspect
-- Disable_Controlled which evaluates to True. This flag is taken into
-- account in synthesized attribute Is_Controlled.
-- Discard_Names (Flag88)
-- Defined in types and exception entities. Set if pragma Discard_Names
-- applies to the entity. It is also set for declarative regions and
-- package specs for which a Discard_Names pragma with zero arguments
-- has been encountered. The purpose of setting this flag is to be able
-- to set the Discard_Names attribute on enumeration types declared
-- after the pragma within the same declarative region. This flag is
-- set to False if a Keep_Names pragma appears for an enumeration type.
-- Discriminal (Node17)
-- Defined in discriminants (Discriminant formal: GNAT's first
-- coinage). The entity used as a formal parameter that corresponds
-- to a discriminant. See section "Handling of Discriminants" for
-- full details of the use of discriminals.
-- Discriminal_Link (Node10)
-- Defined in E_In_Parameter or E_Constant entities. For discriminals,
-- points back to corresponding discriminant. For other entities, must
-- remain Empty.
-- Discriminant_Checking_Func (Node20)
-- Defined in components. Points to the defining identifier of the
-- function built by the expander returns a Boolean indicating whether
-- the given record component exists for the current discriminant
-- values.
-- Discriminant_Constraint (Elist21)
-- Defined in entities whose Has_Discriminants flag is set (concurrent
-- types, subtypes, record types and subtypes, private types and
-- subtypes, limited private types and subtypes and incomplete types).
-- It is an error to reference the Discriminant_Constraint field if
-- Has_Discriminants is False.
--
-- If the Is_Constrained flag is set, Discriminant_Constraint points
-- to an element list containing the discriminant constraints in the
-- same order in which the discriminants are declared.
--
-- If the Is_Constrained flag is not set but the discriminants of the
-- unconstrained type have default initial values then this field
-- points to an element list giving these default initial values in
-- the same order in which the discriminants are declared. Note that
-- in this case the entity cannot be a tagged record type, because
-- discriminants in this case cannot have defaults.
--
-- If the entity is a tagged record implicit type, then this field is
-- inherited from the first subtype (so that the itype is subtype
-- conformant with its first subtype, which is needed when the first
-- subtype overrides primitive operations inherited by the implicit
-- base type).
--
-- In all other cases Discriminant_Constraint contains the empty
-- Elist (i.e. it is initialized with a call to New_Elmt_List).
-- Discriminant_Default_Value (Node20)
-- Defined in discriminants. Points to the node representing the
-- expression for the default value of the discriminant. Set to
-- Empty if the discriminant has no default value.
-- Discriminant_Number (Uint15)
-- Defined in discriminants. Gives the ranking of a discriminant in
-- the list of discriminants of the type, i.e. a sequential integer
-- index starting at 1 and ranging up to number of discriminants.
-- Dispatch_Table_Wrappers (Elist26) [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in library
-- level tagged type entities if we are generating statically allocated
-- dispatch tables. Points to the list of dispatch table wrappers
-- associated with the tagged type. For an untagged record, contains
-- No_Elist.
-- DTC_Entity (Node16)
-- Defined in function and procedure entities. Set to Empty unless
-- the subprogram is dispatching in which case it references the
-- Dispatch Table pointer Component. For regular Ada tagged this, this
-- is the _Tag component. For CPP_Class types and their descendants,
-- this points to the component entity in the record that holds the
-- Vtable pointer for the Vtable containing the entry referencing the
-- subprogram.
-- DT_Entry_Count (Uint15)
-- Defined in E_Component entities. Only used for component marked
-- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
-- DT_Offset_To_Top_Func (Node25)
-- Defined in E_Component entities. Only used for component marked
-- Is_Tag. If present it stores the Offset_To_Top function used to
-- provide this value in tagged types whose ancestor has discriminants.
-- DT_Position (Uint15)
-- Defined in function and procedure entities which are dispatching
-- (should not be referenced without first checking that flag
-- Is_Dispatching_Operation is True). Contains the offset into
-- the Vtable for the entry that references the subprogram.
-- Ekind (Ekind)
-- Defined in all entities. Contains a value of the enumeration type
-- Entity_Kind declared in a subsequent section in this spec.
-- Elaborate_Body_Desirable (Flag210)
-- Defined in package entities. Set if the elaboration circuitry detects
-- a case where there is a package body that modifies one or more visible
-- entities in the package spec and there is no explicit Elaborate_Body
-- pragma for the package. This information is passed on to the binder,
-- which attempts, but does not promise, to elaborate the body as close
-- to the spec as possible.
-- Elaboration_Entity (Node13)
-- Defined in entry, entry family, [generic] package, and subprogram
-- entities. This is a counter associated with the unit that is initially
-- set to zero, is incremented when an elaboration request for the unit
-- is made, and is decremented when a finalization request for the unit
-- is made. This is used for three purposes. First, it is used to
-- implement access before elaboration checks (the counter must be
-- non-zero to call a subprogram at elaboration time). Second, it is
-- used to guard against repeated execution of the elaboration code.
-- Third, it is used to ensure that the finalization code is executed
-- only after all clients have requested it.
--
-- Note that we always allocate this counter, and set this field, but
-- we do not always actually use it. It is only used if it is needed
-- for access before elaboration use (see Elaboration_Entity_Required
-- flag) or if either the spec or the body has elaboration code. If
-- neither of these two conditions holds, then the entity is still
-- allocated (since we don't know early enough whether or not there
-- is elaboration code), but is simply not used for any purpose.
-- Elaboration_Entity_Required (Flag174)
-- Defined in entry, entry family, [generic] package, and subprogram
-- entities. Set only if Elaboration_Entity is non-Empty to indicate that
-- the counter is required to be non-zero even if there is no other
-- elaboration code. This occurs when the Elaboration_Entity counter
-- is used for access before elaboration checks. If the counter is
-- only used to prevent multiple execution of the elaboration code,
-- then if there is no other elaboration code, obviously there is no
-- need to set the flag.
-- Encapsulating_State (Node32)
-- Defined in abstract state, constant and variable entities. Contains
-- the entity of an ancestor state or a single concurrent type whose
-- refinement utilizes this item as a constituent.
-- Enclosing_Scope (Node18)
-- Defined in labels. Denotes the innermost enclosing construct that
-- contains the label. Identical to the scope of the label, except for
-- labels declared in the body of an accept statement, in which case the
-- entry_name is the Enclosing_Scope. Used to validate goto's within
-- accept statements.
-- Entry_Accepted (Flag152)
-- Defined in E_Entry and E_Entry_Family entities. Set if there is
-- at least one accept for this entry in the task body. Used to
-- generate warnings for missing accepts.
-- Entry_Bodies_Array (Node19)
-- Defined in protected types for which Has_Entries is true.
-- This is the defining identifier for the array of entry body
-- action procedures and barrier functions used by the runtime to
-- execute the user code associated with each entry.
-- Entry_Cancel_Parameter (Node23)
-- Defined in blocks. This only applies to a block statement for
-- which the Is_Asynchronous_Call_Block flag is set. It
-- contains the defining identifier of an object that must be
-- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call
-- call in the cleanup handler added to the block by
-- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean
-- object for task entry calls and a Communications_Block object
-- in the case of protected entry calls. In both cases the objects
-- are declared in outer scopes to this block.
-- Entry_Component (Node11)
-- Defined in formal parameters (in, in out and out parameters). Used
-- only for formals of entries. References the corresponding component
-- of the entry parameter record for the entry.
-- Entry_Formal (Node16)
-- Defined in components of the record built to correspond to entry
-- parameters. This field points from the component to the formal. It
-- is the back pointer corresponding to Entry_Component.
-- Entry_Index_Constant (Node18)
-- Defined in an entry index parameter. This is an identifier that
-- eventually becomes the name of a constant representing the index
-- of the entry family member whose entry body is being executed. Used
-- to expand references to the entry index specification identifier.
-- Entry_Index_Type (synthesized)
-- Applies to an entry family. Denotes Etype of the subtype indication
-- in the entry declaration. Used to resolve the index expression in an
-- accept statement for a member of the family, and in the prefix of
-- 'COUNT when it applies to a family member.
-- Entry_Max_Queue_Lengths_Array (Node35)
-- Defined in protected types for which Has_Entries is true. Contains the
-- defining identifier for the array of naturals used by the runtime to
-- limit the queue size of each entry individually.
-- Entry_Parameters_Type (Node15)
-- Defined in entries. Points to the access-to-record type that is
-- constructed by the expander to hold a reference to the parameter
-- values. This reference is manipulated (as an address) by the
-- tasking runtime. The designated record represents a packaging
-- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration
-- for further details). Entry_Parameters_Type is Empty if the entry
-- has no parameters.
-- Enumeration_Pos (Uint11)
-- Defined in enumeration literals. Contains the position number
-- corresponding to the value of the enumeration literal.
-- Enumeration_Rep (Uint12)
-- Defined in enumeration literals. Contains the representation that
-- corresponds to the value of the enumeration literal. Note that
-- this is normally the same as Enumeration_Pos except in the presence
-- of representation clauses, where Pos will still represent the
-- position of the literal within the type and Rep will have be the
-- value given in the representation clause.
-- Enumeration_Rep_Expr (Node22)
-- Defined in enumeration literals. Points to the expression in an
-- associated enumeration rep clause that provides the representation
-- value for this literal. Empty if no enumeration rep clause for this
-- literal (or if rep clause does not have an entry for this literal,
-- an error situation). This is also used to catch duplicate entries
-- for the same literal.
-- Enum_Pos_To_Rep (Node23)
-- Defined in enumeration types, but not enumeration subtypes. Set to
-- Empty unless the enumeration type has a non-standard representation,
-- i.e. at least one literal has a representation value different from
-- its position value. In this case, the alternative is the following:
-- if the representation is not contiguous, then Enum_Pos_To_Rep is the
-- entity for an array constant built when the type is frozen that maps
-- Pos values to corresponding Rep values, whose index type is Natural
-- and whose component type is the enumeration type itself; or else, if
-- the representation is contiguous, then Enum_Pos_To_Rep is the entity
-- of the index type defined above.
-- Equivalent_Type (Node18)
-- Defined in class wide types and subtypes, access to protected
-- subprogram types, and in exception types. For a classwide type, it
-- is always Empty. For a class wide subtype, it points to an entity
-- created by the expander which gives the backend an understandable
-- equivalent of the class subtype with a known size (given by an
-- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further
-- details. For E_Exception_Type, this points to the record containing
-- the data necessary to represent exceptions (for further details, see
-- System.Standard_Library). For access to protected subprograms, it
-- denotes a record that holds pointers to the operation and to the
-- protected object. For remote Access_To_Subprogram types, it denotes
-- the record that is the fat pointer representation of an RAST.
-- Esize (Uint12)
-- Defined in all types and subtypes, and also for components, constants,
-- and variables, including exceptions where it refers to the static data
-- allocated for an exception. Contains the Object_Size of the type or of
-- the object. A value of zero indicates that the value is not yet known.
--
-- For the case of components where a component clause is present, the
-- value is the value from the component clause, which must be non-
-- negative (but may be zero, which is acceptable for the case of
-- a type with only one possible value). It is also possible for Esize
-- of a component to be set without a component clause defined, which
-- means that the component size is specified, but not the position.
-- See also RM_Size and the section on "Handling of Type'Size Values".
-- During backend processing, the value is back annotated for all zero
-- values, so that after the call to the backend, the value is set.
-- Etype (Node5)
-- Defined in all entities. Represents the type of the entity, which
-- is itself another entity. For a type entity, points to the parent
-- type for a derived type, or if the type is not derived, points to
-- itself. For a subtype entity, Etype points to the base type. For
-- a class wide type, points to the corresponding specific type. For a
-- subprogram or subprogram type, Etype has the return type of a function
-- or is set to Standard_Void_Type to represent a procedure. The Etype
-- field of a package is also set to Standard_Void_Type.
--
-- Note one obscure case: for pragma Default_Storage_Pool (null), the
-- Etype of the N_Null node is Empty.
-- Extra_Accessibility (Node13)
-- Defined in formal parameters in the non-generic case. Normally Empty,
-- but if expansion is active, and a parameter is one for which a
-- dynamic accessibility check is required, then an extra formal of type
-- Natural is created (see description of field Extra_Formal), and the
-- Extra_Accessibility field of the formal parameter points to the entity
-- for this extra formal. Also defined in variables when compiling
-- receiving stubs. In this case, a non Empty value means that this
-- variable's accessibility depth has been transmitted by the caller and
-- must be retrieved through the entity designed by this field instead of
-- being computed.
-- Extra_Accessibility_Of_Result (Node19)
-- Defined in (non-generic) Function, Operator, and Subprogram_Type
-- entities. Normally Empty, but if expansion is active, and a function
-- is one for which "the accessibility level of the result ... determined
-- by the point of call" (AI05-0234) is needed, then an extra formal of
-- subtype Natural is created (see description of field Extra_Formal),
-- and the Extra_Accessibility_Of_Result field of the function points to
-- the entity for this extra formal.
-- Extra_Constrained (Node23)
-- Defined in formal parameters in the non-generic case. Normally Empty,
-- but if expansion is active and a parameter is one for which a dynamic
-- indication of its constrained status is required, then an extra formal
-- of type Boolean is created (see description of field Extra_Formal),
-- and the Extra_Constrained field of the formal parameter points to the
-- entity for this extra formal. Also defined in variables when compiling
-- receiving stubs. In this case, a non empty value means that this
-- variable's constrained status has been transmitted by the caller and
-- must be retrieved through the entity designed by this field instead of
-- being computed.
-- Extra_Formal (Node15)
-- Defined in formal parameters in the non-generic case. Certain
-- parameters require extra implicit information to be passed (e.g. the
-- flag indicating if an unconstrained variant record argument is
-- constrained, and the accessibility level for access parameters). See
-- description of Extra_Constrained, Extra_Accessibility fields for
-- further details. Extra formal parameters are constructed to represent
-- these values, and chained to the end of the list of formals using the
-- Extra_Formal field (i.e. the Extra_Formal field of the last "real"
-- formal points to the first extra formal, and the Extra_Formal field of
-- each extra formal points to the next one, with Empty indicating the
-- end of the list of extra formals). Another case of Extra_Formal arises
-- in connection with unnesting of subprograms, where the ARECnF formal
-- that represents an activation record pointer is an extra formal.
-- Extra_Formals (Node28)
-- Applies to subprograms, subprogram types, entries, and entry
-- families. Returns first extra formal of the subprogram or entry.
-- Returns Empty if there are no extra formals.
-- Finalization_Master (Node23) [root type only]
-- Defined in access-to-controlled or access-to-class-wide types. The
-- field contains the entity of the finalization master which handles
-- dynamically allocated controlled objects referenced by the access
-- type. Empty for access-to-subprogram types. Empty for access types
-- whose designated type does not need finalization actions.
-- Finalize_Storage_Only (Flag158) [base type only]
-- Defined in all types. Set on direct controlled types to which a
-- valid Finalize_Storage_Only pragma applies. This flag is also set on
-- composite types when they have at least one controlled component and
-- all their controlled components are Finalize_Storage_Only. It is also
-- inherited by type derivation except for direct controlled types where
-- the Finalize_Storage_Only pragma is required at each level of
-- derivation.
-- Finalizer (Node28)
-- Applies to package declarations and bodies. Contains the entity of the
-- library-level program which finalizes all package-level controlled
-- objects.
-- First_Component (synthesized)
-- Applies to incomplete, private, protected, record and task types.
-- Returns the first component by following the chain of declared
-- entities for the type a component is found (one with an Ekind of
-- E_Component). The discriminants are skipped. If the record is null,
-- then Empty is returned.
-- First_Component_Or_Discriminant (synthesized)
-- Similar to First_Component, but discriminants are not skipped, so will
-- find the first discriminant if discriminants are present.
-- First_Entity (Node17)
-- Defined in all entities which act as scopes to which a list of
-- associated entities is attached (blocks, class subtypes and types,
-- entries, functions, loops, packages, procedures, protected objects,
-- record types and subtypes, private types, task types and subtypes).
-- Points to a list of associated entities using the Next_Entity field
-- as a chain pointer with Empty marking the end of the list.
-- First_Exit_Statement (Node8)
-- Defined in E_Loop entity. The exit statements for a loop are chained
-- (in reverse order of appearance) using this field to point to the
-- first entry in the chain (last exit statement in the loop). The
-- entries are chained through the Next_Exit_Statement field of the
-- N_Exit_Statement node with Empty marking the end of the list.
-- First_Formal (synthesized)
-- Applies to subprograms and subprogram types, and also to entries
-- and entry families. Returns first formal of the subprogram or entry.
-- The formals are the first entities declared in a subprogram or in
-- a subprogram type (the designated type of an Access_To_Subprogram
-- definition) or in an entry.
-- First_Formal_With_Extras (synthesized)
-- Applies to subprograms and subprogram types, and also in entries
-- and entry families. Returns first formal of the subprogram or entry.
-- Returns Empty if there are no formals. The list returned includes
-- all the extra formals (see description of Extra_Formals field).
-- First_Index (Node17)
-- Defined in array types and subtypes. By introducing implicit subtypes
-- for the index constraints, we have the same structure for constrained
-- and unconstrained arrays, subtype marks and discrete ranges are
-- both represented by a subtype. This function returns the tree node
-- corresponding to an occurrence of the first index (NOT the entity for
-- the type). Subsequent indices are obtained using Next_Index. Note that
-- this field is defined for the case of string literal subtypes, but is
-- always Empty.
-- First_Literal (Node17)
-- Defined in all enumeration types, including character and boolean
-- types. This field points to the first enumeration literal entity
-- for the type (i.e. it is set to First (Literals (N)) where N is
-- the enumeration type definition node. A special case occurs with
-- standard character and wide character types, where this field is
-- Empty, since there are no enumeration literal lists in these cases.
-- Note that this field is set in enumeration subtypes, but it still
-- points to the first literal of the base type in this case.
-- First_Private_Entity (Node16)
-- Defined in all entities containing private parts (packages, protected
-- types and subtypes, task types and subtypes). The entities on the
-- entity chain are in order of declaration, so the entries for private
-- entities are at the end of the chain. This field points to the first
-- entity for the private part. It is Empty if there are no entities
-- declared in the private part or if there is no private part.
-- First_Rep_Item (Node6)
-- Defined in all entities. If non-empty, points to a linked list of
-- representation pragmas nodes and representation clause nodes that
-- apply to the entity, linked using Next_Rep_Item, with Empty marking
-- the end of the list. In the case of derived types and subtypes, the
-- new entity inherits the chain at the point of declaration. This means
-- that it is possible to have multiple instances of the same kind of rep
-- item on the chain, in which case it is the first one that applies to
-- the entity.
--
-- Note: pragmas that can apply to more than one overloadable entity,
-- (Convention, Interface, Inline, Inline_Always, Import, Export,
-- External) are never present on this chain when they apply to
-- overloadable entities, since it is impossible for a given pragma
-- to be on more than one chain at a time.
--
-- For most representation items, the representation information is
-- reflected in other fields and flags in the entity. For example if a
-- record representation clause is present, the component entities
-- reflect the specified information. However, there are some items that
-- are only reflected in the chain. These include:
--
-- Machine_Attribute pragma
-- Link_Alias pragma
-- Linker_Constructor pragma
-- Linker_Destructor pragma
-- Weak_External pragma
-- Thread_Local_Storage pragma
--
-- If any of these items are present, then the flag Has_Gigi_Rep_Item is
-- set, indicating that the backend should search the chain.
--
-- Other representation items are included in the chain so that error
-- messages can easily locate the relevant nodes for posting errors.
-- Note in particular that size clauses are defined only for this
-- purpose, and should only be accessed if Has_Size_Clause is set.
-- Float_Rep (Uint10)
-- Defined in floating-point entities. Contains a value of type
-- Float_Rep_Kind. Together with the Digits_Value uniquely defines
-- the floating-point representation to be used.
-- Freeze_Node (Node7)
-- Defined in all entities. If there is an associated freeze node for the
-- entity, this field references this freeze node. If no freeze node is
-- associated with the entity, then this field is Empty. See package
-- Freeze for further details.
-- From_Limited_With (Flag159)
-- Defined in abtract states, package and type entities. Set to True when
-- the related entity is generated by the expansion of a limited with
-- clause. Such an entity is said to be a "shadow" - it acts as the
-- abstract view of a state or variable or as the incomplete view of a
-- type by inheriting relevant attributes from the said entity.
-- Full_View (Node11)
-- Defined in all type and subtype entities and in deferred constants.
-- References the entity for the corresponding full type or constant
-- declaration. For all types other than private and incomplete types,
-- this field always contains Empty. If an incomplete type E1 is
-- completed by a private type E2 whose full type declaration entity is
-- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
-- also Underlying_Type.
-- Generic_Homonym (Node11)
-- Defined in generic packages. The generic homonym is the entity of
-- a renaming declaration inserted in every generic unit. It is used
-- to resolve the name of a local entity that is given by a qualified
-- name, when the generic entity itself is hidden by a local name.
-- Generic_Renamings (Elist23)
-- Defined in package and subprogram instances. Holds mapping that
-- associates generic parameters with the corresponding instances, in
-- those cases where the instance is an entity.
-- Handler_Records (List10)
-- Defined in subprogram and package entities. Points to a list of
-- identifiers referencing the handler record entities for the
-- corresponding unit.
-- Has_Aliased_Components (Flag135) [implementation base type only]
-- Defined in array type entities. Indicates that the component type
-- of the array is aliased. Should this also be set for records to
-- indicate that at least one component is aliased (see processing in
-- Sem_Prag.Process_Atomic_Independent_Shared_Volatile???)
-- Has_Alignment_Clause (Flag46)
-- Defined in all type entities and objects. Indicates if an alignment
-- clause has been given for the entity. If set, then Alignment_Clause
-- returns the N_Attribute_Definition node for the alignment attribute
-- definition clause. Note that it is possible for this flag to be False
-- even when Alignment_Clause returns non_Empty (this happens in the case
-- of derived type declarations).
-- Has_All_Calls_Remote (Flag79)
-- Defined in all library unit entities. Set if the library unit has an
-- All_Calls_Remote pragma. Note that such entities must also be RCI
-- entities, so the flag Is_Remote_Call_Interface will always be set if
-- this flag is set.
-- Has_Atomic_Components (Flag86) [implementation base type only]
-- Defined in all types and objects. Set only for an array type or
-- an array object if a valid pragma Atomic_Components applies to the
-- type or object. Note that in the case of an object, this flag is
-- only set on the object if there was an explicit pragma for the
-- object. In other words, the proper test for whether an object has
-- atomic components is to see if either the object or its base type
-- has this flag set. Note that in the case of a type, the pragma will
-- be chained to the rep item chain of the first subtype in the usual
-- manner.
-- Has_Attach_Handler (synthesized)
-- Applies to record types that are constructed by the expander to
-- represent protected types. Returns True if there is at least one
-- Attach_Handler pragma in the corresponding specification.
-- Has_Biased_Representation (Flag139)
-- Defined in discrete types (where it applies to the type'size value),
-- and to objects (both stand-alone and components), where it applies to
-- the size of the object from a size or record component clause. In
-- all cases it indicates that the size in question is smaller than
-- would normally be required, but that the size requirement can be
-- satisfied by using a biased representation, in which stored values
-- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
-- reduce the required size. For example, a type with a range of 1..2
-- takes one bit, using 0 to represent 1 and 1 to represent 2.
--
-- Note that in the object and component cases, the flag is only set if
-- the type is unbiased, but the object specifies a smaller size than the
-- size of the type, forcing biased representation for the object, but
-- the subtype is still an unbiased type.
-- Has_Completion (Flag26)
-- Defined in all entities that require a completion (functions,
-- procedures, private types, limited private types, incomplete types,
-- constants and packages that require a body). The flag is set if the
-- completion has been encountered and analyzed.
-- Has_Completion_In_Body (Flag71)
-- Defined in all entities for types and subtypes. Set only in "Taft
-- amendment types" (incomplete types whose full declaration appears in
-- the package body).
-- Has_Complex_Representation (Flag140) [implementation base type only]
-- Defined in record types. Set only for a base type to which a valid
-- pragma Complex_Representation applies.
-- Has_Component_Size_Clause (Flag68) [implementation base type only]
-- Defined in all type entities. Set if a component size clause is
-- Defined for the given type. Note that this flag can be False even
-- if Component_Size is non-zero (happens in the case of derived types).
-- Has_Constrained_Partial_View (Flag187)
-- Defined in private type and their completions, when the private
-- type has no discriminants and the full view has discriminants with
-- defaults. In Ada 2005 heap-allocated objects of such types are not
-- constrained, and can change their discriminants with full assignment.
--
-- Ada 2012 has an additional rule (3.3. (23/10.3)) concerning objects
-- declared in a generic package body. Objects whose type is an untagged
-- generic formal private type are considered to have a constrained
-- partial view. The predicate Object_Type_Has_Constrained_Partial_View
-- in sem_aux is used to test for this case.
-- Has_Contiguous_Rep (Flag181)
-- Defined in enumeration types. Set if the type has a representation
-- clause whose entries are successive integers.
-- Has_Controlled_Component (Flag43) [base type only]
-- Defined in all type and subtype entities. Set only for composite type
-- entities which contain a component that either is a controlled type,
-- or itself contains controlled component (i.e. either Is_Controlled or
-- Has_Controlled_Component is set for at least one component).
-- Has_Controlling_Result (Flag98)
-- Defined in E_Function entities. Set if the function is a primitive
-- function of a tagged type which can dispatch on result.
-- Has_Convention_Pragma (Flag119)
-- Defined in all entities. Set for an entity for which a valid pragma
-- Convention, Import, or Export has been given. Used to prevent more
-- than one such pragma appearing for a given entity (RM B.1(45)).
-- Has_Default_Aspect (Flag39) [base type only]
-- Defined in entities for types and subtypes, set for scalar types with
-- a Default_Value aspect and array types with a Default_Component_Value
-- aspect. If this flag is set, then a corresponding aspect specification
-- node will be present on the rep item chain for the entity. For a
-- derived type that inherits a default from its ancestor, the default
-- value is set, but it may be overridden by an aspect declaration on
-- type derivation.
-- Has_Delayed_Aspects (Flag200)
-- Defined in all entities. Set if the Rep_Item chain for the entity has
-- one or more N_Aspect_Definition nodes chained which are not to be
-- evaluated till the freeze point. The aspect definition expression
-- clause has been preanalyzed to get visibility at the point of use,
-- but no other action has been taken.
-- Has_Delayed_Freeze (Flag18)
-- Defined in all entities. Set to indicate that an explicit freeze
-- node must be generated for the entity at its freezing point. See
-- separate section ("Delayed Freezing and Elaboration") for details.
-- Has_Delayed_Rep_Aspects (Flag261)
-- Defined in all types and subtypes. This flag is set if there is at
-- least one aspect for a representation characteristic that has to be
-- delayed and is one of the characteristics that may be inherited by
-- types derived from this type if not overridden. If this flag is set,
-- then types derived from this type have May_Inherit_Delayed_Rep_Aspects
-- set, signalling that Freeze.Inherit_Delayed_Rep_Aspects must be called
-- at the freeze point of the derived type.
-- Has_DIC (synthesized)
-- Defined in all type entities. Set for a private type and its full view
-- when the type is subject to pragma Default_Initial_Condition (DIC), or
-- when the type inherits a DIC pragma from a parent type.
-- Has_Discriminants (Flag5)
-- Defined in all types and subtypes. For types that are allowed to have
-- discriminants (record types and subtypes, task types and subtypes,
-- protected types and subtypes, private types, limited private types,
-- and incomplete types), indicates if the corresponding type or subtype
-- has a known discriminant part. Always false for all other types.
-- Has_Dispatch_Table (Flag220)
-- Defined in E_Record_Types that are tagged. Set to indicate that the
-- corresponding dispatch table is already built. This flag is used to
-- avoid duplicate construction of library level dispatch tables (because
-- the declaration of library level objects cause premature construction
-- of the table); otherwise the code that builds the table is added at
-- the end of the list of declarations of the package.
-- Has_Dynamic_Predicate_Aspect (Flag258)
-- Defined in all types and subtypes. Set if a Dynamic_Predicate aspect
-- was explicitly applied to the type. Generally we treat predicates as
-- static if possible, regardless of whether they are specified using
-- Predicate, Static_Predicate, or Dynamic_Predicate. And if a predicate
-- can be treated as static (i.e. its expression is predicate-static),
-- then the flag Has_Static_Predicate will be set True. But there are
-- cases where legality is affected by the presence of an explicit
-- Dynamic_Predicate aspect. For example, even if a predicate looks
-- static, you can't use it in a case statement if there is an explicit
-- Dynamic_Predicate aspect specified. So test Has_Static_Predicate if
-- you just want to know if the predicate can be evaluated statically,
-- but test Has_Dynamic_Predicate_Aspect to enforce legality rules about
-- the use of dynamic predicates.
-- Has_Entries (synthesized)
-- Applies to concurrent types. True if any entries are declared
-- within the task or protected definition for the type.
-- Has_Enumeration_Rep_Clause (Flag66)
-- Defined in enumeration types. Set if an enumeration representation
-- clause has been given for this enumeration type. Used to prevent more
-- than one enumeration representation clause for a given type. Note
-- that this does not imply a representation with holes, since the rep
-- clause may merely confirm the default 0..N representation.
-- Has_Exit (Flag47)
-- Defined in loop entities. Set if the loop contains an exit statement.
-- Has_Expanded_Contract (Flag240)
-- Defined in functions, procedures, entries, and entry families. Set
-- when a subprogram has a N_Contract node that has been expanded. The
-- flag prevents double expansion of a contract when a construct is
-- rewritten into something else and subsequently reanalyzed/expanded.
-- Has_Foreign_Convention (synthesized)
-- Applies to all entities. Determines if the Convention for the entity
-- is a foreign convention, i.e. non-native: other than Convention_Ada,
-- Convention_Intrinsic, Convention_Entry, Convention_Protected,
-- Convention_Stubbed and Convention_Ada_Pass_By_(Copy,Reference).
-- Has_Forward_Instantiation (Flag175)
-- Defined in package entities. Set for packages that instantiate local
-- generic entities before the corresponding generic body has been seen.
-- If a package has a forward instantiation, we cannot inline subprograms
-- appearing in the same package because the placement requirements of
-- the instance will conflict with the linear elaboration of front-end
-- inlining.
-- Has_Fully_Qualified_Name (Flag173)
-- Defined in all entities. Set if the name in the Chars field has been
-- replaced by the fully qualified name, as used for debug output. See
-- Exp_Dbug for a full description of the use of this flag and also the
-- related flag Has_Qualified_Name.
-- Has_Gigi_Rep_Item (Flag82)
-- Defined in all entities. Set if the rep item chain (referenced by
-- First_Rep_Item and linked through the Next_Rep_Item chain) contains a
-- representation item that needs to be specially processed by the back
-- end, i.e. one of the following items:
--
-- Machine_Attribute pragma
-- Linker_Alias pragma
-- Linker_Constructor pragma
-- Linker_Destructor pragma
-- Weak_External pragma
-- Thread_Local_Storage pragma
--
-- If this flag is set, then the backend should scan the rep item chain
-- to process any of these items that appear. At least one such item will
-- be present.
--
-- Has_Homonym (Flag56)
-- Defined in all entities. Set if an entity has a homonym in the same
-- scope. Used by the backend to generate unique names for all entities.
-- Has_Implicit_Dereference (Flag251)
-- Defined in types and discriminants. Set if the type has an aspect
-- Implicit_Dereference. Set also on the discriminant named in the aspect
-- clause, to simplify type resolution.
-- Has_Independent_Components (Flag34) [implementation base type only]
-- Defined in all types and objects. Set only for a record type or an
-- array type or array object if a valid pragma Independent_Components
-- applies to the type or object. Note that in the case of an object,
-- this flag is only set on the object if there was an explicit pragma
-- for the object. In other words, the proper test for whether an object
-- has independent components is to see if either the object or its base
-- type has this flag set. Note that in the case of a type, the pragma
-- will be chained to the rep item chain of the first subtype in the
-- usual manner. Also set if a pragma Has_Atomic_Components or pragma
-- Has_Aliased_Components applies to the type or object.
-- Has_Inheritable_Invariants (Flag248) [base type only]
-- Defined in all type entities. Set on private types and interface types
-- which define at least one class-wide invariant. Such invariants must
-- be inherited by derived types. The flag is also set on the full view
-- of a private type for completeness.
-- Has_Inherited_DIC (Flag133) [base type only]
-- Defined in all type entities. Set for a derived type which inherits
-- pragma Default_Initial_Condition from a parent type.
-- Has_Inherited_Invariants (Flag291) [base type only]
-- Defined in all type entities. Set on private extensions and derived
-- types which inherit at least one class-wide invariant from a parent or
-- an interface type. The flag is also set on the full view of a private
-- extension for completeness.
-- Has_Initial_Value (Flag219)
-- Defined in entities for variables and out parameters. Set if there
-- is an explicit initial value expression in the declaration of the
-- variable. Note that this is set only if this initial value is
-- explicit, it is not set for the case of implicit initialization
-- of access types or controlled types. Always set to False for out
-- parameters. Also defined in entities for in and in-out parameters,
-- but always false in these cases.
-- Has_Interrupt_Handler (synthesized)
-- Applies to all protected type entities. Set if the protected type
-- definition contains at least one procedure to which a pragma
-- Interrupt_Handler applies.
-- Has_Invariants (synthesized)
-- Defined in all type entities. True if the type defines at least one
-- invariant of its own or inherits at least one class-wide invariant
-- from a parent type or an interface.
-- Has_Loop_Entry_Attributes (Flag260)
-- Defined in E_Loop entities. Set when the loop is subject to at least
-- one attribute 'Loop_Entry. The flag also implies that the loop has
-- already been transformed. See Expand_Loop_Entry_Attribute for details.
-- Has_Machine_Radix_Clause (Flag83)
-- Defined in decimal types and subtypes, set if a Machine_Radix
-- representation clause is present. This flag is used to detect
-- the error of multiple machine radix clauses for a single type.
-- Has_Master_Entity (Flag21)
-- Defined in entities that can appear in the scope stack (see spec
-- of Sem). It is set if a task master entity (_master) has been
-- declared and initialized in the corresponding scope.
-- Has_Missing_Return (Flag142)
-- Defined in functions and generic functions. Set if there is one or
-- more missing return statements in the function. This is used to
-- control wrapping of the body in Exp_Ch6 to ensure that the program
-- error exception is correctly raised in this case at run time.
-- Has_Nested_Block_With_Handler (Flag101)
-- Defined in scope entities. Set if there is a nested block within the
-- scope that has an exception handler and the two scopes are in the
-- same procedure. This is used by the backend for controlling certain
-- optimizations to ensure that they are consistent with exceptions.
-- See documentation in backend for further details.
-- Has_Nested_Subprogram (Flag282)
-- Defined in subprogram entities. Set for a subprogram which contains at
-- least one nested subprogram.
-- Has_Non_Limited_View (synth)
-- Defined in E_Incomplete_Type, E_Incomplete_Subtype, E_Class_Wide_Type,
-- E_Abstract_State entities. True if their Non_Limited_View attribute
-- is present.
-- Has_Non_Null_Abstract_State (synth)
-- Defined in package entities. True if the package is subject to a non-
-- null Abstract_State aspect/pragma.
-- Has_Non_Null_Visible_Refinement (synth)
-- Defined in E_Abstract_State entities. True if the state has a visible
-- refinement of at least one variable or state constituent as expressed
-- in aspect/pragma Refined_State.
-- Has_Non_Standard_Rep (Flag75) [implementation base type only]
-- Defined in all type entities. Set when some representation clause
-- or pragma causes the representation of the item to be significantly
-- modified. In this category are changes of small or radix for a
-- fixed-point type, change of component size for an array, and record
-- or enumeration representation clauses, as well as packed pragmas.
-- All other representation clauses (e.g. Size and Alignment clauses)
-- are not considered to be significant since they do not affect
-- stored bit patterns.
-- Has_Null_Abstract_State (synth)
-- Defined in package entities. True if the package is subject to a null
-- Abstract_State aspect/pragma.
-- Has_Null_Visible_Refinement (synth)
-- Defined in E_Abstract_State entities. True if the state has a visible
-- null refinement as expressed in aspect/pragma Refined_State.
-- Has_Object_Size_Clause (Flag172)
-- Defined in entities for types and subtypes. Set if an Object_Size
-- clause has been processed for the type. Used to prevent multiple
-- Object_Size clauses for a given entity.
-- Has_Out_Or_In_Out_Parameter (Flag110)
-- Present in subprograms, generic subprograms, entries, and entry
-- families. Set if they have at least one OUT or IN OUT parameter
-- (allowed for functions only in Ada 2012).
-- Has_Own_DIC (Flag3) [base type only]
-- Defined in all type entities. Set for a private type and its full view
-- (and its underlying full view, if the full view is itsef private) when
-- the type is subject to pragma Default_Initial_Condition.
-- Has_Own_Invariants (Flag232) [base type only]
-- Defined in all type entities. Set on any type that defines at least
-- one invariant of its own.
-- Note: this flag is set on both partial and full view of types to which
-- an Invariant pragma or aspect applies, and on the underlying full view
-- if the full view is private.
-- Has_Partial_Visible_Refinement (Flag296)
-- Defined in E_Abstract_State entities. Set when a state has at least
-- one refinement constituent subject to indicator Part_Of, and analysis
-- is in the region between the declaration of the first constituent for
-- this abstract state (in the private part of the package) and the end
-- of the package spec or body with visibility over this private part
-- (which includes the package itself and its child packages).
-- Has_Per_Object_Constraint (Flag154)
-- Defined in E_Component entities. Set if the subtype of the component
-- has a per object constraint. Per object constraints result from the
-- following situations :
--
-- 1. N_Attribute_Reference - when the prefix is the enclosing type and
-- the attribute is Access.
-- 2. N_Discriminant_Association - when the expression uses the
-- discriminant of the enclosing type.
-- 3. N_Index_Or_Discriminant_Constraint - when at least one of the
-- individual constraints is a per object constraint.
-- 4. N_Range - when the lower or upper bound uses the discriminant of
-- the enclosing type.
-- 5. N_Range_Constraint - when the range expression uses the
-- discriminant of the enclosing type.
-- Has_Pragma_Controlled (Flag27) [implementation base type only]
-- Defined in access type entities. It is set if a pragma Controlled
-- applies to the access type.
-- Has_Pragma_Elaborate_Body (Flag150)
-- Defined in all entities. Set in compilation unit entities if a
-- pragma Elaborate_Body applies to the compilation unit.
-- Has_Pragma_Inline (Flag157)
-- Defined in all entities. Set for functions and procedures for which a
-- pragma Inline or Inline_Always applies to the subprogram. Note that
-- this flag can be set even if Is_Inlined is not set. This happens for
-- pragma Inline (if Inline_Active is False). In other words, the flag
-- Has_Pragma_Inline represents the formal semantic status, and is used
-- for checking semantic correctness. The flag Is_Inlined indicates
-- whether inlining is actually active for the entity.
-- Has_Pragma_Inline_Always (Flag230)
-- Defined in all entities. Set for functions and procedures for which a
-- pragma Inline_Always applies. Note that if this flag is set, the flag
-- Has_Pragma_Inline is also set.
-- Has_Pragma_No_Inline (Flag201)
-- Defined in all entities. Set for functions and procedures for which a
-- pragma No_Inline applies. Note that if this flag is set, the flag
-- Has_Pragma_Inline_Always cannot be set.
-- Has_Pragma_Ordered (Flag198) [implementation base type only]
-- Defined in entities for enumeration types. If set indicates that a
-- valid pragma Ordered was given for the type. This flag is inherited
-- by derived enumeration types. We don't need to distinguish the derived
-- case since we allow multiple occurrences of this pragma anyway.
-- Has_Pragma_Pack (Flag121) [implementation base type only]
-- Defined in array and record type entities. If set, indicates that a
-- valid pragma Pack was given for the type. Note that this flag is not
-- inherited by derived type. See also the Is_Packed flag.
-- Has_Pragma_Preelab_Init (Flag221)
-- Defined in type and subtype entities. If set indicates that a valid
-- pragma Preelaborable_Initialization applies to the type.
-- Has_Pragma_Pure (Flag203)
-- Defined in all entities. If set, indicates that a valid pragma Pure
-- was given for the entity. In some cases, we need to test whether
-- Is_Pure was explicitly set using this pragma.
-- Has_Pragma_Pure_Function (Flag179)
-- Defined in all entities. If set, indicates that a valid pragma
-- Pure_Function was given for the entity. In some cases, we need to test
-- whether Is_Pure was explicitly set using this pragma. We also set
-- this flag for some internal entities that we know should be treated
-- as pure for optimization purposes.
-- Has_Pragma_Thread_Local_Storage (Flag169)
-- Defined in all entities. If set, indicates that a valid pragma
-- Thread_Local_Storage was given for the entity.
-- Has_Pragma_Unmodified (Flag233)
-- Defined in all entities. Can only be set for variables (E_Variable,
-- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified
-- applies to the variable, indicating that no warning should be given
-- if the entity is never modified. Note that clients should generally
-- not test this flag directly, but instead use function Has_Unmodified.
-- Has_Pragma_Unreferenced (Flag180)
-- Defined in all entities. Set if a valid pragma Unreferenced applies
-- to the entity, indicating that no warning should be given if the
-- entity has no references, but a warning should be given if it is
-- in fact referenced. For private types, this flag is set in both the
-- private entity and full entity if the pragma applies to either. Note
-- that clients should generally not test this flag directly, but instead
-- use function Has_Unreferenced.
-- ??? this real description was clobbered
-- Has_Pragma_Unreferenced_Objects (Flag212)
-- Defined in all entities. Set if a valid pragma Unused applies to an
-- entity, indicating that warnings should be given if the entity is
-- modified or referenced. This pragma is equivalent to a pair of
-- Unmodified and Unreferenced pragmas.
-- Has_Pragma_Unused (Flag294)
-- Defined in all entities. Set if a valid pragma Unused applies to a
-- variable or entity, indicating that warnings should not be given if
-- it is never modified or referenced. Note: This pragma is exactly
-- equivalent Unmodified and Unreference combined.
-- Has_Predicates (Flag250)
-- Defined in type and subtype entities. Set if a pragma Predicate or
-- Predicate aspect applies to the type or subtype, or if it inherits a
-- Predicate aspect from its parent or progenitor types.
--
-- Note: this flag is set on both partial and full view of types to which
-- a Predicate pragma or aspect applies, and on the underlying full view
-- if the full view is private.
-- Has_Primitive_Operations (Flag120) [base type only]
-- Defined in all type entities. Set if at least one primitive operation
-- is defined for the type.
-- Has_Private_Ancestor (Flag151)
-- Applies to type extensions. True if some ancestor is derived from a
-- private type, making some components invisible and aggregates illegal.
-- This flag is set at the point of derivation. The legality of the
-- aggregate must be rechecked because it also depends on the visibility
-- at the point the aggregate is resolved. See sem_aggr.adb. This is part
-- of AI05-0115.
-- Has_Private_Declaration (Flag155)
-- Defined in all entities. Set if it is the defining entity of a private
-- type declaration or its corresponding full declaration. This flag is
-- thus preserved when the full and the partial views are exchanged, to
-- indicate if a full type declaration is a completion. Used for semantic
-- checks in E.4(18) and elsewhere.
-- Has_Private_Extension (Flag300)
-- Defined in tagged types. Set to indicate that the tagged type has some
-- private extension. Used to report a warning on public primitives added
-- after defining its private extensions.
-- Has_Protected (Flag271) [base type only]
-- Defined in all type entities. Set on protected types themselves, and
-- also (recursively) on any composite type which has a component for
-- which Has_Protected is set, unless the protected type is declared in
-- the private part of an internal unit. The meaning is that restrictions
-- for protected types apply to this type. Note: the flag is not set on
-- access types, even if they designate an object that Has_Protected.
-- Has_Qualified_Name (Flag161)
-- Defined in all entities. Set if the name in the Chars field has
-- been replaced by its qualified name, as used for debug output. See
-- Exp_Dbug for a full description of qualification requirements. For
-- some entities, the name is the fully qualified name, but there are
-- exceptions. In particular, for local variables in procedures, we
-- do not include the procedure itself or higher scopes. See also the
-- flag Has_Fully_Qualified_Name, which is set if the name does indeed
-- include the fully qualified name.
-- Has_RACW (Flag214)
-- Defined in package spec entities. Set if the spec contains the
-- declaration of a remote access-to-classwide type.
-- Has_Record_Rep_Clause (Flag65) [implementation base type only]
-- Defined in record types. Set if a record representation clause has
-- been given for this record type. Used to prevent more than one such
-- clause for a given record type. Note that this is initially cleared
-- for a derived type, even though the representation is inherited. See
-- also the flag Has_Specified_Layout.
-- Has_Recursive_Call (Flag143)
-- Defined in procedures. Set if a direct parameterless recursive call
-- is detected while analyzing the body. Used to activate some error
-- checks for infinite recursion.
-- Has_Shift_Operator (Flag267) [base type only]
-- Defined in integer types. Set in the base type of an integer type for
-- which at least one of the shift operators is defined.
-- Has_Size_Clause (Flag29)
-- Defined in entities for types and objects. Set if a size clause is
-- defined for the entity. Used to prevent multiple Size clauses for a
-- given entity. Note that it is always initially cleared for a derived
-- type, even though the Size for such a type is inherited from a Size
-- clause given for the parent type.
-- Has_Small_Clause (Flag67)
-- Defined in ordinary fixed point types (but not subtypes). Indicates
-- that a small clause has been given for the entity. Used to prevent
-- multiple Small clauses for a given entity. Note that it is always
-- initially cleared for a derived type, even though the Small for such
-- a type is inherited from a Small clause given for the parent type.
-- Has_Specified_Layout (Flag100) [implementation base type only]
-- Defined in all type entities. Set for a record type or subtype if
-- the record layout has been specified by a record representation
-- clause. Note that this differs from the flag Has_Record_Rep_Clause
-- in that it is inherited by a derived type. Has_Record_Rep_Clause is
-- used to indicate that the type is mentioned explicitly in a record
-- representation clause, and thus is not inherited by a derived type.
-- This flag is always False for non-record types.
-- Has_Specified_Stream_Input (Flag190)
-- Has_Specified_Stream_Output (Flag191)
-- Has_Specified_Stream_Read (Flag192)
-- Has_Specified_Stream_Write (Flag193)
-- Defined in all type and subtype entities. Set for a given view if the
-- corresponding stream-oriented attribute has been defined by an
-- attribute definition clause. When such a clause occurs, a TSS is set
-- on the underlying full view; the flags are used to track visibility of
-- the attribute definition clause for partial or incomplete views.
-- Has_Static_Discriminants (Flag211)
-- Defined in record subtypes constrained by discriminant values. Set if
-- all the discriminant values have static values, meaning that in the
-- case of a variant record, the component list can be trimmed down to
-- include only the components corresponding to these discriminants.
-- Has_Static_Predicate (Flag269)
-- Defined in all types and subtypes. Set if the type (which must be a
-- scalar type) has a predicate whose expression is predicate-static.
-- This can result from the use of any Predicate, Static_Predicate, or
-- Dynamic_Predicate aspect. We can distinguish these cases by testing
-- Has_Static_Predicate_Aspect and Has_Dynamic_Predicate_Aspect. See
-- description of the latter flag for further information on dynamic
-- predicates which are also static.
-- Has_Static_Predicate_Aspect (Flag259)
-- Defined in all types and subtypes. Set if a Static_Predicate aspect
-- applies to the type. Note that we can tell if a static predicate is
-- present by looking at Has_Static_Predicate, but this could have come
-- from a Predicate aspect or pragma or even from a Dynamic_Predicate
-- aspect. When we need to know the difference (e.g. to know what set of
-- check policies apply, use this flag and Has_Dynamic_Predicate_Aspect
-- to determine which case we have).
-- Has_Storage_Size_Clause (Flag23) [implementation base type only]
-- Defined in task types and access types. It is set if a Storage_Size
-- clause is present for the type. Used to prevent multiple clauses for
-- one type. Note that this flag is initially cleared for a derived type
-- even though the Storage_Size for such a type is inherited from a
-- Storage_Size clause given for the parent type. Note that in the case
-- of access types, this flag is defined only in the root type, since a
-- storage size clause cannot be given to a derived type.
-- Has_Stream_Size_Clause (Flag184)
-- Defined in all entities. It is set for types which have a Stream_Size
-- clause attribute. Used to prevent multiple Stream_Size clauses for a
-- given entity, and also whether it is necessary to check for a stream
-- size clause.
-- Has_Task (Flag30) [base type only]
-- Defined in all type entities. Set on task types themselves, and also
-- (recursively) on any composite type which has a component for which
-- Has_Task is set. The meaning is that an allocator or declaration of
-- such an object must create the required tasks. Note: the flag is not
-- set on access types, even if they designate an object that Has_Task.
-- Has_Timing_Event (Flag289) [base type only]
-- Defined in all type entities. Set on language defined type
-- Ada.Real_Time.Timing_Events.Timing_Event, and also (recursively) on
-- any composite type which has a component for which Has_Timing_Event
-- is set. Used for the No_Local_Timing_Event restriction.
-- Has_Thunks (Flag228)
-- Applies to E_Constant entities marked Is_Tag. True for secondary tag
-- referencing a dispatch table whose contents are pointers to thunks.
-- Has_Unchecked_Union (Flag123) [base type only]
-- Defined in all type entities. Set on unchecked unions themselves
-- and (recursively) on any composite type which has a component for
-- which Has_Unchecked_Union is set. The meaning is that a comparison
-- operation or 'Valid_Scalars reference for the type is not permitted.
-- Note that the flag is not set on access types, even if they designate
-- an object that has the flag Has_Unchecked_Union set.
-- Has_Unknown_Discriminants (Flag72)
-- Defined in all entities. Set for types with unknown discriminants.
-- Types can have unknown discriminants either from their declaration or
-- through type derivation. The use of this flag exactly meets the spec
-- in RM 3.7(26). Note that all class-wide types are considered to have
-- unknown discriminants. Note that both flags Has_Discriminants and
-- Has_Unknown_Discriminants may be true for a type. Class-wide types and
-- their subtypes have unknown discriminants and can have declared ones
-- as well. Private types declared with unknown discriminants may have a
-- full view that has explicit discriminants, and both flag will be set
-- on the partial view, to ensure that discriminants are properly
-- inherited in certain contexts.
-- Has_Visible_Refinement (Flag263)
-- Defined in E_Abstract_State entities. Set when a state has at least
-- one refinement constituent and analysis is in the region between
-- pragma Refined_State and the end of the package body declarations.
-- Has_Volatile_Components (Flag87) [implementation base type only]
-- Defined in all types and objects. Set only for an array type or array
-- object if a valid pragma Volatile_Components or a valid pragma
-- Atomic_Components applies to the type or object. Note that in the case
-- of an object, this flag is only set on the object if there was an
-- explicit pragma for the object. In other words, the proper test for
-- whether an object has volatile components is to see if either the
-- object or its base type has this flag set. Note that in the case of a
-- type the pragma will be chained to the rep item chain of the first
-- subtype in the usual manner.
-- Has_Xref_Entry (Flag182)
-- Defined in all entities. Set if an entity has an entry in the Xref
-- information generated in ali files. This is true for all source
-- entities in the extended main source file. It is also true of entities
-- in other packages that are referenced directly or indirectly from the
-- main source file (indirect reference occurs when the main source file
-- references an entity with a type reference. See package Lib.Xref for
-- further details).
-- Has_Yield_Aspect (Flag308)
-- Defined in subprograms, generic subprograms, entries, entry families.
-- Set if the entity has aspect Yield.
-- Hiding_Loop_Variable (Node8)
-- Defined in variables. Set only if a variable of a discrete type is
-- hidden by a loop variable in the same local scope, in which case
-- the Hiding_Loop_Variable field of the hidden variable points to
-- the E_Loop_Parameter entity doing the hiding. Used in processing
-- warning messages if the hidden variable turns out to be unused
-- or is referenced without being set.
-- Hidden_In_Formal_Instance (Elist30)
-- Defined on actuals for formal packages. Entities on the list are
-- formals that are hidden outside of the formal package when this
-- package is not declared with a box, or the formal itself is not
-- defaulted (see RM 12.7 (10)). Their visibility is restored on exit
-- from the current generic, because the actual for the formal package
-- may be used subsequently in the current unit.
-- Homonym (Node4)
-- Defined in all entities. Link for list of entities that have the
-- same source name and that are declared in the same or enclosing
-- scopes. Homonyms in the same scope are overloaded. Used for name
-- resolution and for the generation of debugging information.
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Present in concurrent type, entry, operator, [generic] package,
-- package body, [generic] subprogram, and subprogram body entities.
-- Set when the entity appears in an instance subject to SPARK_Mode
-- "off" and indicates that all SPARK_Mode pragmas found within must
-- be ignored.
-- Implementation_Base_Type (synthesized)
-- Applies to all entities. For types, similar to Base_Type, but never
-- returns a private type when applied to a non-private type. Instead in
-- this case, it always returns the Underlying_Type of the base type, so
-- that we still have a concrete type. For entities other than types,
-- returns the entity unchanged.
-- Import_Pragma (Node35)
-- Defined in subprogram entities. Set if a valid pragma Import or pragma
-- Import_Function or pragma Import_Procedure applies to the subprogram,
-- in which case this field points to the pragma (we can't use the normal
-- Rep_Item chain mechanism, because a single pragma Import can apply
-- to multiple subprogram entities).
-- In_Package_Body (Flag48)
-- Defined in package entities. Set on the entity that denotes the
-- package (the defining occurrence of the package declaration) while
-- analyzing and expanding the package body. Reset on completion of
-- analysis/expansion.
-- In_Private_Part (Flag45)
-- Defined in all entities. Can be set only in package entities and
-- objects. For package entities, this flag is set to indicate that the
-- private part of the package is being analyzed. The flag is reset at
-- the end of the package declaration. For objects it indicates that the
-- declaration of the object occurs in the private part of a package.
-- Incomplete_Actuals (Elist24)
-- Defined on package entities that are instances. Indicates the actuals
-- types in the instantiation that are limited views. If this list is
-- not empty, the instantiation, which appears in a package declaration,
-- is relocated to the corresponding package body, which must have a
-- corresponding nonlimited with_clause.
-- Initialization_Statements (Node28)
-- Defined in constants and variables. For a composite object initialized
-- initialized with an aggregate that has been converted to a sequence
-- of assignments, points to a block statement containing the
-- assignments.
-- Inner_Instances (Elist23)
-- Defined in generic units. Contains element list of units that are
-- instantiated within the given generic. Used to diagnose circular
-- instantiations.
-- Interface_Alias (Node25)
-- Defined in subprograms that cover a primitive operation of an abstract
-- interface type. Can be set only if the Is_Hidden flag is also set,
-- since such entities are always hidden. Points to its associated
-- interface subprogram. It is used to register the subprogram in
-- secondary dispatch table of the interface (Ada 2005: AI-251).
-- Interface_Name (Node21)
-- Defined in constants, variables, exceptions, functions, procedures,
-- and packages. Set to Empty unless an export, import, or interface name
-- pragma has explicitly specified an external name, in which case it
-- references an N_String_Literal node for the specified external name.
-- Note that if this field is Empty, and Is_Imported or Is_Exported is
-- set, then the default interface name is the name of the entity, cased
-- in a manner that is appropriate to the system in use. Note that
-- Interface_Name is ignored if an address clause is present (since it
-- is meaningless in this case).
-- Interfaces (Elist25)
-- Defined in record types and subtypes. List of abstract interfaces
-- implemented by a tagged type that are not already implemented by the
-- ancestors (Ada 2005: AI-251).
-- Invariant_Procedure (synthesized)
-- Defined in types and subtypes. Set for private types and their full
-- views if one or more [class-wide] invariants apply to the type, or
-- when the type inherits class-wide invariants from a parent type or
-- an interface, or when the type is an array and its component type is
-- subject to an invariant, or when the type is record and contains a
-- component subject to an invariant (property is recursive). Points to
-- to the entity for a procedure which checks all these invariants. The
-- invariant procedure takes a single argument of the given type, and
-- returns if the invariant holds, or raises exception Assertion_Error
-- with an appropriate message if it does not hold. This attribute is
-- defined but always Empty for private subtypes.
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- In_Use (Flag8)
-- Defined in packages and types. Set when analyzing a use clause for
-- the corresponding entity. Reset at end of corresponding declarative
-- part. The flag on a type is also used to determine the visibility of
-- the primitive operators of the type.
-- Is_Abstract_Subprogram (Flag19)
-- Defined in all subprograms and entries. Set for abstract subprograms.
-- Always False for enumeration literals and entries. See also
-- Requires_Overriding.
-- Is_Abstract_Type (Flag146)
-- Defined in all types. Set for abstract types.
-- Is_Access_Constant (Flag69)
-- Defined in access types and subtypes. Indicates that the keyword
-- constant was present in the access type definition.
-- Is_Access_Protected_Subprogram_Type (synthesized)
-- Applies to all types, true for named and anonymous access to
-- protected subprograms.
-- Is_Access_Type (synthesized)
-- Applies to all entities, true for access types and subtypes
-- Is_Access_Object_Type (synthesized)
-- Applies to all entities, true for access-to-object types and subtypes
-- Is_Activation_Record (Flag305)
-- Applies to E_In_Parameters generated in Exp_Unst for nested
-- subprograms, to mark the added formal that carries the activation
-- record created in the enclosing subprogram.
-- Is_Actual_Subtype (Flag293)
-- Defined on all types, true for the generated constrained subtypes
-- that are built for unconstrained composite actuals.
-- Is_Ada_2005_Only (Flag185)
-- Defined in all entities, true if a valid pragma Ada_05 or Ada_2005
-- applies to the entity which specifically names the entity, indicating
-- that the entity is Ada 2005 only. Note that this flag is not set if
-- the entity is part of a unit compiled with the normal no-argument form
-- of pragma Ada_05 or Ada_2005.
-- Is_Ada_2012_Only (Flag199)
-- Defined in all entities, true if a valid pragma Ada_12 or Ada_2012
-- applies to the entity which specifically names the entity, indicating
-- that the entity is Ada 2012 only. Note that this flag is not set if
-- the entity is part of a unit compiled with the normal no-argument form
-- of pragma Ada_12 or Ada_2012.
-- Is_Aliased (Flag15)
-- Defined in all entities. Set for objects and types whose declarations
-- carry the keyword aliased, and on record components that have the
-- keyword. For Ada 2012, also applies to formal parameters.
-- Is_Array_Type (synthesized)
-- Applies to all entities, true for array types and subtypes
-- Is_Asynchronous (Flag81)
-- Defined in all type entities and in procedure entities. Set
-- if a pragma Asynchronous applies to the entity.
-- Is_Atomic (Flag85)
-- Defined in all type entities, and also in constants, components, and
-- variables. Set if a pragma Atomic or Shared applies to the entity.
-- In the case of private and incomplete types, this flag is set in
-- both the partial view and the full view.
-- Is_Atomic_Or_VFA (synth)
-- Defined in all type entities, and also in constants, components and
-- variables. Set if a pragma Atomic or Shared or Volatile_Full_Access
-- applies to the entity. For many purposes VFA objects should be treated
-- the same as Atomic objects, and this predicate is intended for that
-- usage. In the case of private and incomplete types, the predicate
-- applies to both the partial view and the full view.
-- Is_Base_Type (synthesized)
-- Applies to type and subtype entities. True if entity is a base type.
-- Is_Bit_Packed_Array (Flag122) [implementation base type only]
-- Defined in all entities. This flag is set for a packed array type that
-- is bit-packed (i.e. the component size is known by the front end and
-- is in the range 1-63 but not a multiple of 8). Is_Packed is always set
-- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be
-- set without Is_Bit_Packed_Array if the component size is not known by
-- the front-end or for the case of an array having one or more index
-- types that are enumeration types with non-standard representation.
-- Is_Boolean_Type (synthesized)
-- Applies to all entities, true for boolean types and subtypes,
-- i.e. Standard.Boolean and all types ultimately derived from it.
-- Is_Called (Flag102)
-- Defined in subprograms and packages. Set if a subprogram is called
-- from the unit being compiled or a unit in the closure. Also set for
-- a package that contains called subprograms. Used only for inlining.
-- Is_Character_Type (Flag63)
-- Defined in all entities. Set for character types and subtypes,
-- i.e. enumeration types that have at least one character literal.
-- Is_Checked_Ghost_Entity (Flag277)
-- Applies to all entities. Set for abstract states, [generic] packages,
-- [generic] subprograms, components, discriminants, formal parameters,
-- objects, package bodies, subprogram bodies, and [sub]types subject to
-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
-- subject to Assertion_Policy Ghost => Check.
-- Is_Child_Unit (Flag73)
-- Defined in all entities. Set only for defining entities of program
-- units that are child units (but False for subunits).
-- Is_Class_Wide_Clone (Flag290)
-- Defined on subprogram entities. Set for subprograms built in order
-- to implement properly the inheritance of class-wide pre- or post-
-- conditions when the condition contains calls to other primitives
-- of the ancestor type. Used to implement AI12-0195.
-- Is_Class_Wide_Equivalent_Type (Flag35)
-- Defined in record types and subtypes. Set to True, if the type acts
-- as a class-wide equivalent type, i.e. the Equivalent_Type field of
-- some class-wide subtype entity references this record type.
-- Is_Class_Wide_Type (synthesized)
-- Applies to all entities, true for class wide types and subtypes
-- Is_Compilation_Unit (Flag149)
-- Defined in all entities. Set if the entity is a package or subprogram
-- entity for a compilation unit other than a subunit (since we treat
-- subunits as part of the same compilation operation as the ultimate
-- parent, we do not consider them to be separate units for this flag).
-- Is_Completely_Hidden (Flag103)
-- Defined on discriminants. Only set on girder discriminants of
-- untagged types. When set, the entity is a girder discriminant of a
-- derived untagged type which is not directly visible in the derived
-- type because the derived type or one of its ancestors have renamed the
-- discriminants in the root type. Note: there are girder discriminants
-- which are not Completely_Hidden (e.g. discriminants of a root type).
-- Is_Composite_Type (synthesized)
-- Applies to all entities, true for all composite types and subtypes.
-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
-- of any type.
-- Is_Concurrent_Record_Type (Flag20)
-- Defined in record types and subtypes. Set if the type was created
-- by the expander to represent a task or protected type. For every
-- concurrent type, such as record type is constructed, and task and
-- protected objects are instances of this record type at run time
-- (The backend will replace declarations of the concurrent type using
-- the declarations of the corresponding record type). See Exp_Ch9 for
-- further details.
-- Is_Concurrent_Type (synthesized)
-- Applies to all entities, true for task types and subtypes and for
-- protected types and subtypes.
-- Is_Constant_Object (synthesized)
-- Applies to all entities, true for E_Constant, E_Loop_Parameter, and
-- E_In_Parameter entities.
-- Is_Constrained (Flag12)
-- Defined in types or subtypes which may have index, discriminant
-- or range constraint (i.e. array types and subtypes, record types
-- and subtypes, string types and subtypes, and all numeric types).
-- Set if the type or subtype is constrained.
-- Is_Constr_Subt_For_U_Nominal (Flag80)
-- Defined in all types and subtypes. Set only for the constructed
-- subtype of an object whose nominal subtype is unconstrained. Note
-- that the constructed subtype itself will be constrained.
-- Is_Constr_Subt_For_UN_Aliased (Flag141)
-- Defined in all types and subtypes. This flag can be set only if
-- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in
-- addition the object concerned is aliased. This flag is used by
-- the backend to determine whether a template must be constructed.
-- Is_Constructor (Flag76)
-- Defined in function and procedure entities. Set if a pragma
-- CPP_Constructor applies to the subprogram.
-- Is_Controlled_Active (Flag42) [base type only]
-- Defined in all type entities. Indicates that the type is controlled,
-- i.e. is either a descendant of Ada.Finalization.Controlled or of
-- Ada.Finalization.Limited_Controlled.
-- Is_Controlled (synth) [base type only]
-- Defined in all type entities. Set if Is_Controlled_Active is set for
-- the type, and Disable_Controlled is not set.
-- Is_Controlling_Formal (Flag97)
-- Defined in all Formal_Kind entities. Marks the controlling parameters
-- of dispatching operations.
-- Is_CPP_Class (Flag74)
-- Defined in all type entities, set only for tagged types to which a
-- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied.
-- Is_CUDA_Kernel (Flag118)
-- Defined in function and procedure entities. Set if the subprogram is a
-- CUDA kernel.
-- Is_Decimal_Fixed_Point_Type (synthesized)
-- Applies to all type entities, true for decimal fixed point
-- types and subtypes.
-- Is_Descendant_Of_Address (Flag223)
-- Defined in all entities. True if the entity is type System.Address,
-- or (recursively) a subtype or derived type of System.Address.
-- Is_DIC_Procedure (Flag132)
-- Defined in functions and procedures. Set for a generated procedure
-- which verifies the assumption of pragma Default_Initial_Condition at
-- run time.
-- Is_Discrete_Or_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
-- and all fixed-point types and subtypes.
-- Is_Discrete_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
-- Is_Discrim_SO_Function (Flag176)
-- Defined in all entities. Set only in E_Function entities that Layout
-- creates to compute discriminant-dependent dynamic size/offset values.
-- Is_Discriminant_Check_Function (Flag264)
-- Defined in all entities. Set only in E_Function entities for functions
-- created to do discriminant checks.
-- Is_Discriminal (synthesized)
-- Applies to all entities, true for renamings of discriminants. Such
-- entities appear as constants or IN parameters.
-- Is_Dispatch_Table_Entity (Flag234)
-- Applies to all entities. Set to indicate to the backend that this
-- entity is associated with a dispatch table.
-- Is_Dispatching_Operation (Flag6)
-- Defined in all entities. Set for procedures, functions, generic
-- procedures, and generic functions if the corresponding operation
-- is dispatching.
-- Is_Dynamic_Scope (synthesized)
-- Applies to all Entities. Returns True if the entity is a dynamic
-- scope (i.e. a block, subprogram, task_type, entry or extended return
-- statement).
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
-- the target appears in a region which is subject to elabled elaboration
-- checks. Such targets are allowed to generate run-time conditional ABE
-- checks or guaranteed ABE failures.
-- Is_Elaboration_Target (synthesized)
-- Applies to all entities, True only for elaboration targets (see the
-- terminology in Sem_Elab).
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
-- the target appears in a region with elaboration warnings enabled.
-- Is_Elementary_Type (synthesized)
-- Applies to all entities, True for all elementary types and subtypes.
-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
-- of any type.
-- Is_Eliminated (Flag124)
-- Defined in type entities, subprogram entities, and object entities.
-- Indicates that the corresponding entity has been eliminated by use
-- of pragma Eliminate. Also used to mark subprogram entities whose
-- declaration and body are within unreachable code that is removed.
-- Is_Entry (synthesized)
-- Applies to all entities, True only for entry and entry family
-- entities and False for all other entity kinds.
-- Is_Entry_Formal (Flag52)
-- Defined in all entities. Set only for entry formals (which can only
-- be in, in-out or out parameters). This flag is used to speed up the
-- test for the need to replace references in Exp_Ch2.
-- Is_Entry_Wrapper (Flag297)
-- Defined on wrappers created for entries that have precondition aspects
-- Is_Enumeration_Type (synthesized)
-- Defined in all entities, true for enumeration types and subtypes
-- Is_Exception_Handler (Flag286)
-- Defined in blocks. Set if the block serves only as a scope of an
-- exception handler with a choice parameter. Such a block does not
-- physically appear in the tree.
-- Is_Exported (Flag99)
-- Defined in all entities. Set if the entity is exported. For now we
-- only allow the export of constants, exceptions, functions, procedures
-- and variables, but that may well change later on. Exceptions can only
-- be exported in the Java VM implementation of GNAT, which is retired.
-- Is_External_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option External or Synchronous.
-- Is_Finalized_Transient (Flag252)
-- Defined in constants, loop parameters of generalized iterators, and
-- variables. Set when a transient object has been finalized by one of
-- the transient finalization mechanisms. The flag prevents the double
-- finalization of the object.
-- Is_Finalizer (synthesized)
-- Applies to all entities, true for procedures containing finalization
-- code to process local or library level objects.
-- Is_First_Subtype (Flag70)
-- Defined in all entities. True for first subtypes (RM 3.2.1(6)),
-- i.e. the entity in the type declaration that introduced the type.
-- This may be the base type itself (e.g. for record declarations and
-- enumeration type declarations), or it may be the first subtype of
-- an anonymous base type (e.g. for integer type declarations or
-- constrained array declarations).
-- Is_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for decimal and ordinary fixed
-- point types and subtypes.
-- Is_Floating_Point_Type (synthesized)
-- Applies to all entities, true for float types and subtypes
-- Is_Formal (synthesized)
-- Applies to all entities, true for IN, IN OUT and OUT parameters
-- Is_Formal_Object (synthesized)
-- Applies to all entities, true for generic IN and IN OUT parameters
-- Is_Formal_Subprogram (Flag111)
-- Defined in all entities. Set for generic formal subprograms.
-- Is_Frozen (Flag4)
-- Defined in all type and subtype entities. Set if type or subtype has
-- been frozen.
-- Is_Generic_Actual_Subprogram (Flag274)
-- Defined on functions and procedures. Set on the entity of the renaming
-- declaration created within an instance for an actual subprogram.
-- Used to generate constraint checks on calls to these subprograms, even
-- within an instance of a predefined run-time unit, in which checks
-- are otherwise suppressed.
--
-- The flag is also set on the entity of the expression function created
-- within an instance, for a function that has external axiomatization,
-- for use in GNATprove mode.
-- Is_Generic_Actual_Type (Flag94)
-- Defined in all type and subtype entities. Set in the subtype
-- declaration that renames the generic formal as a subtype of the
-- actual. Guarantees that the subtype is not static within the instance.
-- Also used during analysis of an instance, to simplify resolution of
-- accidental overloading that occurs when different formal types get the
-- same actual.
-- Is_Generic_Instance (Flag130)
-- Defined in all entities. Set to indicate that the entity is an
-- instance of a generic unit, or a formal package (which is an instance
-- of the template).
-- Is_Generic_Subprogram (synthesized)
-- Applies to all entities. Yields True for a generic subprogram
-- (generic function, generic subprogram), False for all other entities.
-- Is_Generic_Type (Flag13)
-- Defined in all entities. Set for types which are generic formal types.
-- Such types have an Ekind that corresponds to their classification, so
-- the Ekind cannot be used to identify generic formal types.
-- Is_Generic_Unit (synthesized)
-- Applies to all entities. Yields True for a generic unit (generic
-- package, generic function, generic procedure), and False for all
-- other entities.
-- Is_Ghost_Entity (synthesized)
-- Applies to all entities. Yields True for abstract states, [generic]
-- packages, [generic] subprograms, components, discriminants, formal
-- parameters, objects, package bodies, subprogram bodies, and [sub]types
-- subject to pragma Ghost or those that inherit the Ghost property from
-- an enclosing construct.
-- Is_Hidden (Flag57)
-- Defined in all entities. Set for all entities declared in the
-- private part or body of a package. Also marks generic formals of a
-- formal package declared without a box. For library level entities,
-- this flag is set if the entity is not publicly visible. This flag
-- is reset when compiling the body of the package where the entity
-- is declared, when compiling the private part or body of a public
-- child unit, and when compiling a private child unit (see Install_
-- Private_Declaration in sem_ch7).
-- Is_Hidden_Non_Overridden_Subpgm (Flag2)
-- Defined in all entities. Set for implicitly declared subprograms
-- that require overriding or are null procedures, and are hidden by
-- a non-fully conformant homograph with the same characteristics
-- (Ada RM 8.3 12.3/2).
-- Is_Hidden_Open_Scope (Flag171)
-- Defined in all entities. Set for a scope that contains the
-- instantiation of a child unit, and whose entities are not visible
-- during analysis of the instance.
-- Is_Ignored_Ghost_Entity (Flag278)
-- Applies to all entities. Set for abstract states, [generic] packages,
-- [generic] subprograms, components, discriminants, formal parameters,
-- objects, package bodies, subprogram bodies, and [sub]types subject to
-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
-- subject to Assertion_Policy Ghost => Ignore.
-- Is_Ignored_Transient (Flag295)
-- Defined in constants, loop parameters of generalized iterators, and
-- variables. Set when a transient object must be processed by one of
-- the transient finalization mechanisms. Once marked, a transient is
-- intentionally ignored by the general finalization mechanism because
-- its clean up actions are context specific.
-- Is_Immediately_Visible (Flag7)
-- Defined in all entities. Set if entity is immediately visible, i.e.
-- is defined in some currently open scope (RM 8.3(4)).
-- Is_Implementation_Defined (Flag254)
-- Defined in all entities. Set if a pragma Implementation_Defined is
-- applied to the pragma. Used to mark all implementation defined
-- identifiers in standard library packages, and to implement the
-- restriction No_Implementation_Identifiers.
-- Is_Imported (Flag24)
-- Defined in all entities. Set if the entity is imported. For now we
-- only allow the import of exceptions, functions, procedures, packages,
-- constants, and variables. Exceptions, packages, and types can only be
-- imported in the Java VM implementation, which is retired.
-- Is_Incomplete_Or_Private_Type (synthesized)
-- Applies to all entities, true for private and incomplete types
-- Is_Incomplete_Type (synthesized)
-- Applies to all entities, true for incomplete types and subtypes
-- Is_Independent (Flag268)
-- Defined in all types and objects. Set if a valid pragma or aspect
-- Independent applies to the entity, or for a component if a valid
-- pragma or aspect Independent_Components applies to the enclosing
-- record type. Also set if a pragma Shared or pragma Atomic applies to
-- the entity, or if the declaration of the entity carries the Aliased
-- keyword. For Ada 2012, also applies to formal parameters. In the
-- case of private and incomplete types, this flag is set in both the
-- partial view and the full view.
-- Is_Initial_Condition_Procedure (Flag302)
-- Defined in functions and procedures. Set for a generated procedure
-- which verifies the assumption of pragma Initial_Condition at run time.
-- Is_Inlined (Flag11)
-- Defined in all entities. Set for functions and procedures which are
-- to be inlined. For subprograms created during expansion, this flag
-- may be set directly by the expander to request inlining. Also set
-- for packages that contain inlined subprograms, whose bodies must be
-- be compiled. Is_Inlined is also set on generic subprograms and is
-- inherited by their instances. It is also set on the body entities
-- of inlined subprograms. See also Has_Pragma_Inline.
-- Is_Inlined_Always (Flag1)
-- Defined in subprograms. Set for functions and procedures which are
-- always inlined in GNATprove mode. GNATprove uses this flag to know
-- when a body does not need to be analyzed. The value of this flag is
-- only meaningful if Body_To_Inline is not Empty for the subprogram.
-- Is_Instantiated (Flag126)
-- Defined in generic packages and generic subprograms. Set if the unit
-- is instantiated from somewhere in the extended main source unit. This
-- flag is used to control warnings about the unit being uninstantiated.
-- Also set in a package that is used as an actual for a generic package
-- formal in an instantiation. Also set on a parent instance, in the
-- instantiation of a child, which is implicitly declared in the parent.
-- Is_Integer_Type (synthesized)
-- Applies to all entities, true for integer types and subtypes
-- Is_Interface (Flag186)
-- Defined in record types and subtypes. Set to indicate that the current
-- entity corresponds to an abstract interface. Because abstract
-- interfaces are conceptually a special kind of abstract tagged type
-- we represent them by means of tagged record types and subtypes
-- marked with this attribute. This allows us to reuse most of the
-- compiler support for abstract tagged types to implement interfaces
-- (Ada 2005: AI-251).
-- Is_Internal (Flag17)
-- Defined in all entities. Set to indicate an entity created during
-- semantic processing (e.g. an implicit type, or a temporary). The
-- current uses of this flag are:
--
-- 1) Internal entities (such as temporaries generated for the result
-- of an inlined function call or dummy variables generated for the
-- debugger). Set to indicate that they need not be initialized, even
-- when scalars are initialized or normalized.
--
-- 2) Predefined primitives of tagged types. Set to mark that they
-- have specific properties: first they are primitives even if they
-- are not defined in the type scope (the freezing point is not
-- necessarily in the same scope), and second the predefined equality
-- can be overridden by a user-defined equality, no body will be
-- generated in this case.
--
-- 3) Object declarations generated by the expander that are implicitly
-- imported or exported so that they can be marked in Sprint output.
--
-- 4) Internal entities in the list of primitives of tagged types that
-- are used to handle secondary dispatch tables. These entities have
-- also the attribute Interface_Alias.
-- Is_Interrupt_Handler (Flag89)
-- Defined in procedures. Set if a pragma Interrupt_Handler applies
-- to the procedure. The procedure must be parameterless, and on all
-- targets except AAMP it must be a protected procedure.
-- Is_Intrinsic_Subprogram (Flag64)
-- Defined in functions and procedures. It is set if a valid pragma
-- Interface or Import is present for this subprogram specifying
-- convention Intrinsic. Valid means that the name and profile of the
-- subprogram match the requirements of one of the recognized intrinsic
-- subprograms (see package Sem_Intr for details). Note: the value of
-- Convention for such an entity will be set to Convention_Intrinsic,
-- but it is the setting of Is_Intrinsic_Subprogram, NOT simply having
-- convention set to intrinsic, which causes intrinsic code to be
-- generated.
-- Is_Invariant_Procedure (Flag257)
-- Defined in functions and procedures. Set for a generated invariant
-- procedure which verifies the invariants of both the partial and full
-- views of a private type or private extension as well as any inherited
-- class-wide invariants from parent types or interfaces.
-- Is_Itype (Flag91)
-- Defined in all entities. Set to indicate that a type is an Itype,
-- which means that the declaration for the type does not appear
-- explicitly in the tree. Instead the backend will elaborate the type
-- when it is first used. Has_Delayed_Freeze can be set for Itypes, and
-- the meaning is that the first use (the one which causes the type to be
-- defined) will be the freeze node. Note that an important restriction
-- on Itypes is that the first use of such a type (the one that causes it
-- to be defined) must be in the same scope as the type.
-- Is_Known_Non_Null (Flag37)
-- Defined in all entities. Relevant (and can be set) only for
-- objects of an access type. It is set if the object is currently
-- known to have a non-null value (meaning that no access checks
-- are needed). The indication can for example come from assignment
-- of an access parameter or an allocator whose value is known non-null.
--
-- Note: this flag is set according to the sequential flow of the
-- program, watching the current value of the variable. However, this
-- processing can miss cases of changing the value of an aliased or
-- constant object, so even if this flag is set, it should not be
-- believed if the variable is aliased or volatile. It would be a
-- little neater to avoid the flag being set in the first place in
-- such cases, but that's trickier, and there is only one place that
-- tests the value anyway.
--
-- The flag is dynamically set and reset as semantic analysis and
-- expansion proceeds. Its value is meaningless once the tree is
-- fully constructed, since it simply indicates the last state.
-- Thus this flag has no meaning to the backend.
-- Is_Known_Null (Flag204)
-- Defined in all entities. Relevant (and can be set ) only for
-- objects of an access type. It is set if the object is currently known
-- to have a null value (meaning that a dereference will surely raise
-- constraint error exception). The indication can come from an
-- assignment or object declaration.
--
-- The comments above about sequential flow and aliased and volatile for
-- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag.
-- Is_Known_Valid (Flag170)
-- Defined in all entities. Relevant for types (and subtype) and
-- for objects (and enumeration literals) of a discrete type.
--
-- The purpose of this flag is to implement the requirement stated
-- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
-- values may not cause programs to become erroneous. See the function
-- Checks.Expr_Known_Valid for further details. Note that the setting
-- is conservative, in the sense that if the flag is set, it must be
-- right. If the flag is not set, nothing is known about the validity.
--
-- For enumeration literals, the flag is always set, since clearly
-- an enumeration literal represents a valid value. Range checks
-- where necessary will ensure that this valid value is appropriate.
--
-- For objects, the flag indicates the state of knowledge about the
-- current value of the object. This may be modified during expansion,
-- and thus the final value is not relevant to the backend.
--
-- For types and subtypes, the flag is set if all possible bit patterns
-- of length Object_Size (i.e. Esize of the type) represent valid values
-- of the type. In general for such types, all values are valid, the
-- only exception being the case where an object of the type has an
-- explicit size that is greater than Object_Size.
--
-- For non-discrete objects, the setting of the Is_Known_Valid flag is
-- not defined, and is not relevant, since the considerations of the
-- requirement in (RM 13.9.1(9-11)) do not apply.
--
-- The flag is dynamically set and reset as semantic analysis and
-- expansion proceeds. Its value is meaningless once the tree is
-- fully constructed, since it simply indicates the last state.
-- Thus this flag has no meaning to the backend.
-- Is_Limited_Composite (Flag106)
-- Defined in all entities. Set for composite types that have a limited
-- component. Used to enforce the rule that operations on the composite
-- type that depend on the full view of the component do not become
-- visible until the immediate scope of the composite type itself
-- (RM 7.3.1 (5)).
-- Is_Limited_Interface (Flag197)
-- Defined in record types and subtypes. True for interface types, if
-- interface is declared limited, task, protected, or synchronized, or
-- is derived from a limited interface.
-- Is_Limited_Record (Flag25)
-- Defined in all entities. Set to true for record (sub)types if the
-- record is declared to be limited. Note that this flag is not set
-- simply because some components of the record are limited.
-- Is_Local_Anonymous_Access (Flag194)
-- Defined in access types. Set for an anonymous access type to indicate
-- that the type is created for a record component with an access
-- definition, an array component, or (pre-Ada 2012) a standalone object.
-- Such anonymous types have an accessibility level equal to that of the
-- declaration in which they appear, unlike the anonymous access types
-- that are created for access parameters, access discriminants, and
-- (as of Ada 2012) stand-alone objects.
-- Is_Loop_Parameter (Flag307)
-- Applies to all entities. Certain loops, in particular "for ... of"
-- loops, get transformed so that the loop parameter is declared by a
-- variable declaration, so the entity is an E_Variable. This is True for
-- such E_Variables; False otherwise.
-- Is_Machine_Code_Subprogram (Flag137)
-- Defined in subprogram entities. Set to indicate that the subprogram
-- is a machine code subprogram (i.e. its body includes at least one
-- code statement). Also indicates that all necessary semantic checks
-- as required by RM 13.8(3) have been performed.
-- Is_Modular_Integer_Type (synthesized)
-- Applies to all entities. True if entity is a modular integer type
-- Is_Non_Static_Subtype (Flag109)
-- Defined in all type and subtype entities. It is set in some (but not
-- all) cases in which a subtype is known to be non-static. Before this
-- flag was added, the computation of whether a subtype was static was
-- entirely synthesized, by looking at the bounds, and the immediate
-- subtype parent. However, this method does not work for some Itypes
-- that have no parent set (and the only way to find the immediate
-- subtype parent is to go through the tree). For now, this flag is set
-- conservatively, i.e. if it is set then for sure the subtype is non-
-- static, but if it is not set, then the type may or may not be static.
-- Thus the test for a static subtype is that this flag is clear AND that
-- the bounds are static AND that the parent subtype (if available to be
-- tested) is static. Eventually we should make sure this flag is always
-- set right, at which point, these comments can be removed, and the
-- tests for static subtypes greatly simplified.
-- Is_Null_Init_Proc (Flag178)
-- Defined in procedure entities. Set for generated init proc procedures
-- (used to initialize composite types), if the code for the procedure
-- is null (i.e. is a return and nothing else). Such null initialization
-- procedures are generated in case some client is compiled using the
-- Initialize_Scalars pragma, generating a call to this null procedure,
-- but there is no need to call such procedures within a compilation
-- unit, and this flag is used to suppress such calls.
-- Is_Null_State (synthesized)
-- Applies to all entities, true for an abstract state declared with
-- keyword null.
-- Is_Numeric_Type (synthesized)
-- Applies to all entities, true for all numeric types and subtypes
-- (integer, fixed, float).
-- Is_Object (synthesized)
-- Applies to all entities, true for entities representing objects,
-- including generic formal parameters.
-- Is_Obsolescent (Flag153)
-- Defined in all entities. Set for any entity to which a valid pragma
-- or aspect Obsolescent applies.
-- Is_Only_Out_Parameter (Flag226)
-- Defined in formal parameter entities. Set if this parameter is the
-- only OUT parameter for this formal part. If there is more than one
-- out parameter, or if there is some other IN OUT parameter then this
-- flag is not set in any of them. Used in generation of warnings.
-- Is_Ordinary_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for ordinary fixed point types and
-- subtypes.
-- Is_Package_Body_Entity (Flag160)
-- Defined in all entities. Set for entities defined at the top level
-- of a package body. Used to control externally generated names.
-- Is_Package_Or_Generic_Package (synthesized)
-- Applies to all entities. True for packages and generic packages.
-- False for all other entities.
-- Is_Packed (Flag51) [implementation base type only]
-- Defined in all type entities. This flag is set only for record and
-- array types which have a packed representation. There are four cases
-- which cause packing:
--
-- 1. Explicit use of pragma Pack to pack a record.
-- 2. Explicit use of pragma Pack to pack an array.
-- 3. Setting Component_Size of an array to a packable value.
-- 4. Indexing an array with a non-standard enumeration type.
--
-- For records, Is_Packed is always set if Has_Pragma_Pack is set, and
-- can also be set on its own in a derived type which inherited its
-- packed status.
--
-- For arrays, Is_Packed is set if either Has_Pragma_Pack is set and the
-- component size is either not known at compile time or known but not
-- 8/16/32/64 bits, or a Component_Size clause exists and the specified
-- value is smaller than 64 bits but not 8/16/32, or if the array has one
-- or more index types that are enumeration types with a non-standard
-- representation (in GNAT, we store such arrays compactly, using the Pos
-- of the enumeration type value). As for the case of records, Is_Packed
-- can be set on its own for a derived type.
-- Before an array type is frozen, Is_Packed will always be set if
-- Has_Pragma_Pack is set. Before the freeze point, it is not possible
-- to know the component size, since the component type is not frozen
-- until the array type is frozen. Thus Is_Packed for an array type
-- before it is frozen means that packed is required. Then if it turns
-- out that the component size doesn't require packing, the Is_Packed
-- flag gets turned off.
-- In the bit-packed array case (i.e. the component size is known by the
-- front end and is in the range 1-63 but not a multiple of 8), then the
-- Is_Bit_Packed_Array flag will be set once the array type is frozen.
--
-- Is_Packed_Array (synth)
-- Applies to all entities, true if entity is for a packed array.
-- Is_Packed_Array_Impl_Type (Flag138)
-- Defined in all entities. This flag is set on the entity for the type
-- used to implement a packed array (either a modular type or a subtype
-- of Packed_Bytes{1,2,4} in the bit-packed array case, a regular array
-- in the non-standard enumeration index case). It is set if and only
-- if the type appears in the Packed_Array_Impl_Type field of some other
-- entity. It is used by the back end to activate the special processing
-- for such types (unchecked conversions that would not otherwise be
-- allowed are allowed for such types). If Is_Packed_Array_Impl_Type is
-- set in an entity, then the Original_Array_Type field of this entity
-- points to the array type for which this is the Packed_Array_Impl_Type.
-- Is_Param_Block_Component_Type (Flag215) [base type only]
-- Defined in access types. Set to indicate that a type is the type of a
-- component of the parameter block record type generated by the compiler
-- for an entry or a select statement. Read by CodePeer.
-- Is_Partial_Invariant_Procedure (Flag292)
-- Defined in functions and procedures. Set for a generated invariant
-- procedure which verifies the invariants of the partial view of a
-- private type or private extension.
-- Is_Potentially_Use_Visible (Flag9)
-- Defined in all entities. Set if entity is potentially use visible,
-- i.e. it is defined in a package that appears in a currently active
-- use clause (RM 8.4(8)). Note that potentially use visible entities
-- are not necessarily use visible (RM 8.4(9-11)).
-- Is_Predicate_Function (Flag255)
-- Present in functions and procedures. Set for generated predicate
-- functions.
-- Is_Predicate_Function_M (Flag256)
-- Present in functions and procedures. Set for special version of
-- predicate function generated for use in membership tests, where
-- raise expressions are transformed to return False.
-- Is_Preelaborated (Flag59)
-- Defined in all entities, set in E_Package and E_Generic_Package
-- entities to which a pragma Preelaborate is applied, and also in
-- all entities within such packages. Note that the fact that this
-- flag is set does not necesarily mean that no elaboration code is
-- generated for the package.
-- Is_Primitive (Flag218)
-- Defined in overloadable entities and in generic subprograms. Set to
-- indicate that this is a primitive operation of some type, which may
-- be a tagged type or an untagged type. Used to verify overriding
-- indicators in bodies.
-- Is_Primitive_Wrapper (Flag195)
-- Defined in functions and procedures created by the expander to serve
-- as an indirection mechanism to overriding primitives of concurrent
-- types, entries and protected procedures.
-- Is_Prival (synthesized)
-- Applies to all entities, true for renamings of private protected
-- components. Such entities appear as constants or variables.
-- Is_Private_Composite (Flag107)
-- Defined in composite types that have a private component. Used to
-- enforce the rule that operations on the composite type that depend
-- on the full view of the component, do not become visible until the
-- immediate scope of the composite type itself (7.3.1 (5)). Both this
-- flag and Is_Limited_Composite are needed.
-- Is_Private_Descendant (Flag53)
-- Defined in entities that can represent library units (packages,
-- functions, procedures). Set if the library unit is itself a private
-- child unit, or if it is the descendant of a private child unit.
-- Is_Private_Primitive (Flag245)
-- Defined in subprograms. Set if the operation is a primitive of a
-- tagged type (procedure or function dispatching on result) whose
-- full view has not been seen. Used in particular for primitive
-- subprograms of a synchronized type declared between the two views
-- of the type, so that the wrapper built for such a subprogram can
-- be given the proper signature.
-- Is_Private_Type (synthesized)
-- Applies to all entities, true for private types and subtypes,
-- as well as for record with private types as subtypes.
-- Is_Protected_Component (synthesized)
-- Applicable to all entities, true if the entity denotes a private
-- component of a protected type.
-- Is_Protected_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared
-- protected, or is derived from protected interfaces.
-- Is_Protected_Record_Type (synthesized)
-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
-- Corresponding_Concurrent_Type is a protected type.
-- Is_Protected_Type (synthesized)
-- Applies to all entities, true for protected types and subtypes
-- Is_Public (Flag10)
-- Defined in all entities. Set to indicate that an entity defined in
-- one compilation unit can be referenced from other compilation units.
-- If this reference causes a reference in the generated code, for
-- example in the case of a variable name, then the backend will generate
-- an appropriate external name for use by the linker.
-- Is_Pure (Flag44)
-- Defined in all entities. Set in all entities of a unit to which a
-- pragma Pure is applied except for non-intrinsic imported subprograms,
-- and also set for the entity of the unit itself. In addition, this
-- flag may be set for any other functions or procedures that are known
-- to be side effect free, so in the case of subprograms, the Is_Pure
-- flag may be used by the optimizer to imply that it can assume freedom
-- from side effects (other than those resulting from assignment to Out
-- or In Out parameters, or to objects designated by access parameters).
-- Is_Pure_Unit_Access_Type (Flag189)
-- Defined in access type and subtype entities. Set if the type or
-- subtype appears in a pure unit. Used to give an error message at
-- freeze time if the access type has a storage pool.
-- Is_RACW_Stub_Type (Flag244)
-- Defined in all types, true for the stub types generated for remote
-- access-to-class-wide types.
-- Is_Raised (Flag224)
-- Defined in exception entities. Set if the entity is referenced by a
-- a raise statement.
-- Is_Real_Type (synthesized)
-- Applies to all entities, true for real types and subtypes
-- Is_Record_Type (synthesized)
-- Applies to all entities, true for record types and subtypes,
-- includes class-wide types and subtypes (which are also records).
-- Is_Relaxed_Initialization_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option Relaxed_Initialization.
-- Is_Remote_Call_Interface (Flag62)
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Remote_Call_Interface is applied, and
-- also on entities declared in the visible part of such a package.
-- Is_Remote_Types (Flag61)
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Remote_Types is applied, and also on
-- entities declared in the visible part of the spec of such a package.
-- Also set for types which are generic formal types to which the
-- pragma Remote_Access_Type applies.
-- Is_Renaming_Of_Object (Flag112)
-- Defined in all entities, set only for a variable or constant for
-- which the Renamed_Object field is non-empty and for which the
-- renaming is handled by the front end, by macro substitution of
-- a copy of the (evaluated) name tree whereever the variable is used.
-- Is_Return_Object (Flag209)
-- Defined in all object entities. True if the object is the return
-- object of an extended_return_statement; False otherwise.
-- Is_Safe_To_Reevaluate (Flag249)
-- Defined in all entities. Set in variables that are initialized by
-- means of an assignment statement. When initialized their contents
-- never change and hence they can be seen by the backend as constants.
-- See also Is_True_Constant.
-- Is_Scalar_Type (synthesized)
-- Applies to all entities, true for scalar types and subtypes
-- Is_Shared_Passive (Flag60)
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Shared_Passive is applied, and also in
-- all entities within such packages.
-- Is_Standard_Character_Type (synthesized)
-- Applies to all entities, true for types and subtypes whose root type
-- is one of the standard character types (Character, Wide_Character, or
-- Wide_Wide_Character).
-- Is_Standard_String_Type (synthesized)
-- Applies to all entities, true for types and subtypes whose root
-- type is one of the standard string types (String, Wide_String, or
-- Wide_Wide_String).
-- Is_Static_Type (Flag281)
-- Defined in entities. Only set for (sub)types. If set, indicates that
-- the type is known to be a static type (defined as a discrete type with
-- static bounds, a record all of whose component types are static types,
-- or an array, all of whose bounds are of a static type, and also have
-- a component type that is a static type). See Set_Uplevel_Type for more
-- information on how this flag is used.
-- Is_Statically_Allocated (Flag28)
-- Defined in all entities. This can only be set for exception,
-- variable, constant, and type/subtype entities. If the flag is set,
-- then the variable or constant must be allocated statically rather
-- than on the local stack frame. For exceptions, the meaning is that
-- the exception data should be allocated statically (and indeed this
-- flag is always set for exceptions, since exceptions do not have
-- local scope). For a type, the meaning is that the type must be
-- elaborated at the global level rather than locally. No type marked
-- with this flag may depend on a local variable, or on any other type
-- which does not also have this flag set to True. For a variable or
-- or constant, if the flag is set, then the type of the object must
-- either be declared at the library level, or it must also have the
-- flag set (since to allocate the object statically, its type must
-- also be elaborated globally).
-- Is_String_Type (synthesized)
-- Applies to all type entities. Determines if the given type is a
-- string type, i.e. it is directly a string type or string subtype,
-- or a string slice type, or an array type with one dimension and a
-- component type that is a character type.
-- Is_Subprogram (synthesized)
-- Applies to all entities, true for function, procedure and operator
-- entities.
-- Is_Subprogram_Or_Generic_Subprogram
-- Applies to all entities, true for function procedure and operator
-- entities, and also for the corresponding generic entities.
-- Is_Synchronized_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared
-- synchronized, task, or protected, or is derived from a synchronized
-- interface.
-- Is_Synchronized_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option Synchronous.
-- Is_Tag (Flag78)
-- Defined in E_Component and E_Constant entities. For regular tagged
-- type this flag is set on the tag component (whose name is Name_uTag).
-- For CPP_Class tagged types, this flag marks the pointer to the main
-- vtable (i.e. the one to be extended by derivation).
-- Is_Tagged_Type (Flag55)
-- Defined in all entities, set for an entity that is a tagged type
-- Is_Task_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared as
-- a task interface, or if it is derived from task interfaces.
-- Is_Task_Record_Type (synthesized)
-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
-- Corresponding_Concurrent_Type is a task type.
-- Is_Task_Type (synthesized)
-- Applies to all entities. True for task types and subtypes
-- Is_Thunk (Flag225)
-- Defined in all entities. True for subprograms that are thunks: that is
-- small subprograms built by the expander for tagged types that cover
-- interface types. As part of the runtime call to an interface, thunks
-- displace the pointer to the object (pointer named "this" in the C++
-- terminology) from a secondary dispatch table to the primary dispatch
-- table associated with a given tagged type; if the thunk is a function
-- that returns an object which covers an interface type then the thunk
-- displaces the pointer to the object from the primary dispatch table to
-- the secondary dispatch table associated with the interface type. Set
-- by Expand_Interface_Thunk and used by Expand_Call to handle extra
-- actuals associated with accessibility level.
-- Is_Trivial_Subprogram (Flag235)
-- Defined in all entities. Set in subprograms where either the body
-- consists of a single null statement, or the first or only statement
-- of the body raises an exception. This is used for suppressing certain
-- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details.
-- Is_True_Constant (Flag163)
-- Defined in all entities for constants and variables. Set in constants
-- and variables which have an initial value specified but which are
-- never assigned, partially or in the whole. For variables, it means
-- that the variable was initialized but never modified, and hence can be
-- treated as a constant by the code generator. For a constant, it means
-- that the constant was not modified by generated code (e.g. to set a
-- discriminant in an init proc). Assignments by user or generated code
-- will reset this flag. See also Is_Safe_To_Reevaluate.
-- Is_Type (synthesized)
-- Applies to all entities, true for a type entity
-- Is_Unchecked_Union (Flag117) [implementation base type only]
-- Defined in all entities. Set only in record types to which the
-- pragma Unchecked_Union has been validly applied.
-- Is_Underlying_Full_View (Flag298)
-- Defined in all entities. Set for types which represent the true full
-- view of a private type completed by another private type. For further
-- details, see attribute Underlying_Full_View.
-- Is_Underlying_Record_View (Flag246) [base type only]
-- Defined in all entities. Set only in record types that represent the
-- underlying record view. This view is built for derivations of types
-- with unknown discriminants; it is a record with the same structure
-- as its corresponding record type, but whose parent is the full view
-- of the parent in the original type extension.
-- Is_Unimplemented (Flag284)
-- Defined in all entities. Set for any entity to which a valid pragma
-- or aspect Unimplemented applies.
-- Is_Unsigned_Type (Flag144)
-- Defined in all types, but can be set only for discrete and fixed-point
-- type and subtype entities. This flag is only valid if the entity is
-- frozen. If set it indicates that the representation is known to be
-- unsigned (i.e. that no negative values appear in the range). This is
-- normally just a reflection of the lower bound of the subtype or base
-- type, but there is one case in which the setting is not obvious,
-- namely the case of an unsigned subtype of a signed type from which
-- a further subtype is obtained using variable bounds. This further
-- subtype is still unsigned, but this cannot be determined by looking
-- at its bounds or the bounds of the corresponding base type.
-- For a subtype indication whose range is statically a null range,
-- the flag is set if the lower bound is non-negative, but the flag
-- cannot be used to determine the comparison operator to emit in the
-- generated code: use the base type.
-- Is_Uplevel_Referenced_Entity (Flag283)
-- Defined in all entities. Used when unnesting subprograms to indicate
-- that an entity is locally defined within a subprogram P, and there is
-- a reference to the entity within a subprogram nested within P (at any
-- depth). Set for uplevel referenced objects (variables, constants,
-- discriminants and loop parameters), and also for upreferenced dynamic
-- types, including the cases where the reference is implicit (e.g. the
-- type of an array used for computing the location of an element in an
-- array. This is used internally in Exp_Unst, see this package for
-- further details.
-- Is_Valued_Procedure (Flag127)
-- Defined in procedure entities. Set if an Import_Valued_Procedure
-- or Export_Valued_Procedure pragma applies to the procedure entity.
-- Is_Visible_Formal (Flag206)
-- Defined in all entities. Set for instances of the formals of a
-- formal package. Indicates that the entity must be made visible in the
-- body of the instance, to reproduce the visibility of the generic.
-- This simplifies visibility settings in instance bodies.
-- Is_Visible_Lib_Unit (Flag116)
-- Defined in all (root or child) library unit entities. Once compiled,
-- library units remain chained to the entities in the parent scope, and
-- a separate flag must be used to indicate whether the names are visible
-- by selected notation, or not.
-- Is_Volatile (Flag16)
-- Defined in all type entities, and also in constants, components and
-- variables. Set if a pragma Volatile applies to the entity. Also set
-- if pragma Shared or pragma Atomic applies to entity. In the case of
-- private or incomplete types, this flag is set in both the private
-- and full view. The flag is not set reliably on private subtypes,
-- and is always retrieved from the base type (but this is not a base-
-- type-only attribute because it applies to other entities). Note that
-- the backend should use Treat_As_Volatile, rather than Is_Volatile
-- to indicate code generation requirements for volatile variables.
-- Similarly, any front end test which is concerned with suppressing
-- optimizations on volatile objects should test Treat_As_Volatile
-- rather than testing this flag.
-- Is_Volatile_Full_Access (Flag285)
-- Defined in all type entities, and also in constants, components, and
-- variables. Set if a pragma Volatile_Full_Access applies to the entity.
-- In the case of private and incomplete types, this flag is set in
-- both the partial view and the full view.
-- Is_Wrapper_Package (synthesized)
-- Defined in package entities. Indicates that the package has been
-- created as a wrapper for a subprogram instantiation.
-- Itype_Printed (Flag202)
-- Defined in all type and subtype entities. Set in Itypes if the Itype
-- has been printed by Sprint. This is used to avoid printing an Itype
-- more than once.
-- Kill_Elaboration_Checks (Flag32)
-- Defined in all entities. Set by the expander to kill elaboration
-- checks which are known not to be needed. Equivalent in effect to
-- the use of pragma Suppress (Elaboration_Checks) for that entity
-- except that the effect is permanent and cannot be undone by a
-- subsequent pragma Unsuppress.
-- Kill_Range_Checks (Flag33)
-- Defined in all entities. Equivalent in effect to the use of pragma
-- Suppress (Range_Checks) for that entity except that the result is
-- permanent and cannot be undone by a subsequent pragma Unsuppress.
-- This is currently only used in one odd situation in Sem_Ch3 for
-- record types, and it would be good to get rid of it???
-- Known_To_Have_Preelab_Init (Flag207)
-- Defined in all type and subtype entities. If set, then the type is
-- known to have preelaborable initialization. In the case of a partial
-- view of a private type, it is only possible for this to be set if a
-- pragma Preelaborable_Initialization is given for the type. For other
-- types, it is never set if the type does not have preelaborable
-- initialization, it may or may not be set if the type does have
-- preelaborable initialization.
-- Last_Aggregate_Assignment (Node30)
-- Applies to controlled constants and variables initialized by an
-- aggregate. Points to the last statement associated with the expansion
-- of the aggregate. The attribute is used by the finalization machinery
-- when marking an object as successfully initialized.
-- Last_Assignment (Node26)
-- Defined in entities for variables, and OUT or IN OUT formals. Set for
-- a local variable or formal to point to the left side of an assignment
-- statement assigning a value to the variable. Cleared if the value of
-- the entity is referenced. Used to warn about dubious assignment
-- statements whose value is not used.
-- Last_Entity (Node20)
-- Defined in all entities which act as scopes to which a list of
-- associated entities is attached (blocks, class subtypes and types,
-- entries, functions, loops, packages, procedures, protected objects,
-- record types and subtypes, private types, task types and subtypes).
-- Points to the last entry in the list of associated entities chained
-- through the Next_Entity field. Empty if no entities are chained.
-- Last_Formal (synthesized)
-- Applies to subprograms and subprogram types, and also in entries
-- and entry families. Returns last formal of the subprogram or entry.
-- The formals are the first entities declared in a subprogram or in
-- a subprogram type (the designated type of an Access_To_Subprogram
-- definition) or in an entry.
-- Limited_View (Node23)
-- Defined in non-generic package entities that are not instances. Bona
-- fide package with the limited-view list through the first_entity and
-- first_private attributes. The elements of this list are the shadow
-- entities created for the types and local packages that are declared
-- in a package appearing in a limited_with clause (Ada 2005: AI-50217).
-- Linker_Section_Pragma (Node33)
-- Present in constant, variable, type and subprogram entities. Points
-- to a linker section pragma that applies to the entity, or is Empty if
-- no such pragma applies. Note that for constants and variables, this
-- field may be set as a result of a linker section pragma applied to the
-- type of the object.
-- Lit_Indexes (Node18)
-- Defined in enumeration types and subtypes. Non-empty only for the
-- case of an enumeration root type, where it contains the entity for
-- the generated indexes entity. See unit Exp_Imgv for full details of
-- the nature and use of this entity for implementing the Image and
-- Value attributes for the enumeration type in question.
-- Lit_Strings (Node16)
-- Defined in enumeration types and subtypes. Non-empty only for the
-- case of an enumeration root type, where it contains the entity for
-- the literals string entity. See unit Exp_Imgv for full details of
-- the nature and use of this entity for implementing the Image and
-- Value attributes for the enumeration type in question.
-- Low_Bound_Tested (Flag205)
-- Defined in all entities. Currently this can only be set for formal
-- parameter entries of a standard unconstrained one-dimensional array
-- or string type. Indicates that an explicit test of the low bound of
-- the formal appeared in the code, e.g. in a pragma Assert. If this
-- flag is set, warnings about assuming the index low bound to be one
-- are suppressed.
-- Machine_Radix_10 (Flag84)
-- Defined in decimal types and subtypes, set if the Machine_Radix is 10,
-- as the result of the specification of a machine radix representation
-- clause. Note that it is possible for this flag to be set without
-- having Has_Machine_Radix_Clause True. This happens when a type is
-- derived from a type with a clause present.
-- Master_Id (Node17)
-- Defined in access types and subtypes. Empty unless Has_Task is set for
-- the designated type, in which case it points to the entity for the
-- Master_Id for the access type master. Also set for access-to-limited-
-- class-wide types whose root may be extended with task components, and
-- for access-to-limited-interfaces because they can be used to reference
-- tasks implementing such interface.
-- Materialize_Entity (Flag168)
-- Defined in all entities. Set only for renamed obects which should be
-- materialized for debugging purposes. This means that a memory location
-- containing the renamed address should be allocated. This is needed so
-- that the debugger can find the entity.
-- May_Inherit_Delayed_Rep_Aspects (Flag262)
-- Defined in all entities for types and subtypes. Set if the type is
-- derived from a type which has delayed rep aspects (marked by the flag
-- Has_Delayed_Rep_Aspects being set). In this case, at the freeze point
-- for the derived type we know that the parent type is frozen, and if
-- a given attribute has not been set for the derived type, we copy the
-- value from the parent type. See Freeze.Inherit_Delayed_Rep_Aspects.
-- Mechanism (Uint8) (returned as Mechanism_Type)
-- Defined in functions and non-generic formal parameters. Indicates
-- the mechanism to be used for the function return or for the formal
-- parameter. See full description in the spec of Sem_Mech. This field
-- is also set (to the default value of zero = Default_Mechanism) in a
-- subprogram body entity but not used in this context.
-- Minimum_Accessibility (Node24)
-- Defined in formal parameters in the non-generic case. Normally Empty,
-- but if expansion is active, and a parameter exists for which a
-- dynamic accessibility check is required, then an object is generated
-- within such a subprogram representing the accessibility level of the
-- subprogram or the formal's Extra_Accessibility - whichever one is
-- lesser. The Minimum_Accessibility field then points to this object.
-- Modulus (Uint17) [base type only]
-- Defined in modular types. Contains the modulus. For the binary case,
-- this will be a power of 2, but if Non_Binary_Modulus is set, then it
-- will not be a power of 2.
-- Must_Be_On_Byte_Boundary (Flag183)
-- Defined in entities for types and subtypes. Set if objects of the type
-- must always be allocated on a byte boundary (more accurately a storage
-- unit boundary). The front end checks that component clauses respect
-- this rule, and the backend ensures that record packing does not
-- violate this rule. Currently the flag is set only for packed arrays
-- longer than 64 bits where the component size is not a power of 2.
-- Must_Have_Preelab_Init (Flag208)
-- Defined in entities for types and subtypes. Set in the full type of a
-- private type or subtype if a pragma Has_Preelaborable_Initialization
-- is present for the private type. Used to check that the full type has
-- preelaborable initialization at freeze time (this has to be deferred
-- to the freeze point because of the rule about overriding Initialize).
-- Needs_Activation_Record (Flag306)
-- Defined on generated subprogram types. Indicates that a call through
-- a named or anonymous access to subprogram requires an activation
-- record when compiling with unnesting for C or LLVM.
-- Needs_Debug_Info (Flag147)
-- Defined in all entities. Set if the entity requires normal debugging
-- information to be generated. This is true of all entities that have
-- Comes_From_Source set, and also transitively for entities associated
-- with such components (e.g. their types). It is true for all entities
-- in Debug_Generated_Code mode (-gnatD switch). This is the flag that
-- the backend should check to determine whether or not to generate
-- debugging information for an entity. Note that callers should always
-- use Sem_Util.Set_Debug_Info_Needed, rather than Set_Needs_Debug_Info,
-- so that the flag is set properly on subsidiary entities.
-- Needs_No_Actuals (Flag22)
-- Defined in callable entities (subprograms, entries, access to
-- subprograms) which can be called without actuals because all of
-- their formals (if any) have default values. This flag simplifies the
-- resolution of the syntactic ambiguity involving a call to these
-- entities when the return type is an array type, and a call can be
-- interpreted as an indexing of the result of the call. It is also
-- used to resolve various cases of entry calls.
-- Never_Set_In_Source (Flag115)
-- Defined in all entities, but can be set only for variables and
-- parameters. This flag is set if the object is never assigned a value
-- in user source code, either by assignment or by being used as an out
-- or in out parameter. Note that this flag is not reset from using an
-- initial value, so if you want to test for this case as well, test the
-- Has_Initial_Value flag also.
--
-- This flag is only for the purposes of issuing warnings, it must not
-- be used by the code generator to indicate that the variable is in
-- fact a constant, since some assignments in generated code do not
-- count (for example, the call to an init proc to assign some but
-- not all of the fields in a partially initialized record). The code
-- generator should instead use the flag Is_True_Constant.
--
-- For the purposes of this warning, the default assignment of access
-- variables to null is not considered the assignment of a value (so
-- the warning can be given for code that relies on this initial null
-- value when no other value is ever set).
--
-- In variables and out parameters, if this flag is set after full
-- processing of the corresponding declarative unit, it indicates that
-- the variable or parameter was never set, and a warning message can
-- be issued.
--
-- Note: this flag is initially set, and then cleared on encountering
-- any construct that might conceivably legitimately set the value.
-- Thus during the analysis of a declarative region and its associated
-- statement sequence, the meaning of the flag is "not set yet", and
-- once this analysis is complete the flag means "never assigned".
-- Note: for variables appearing in package declarations, this flag is
-- never set. That is because there is no way to tell if some client
-- modifies the variable (or, in the case of variables in the private
-- part, if some child unit modifies the variables).
-- Note: in the case of renamed objects, the flag must be set in the
-- ultimate renamed object. Clients noting a possible modification
-- should use the Note_Possible_Modification procedure in Sem_Util
-- rather than Set_Never_Set_In_Source precisely to deal properly with
-- the renaming possibility.
-- Next_Component (synthesized)
-- Applies to record components. Returns the next component by following
-- the chain of declared entities until one is found which corresponds to
-- a component (Ekind is E_Component). Any internal types generated from
-- the subtype indications of the record components are skipped. Returns
-- Empty if no more components.
-- Next_Component_Or_Discriminant (synthesized)
-- Similar to Next_Component, but includes components and discriminants
-- so the input can have either E_Component or E_Discriminant, and the
-- same is true for the result. Returns Empty if no more components or
-- discriminants in the record.
-- Next_Discriminant (synthesized)
-- Applies to discriminants returned by First/Next_Discriminant. Returns
-- the next language-defined (i.e. perhaps non-girder) discriminant by
-- following the chain of declared entities as long as the kind of the
-- entity corresponds to a discriminant. Note that the discriminants
-- might be the only components of the record. Returns Empty if there
-- are no more discriminants.
-- Next_Entity (Node2)
-- Defined in all entities. The entities of a scope are chained, with
-- the head of the list being in the First_Entity field of the scope
-- entity. All entities use the Next_Entity field as a forward pointer
-- for this list, with Empty indicating the end of the list. Since this
-- field is in the base part of the entity, the access routines for this
-- field are in Sinfo.
-- Next_Formal (synthesized)
-- Applies to the entity for a formal parameter. Returns the next formal
-- parameter of the subprogram or subprogram type. Returns Empty if there
-- are no more formals.
-- Next_Formal_With_Extras (synthesized)
-- Applies to the entity for a formal parameter. Returns the next
-- formal parameter of the subprogram or subprogram type. Returns
-- Empty if there are no more formals. The list returned includes
-- all the extra formals (see description of Extra_Formal field)
-- Next_Index (synthesized)
-- Applies to array types and subtypes and to string types and
-- subtypes. Yields the next index. The first index is obtained by
-- using the First_Index attribute, and then subsequent indexes are
-- obtained by applying Next_Index to the previous index. Empty is
-- returned to indicate that there are no more indexes. Note that
-- unlike most attributes in this package, Next_Index applies to
-- nodes for the indexes, not to entities.
-- Next_Inlined_Subprogram (Node12)
-- Defined in subprograms. Used to chain inlined subprograms used in
-- the current compilation, in the order in which they must be compiled
-- by the backend to ensure that all inlinings are performed.
-- Next_Literal (synthesized)
-- Applies to enumeration literals, returns the next literal, or
-- Empty if applied to the last literal. This is actually a synonym
-- for Next, but its use is preferred in this context.
-- No_Dynamic_Predicate_On_Actual (Flag276)
-- Defined in discrete types. Set for generic formal types that are used
-- in loops and quantified expressions. The corresponing actual cannot
-- have dynamic predicates.
-- No_Pool_Assigned (Flag131) [root type only]
-- Defined in access types. Set if a storage size clause applies to the
-- variable with a static expression value of zero. This flag is used to
-- generate errors if any attempt is made to allocate or free an instance
-- of such an access type. This is set only in the root type, since
-- derived types must have the same pool.
-- No_Predicate_On_Actual (Flag275)
-- Defined in discrete types. Set for generic formal types that are used
-- in the spec of a generic package, in constructs that forbid discrete
-- types with predicates.
-- No_Reordering (Flag239) [implementation base type only]
-- Defined in record types. Set only for a base type to which a valid
-- pragma No_Component_Reordering applies.
-- No_Return (Flag113)
-- Defined in all entities. Set for subprograms and generic subprograms
-- to which a valid aspect or pragma No_Return applies.
-- No_Strict_Aliasing (Flag136) [base type only]
-- Defined in access types. Set to direct the backend to avoid any
-- optimizations based on an assumption about the aliasing status of
-- objects designated by the access type. For the case of the gcc
-- backend, the effect is as though all references to objects of
-- the type were compiled with -fno-strict-aliasing. This flag is
-- set if an unchecked conversion with the access type as a target
-- type occurs in the same source unit as the declaration of the
-- access type, or if an explicit pragma No_Strict_Aliasing applies.
-- No_Tagged_Streams_Pragma (Node32)
-- Present in all subtype and type entities. Set for tagged types and
-- subtypes (i.e. entities with Is_Tagged_Type set True) if a valid
-- pragma/aspect applies to the type.
-- Non_Binary_Modulus (Flag58) [base type only]
-- Defined in all subtype and type entities. Set for modular integer
-- types if the modulus value is other than a power of 2.
-- Non_Limited_View (Node19)
-- Defined in abstract states and incomplete types that act as shadow
-- entities created when analysing a limited with clause (Ada 2005:
-- AI-50217). Points to the defining entity of the original declaration.
-- Nonzero_Is_True (Flag162) [base type only]
-- Defined in enumeration types. Set if any non-zero value is to be
-- interpreted as true. Currently this is set for derived Boolean
-- types which have a convention of C, C++ or Fortran.
-- Normalized_First_Bit (Uint8)
-- Defined in components and discriminants. Indicates the normalized
-- value of First_Bit for the component, i.e. the offset within the
-- lowest addressed storage unit containing part or all of the field.
-- Set to No_Uint if no first bit position is assigned yet.
-- Normalized_Position (Uint14)
-- Defined in components and discriminants. Indicates the normalized
-- value of Position for the component, i.e. the offset in storage
-- units from the start of the record to the lowest addressed storage
-- unit containing part or all of the field.
-- Normalized_Position_Max (Uint10)
-- Defined in components and discriminants. For almost all cases, this
-- is the same as Normalized_Position. The one exception is for the case
-- of a discriminated record containing one or more arrays whose length
-- depends on discriminants. In this case, the Normalized_Position_Max
-- field represents the maximum possible value of Normalized_Position
-- assuming min/max values for discriminant subscripts in all fields.
-- This is used by Layout in front end layout mode to properly compute
-- the maximum size of such records (needed for allocation purposes when
-- there are default discriminants, and also for the 'Size value).
-- Number_Dimensions (synthesized)
-- Applies to array types and subtypes. Returns the number of dimensions
-- of the array type or subtype as a value of type Pos.
-- Number_Entries (synthesized)
-- Applies to concurrent types. Returns the number of entries that are
-- declared within the task or protected definition for the type.
-- Number_Formals (synthesized)
-- Applies to subprograms and subprogram types. Yields the number of
-- formals as a value of type Pos.
-- Object_Size_Clause (synthesized)
-- Applies to entities for types and subtypes. If an object size clause
-- is present in the rep item chain for an entity then the attribute
-- definition clause node is returned. Otherwise Object_Size_Clause
-- returns Empty if no item is present. Usually this is only meaningful
-- if the flag Has_Object_Size_Clause is set. This is because when the
-- representation item chain is copied for a derived type, it can inherit
-- an object size clause that is not applicable to the entity.
-- OK_To_Rename (Flag247)
-- Defined only in entities for variables. If this flag is set, it
-- means that if the entity is used as the initial value of an object
-- declaration, the object declaration can be safely converted into a
-- renaming to avoid an extra copy. This is set for variables which are
-- generated by the expander to hold the result of evaluating some
-- expression. Most notably, the local variables used to store the result
-- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It
-- is only worth setting this flag for composites, since for primitive
-- types, it is cheaper to do the copy.
-- Optimize_Alignment_Space (Flag241)
-- Defined in type, subtype, variable, and constant entities. This
-- flag records that the type or object is to be laid out in a manner
-- consistent with Optimize_Alignment (Space) mode. The compiler and
-- binder ensure a consistent view of any given type or object. If pragma
-- Optimize_Alignment (Off) mode applies to the type/object, then neither
-- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
-- Optimize_Alignment_Time (Flag242)
-- Defined in type, subtype, variable, and constant entities. This
-- flag records that the type or object is to be laid out in a manner
-- consistent with Optimize_Alignment (Time) mode. The compiler and
-- binder ensure a consistent view of any given type or object. If pragma
-- Optimize_Alignment (Off) mode applies to the type/object, then neither
-- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
-- Original_Access_Type (Node28)
-- Defined in E_Access_Subprogram_Type entities. Set only if the access
-- type was generated by the expander as part of processing an access-
-- to-protected-subprogram type. Points to the access-to-protected-
-- subprogram type.
-- Original_Array_Type (Node21)
-- Defined in modular types and array types and subtypes. Set only if
-- the Is_Packed_Array_Impl_Type flag is set, indicating that the type
-- is the implementation type for a packed array, and in this case it
-- points to the original array type for which this is the packed
-- array implementation type.
-- Original_Protected_Subprogram (Node41)
-- Defined in functions and procedures. Set only on internally built
-- dispatching subprograms of protected types to reference their original
-- non-dispatching protected subprogram since their names differ.
-- Original_Record_Component (Node22)
-- Defined in components, including discriminants. The usage depends
-- on whether the record is a base type and whether it is tagged.
--
-- In base tagged types:
-- When the component is inherited in a record extension, it points
-- to the original component (the entity of the ancestor component
-- which is not itself inherited) otherwise it points to itself. The
-- backend uses this attribute to implement the automatic dereference
-- in the extension and to apply the transformation:
--
-- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp
--
-- In base untagged types:
-- Always points to itself except for non-girder discriminants, where
-- it points to the girder discriminant it renames.
--
-- In subtypes (tagged and untagged):
-- Points to the component in the base type.
-- Overlays_Constant (Flag243)
-- Defined in all entities. Set only for E_Constant or E_Variable for
-- which there is an address clause that causes the entity to overlay
-- a constant object.
-- Overridden_Operation (Node26)
-- Defined in subprograms. For overriding operations, points to the
-- user-defined parent subprogram that is being overridden. Note: this
-- attribute uses the same field as Static_Initialization. The latter
-- is only defined for internal initialization procedures, for which
-- Overridden_Operation is irrelevant. Thus this attribute must not be
-- set for init_procs.
-- Package_Instantiation (Node26)
-- Defined in packages and generic packages. When defined, this field
-- references an N_Generic_Instantiation node associated with an
-- instantiated package. In the case where the referenced node has
-- been rewritten to an N_Package_Specification, the instantiation
-- node is available from the Original_Node field of the package spec
-- node. This is currently not guaranteed to be set in all cases, but
-- when set, the field is used in Get_Unit_Instantiation_Node as
-- one of the means of obtaining the instantiation node. Eventually
-- it should be set in all cases, including package entities associated
-- with formal packages. ???
-- Packed_Array_Impl_Type (Node23)
-- Defined in array types and subtypes, except for the string literal
-- subtype case, if the corresponding type is packed and implemented
-- specially (either bit-packed or packed to eliminate holes in the
-- non-contiguous enumeration index types). References the type used to
-- represent the packed array, which is either a modular type for short
-- static arrays or an array of System.Unsigned in the bit-packed case,
-- or a regular array in the non-standard enumeration index case. Note
-- that in some situations (internal types and references to fields of
-- variant records), it is not always possible to construct this type in
-- advance of its use. If this field is empty, then the necessary type
-- is declared on the fly for each reference to the array.
-- Parameter_Mode (synthesized)
-- Applies to formal parameter entities. This is a synonym for Ekind,
-- used when obtaining the formal kind of a formal parameter (the result
-- is one of E_[In/Out/In_Out]_Parameter).
-- Parent_Subtype (Node19) [base type only]
-- Defined in E_Record_Type. Set only for derived tagged types, in which
-- case it points to the subtype of the parent type. This is the type
-- that is used as the Etype of the _parent field.
-- Part_Of_Constituents (Elist10)
-- Present in abstract state and variable entities. Contains all
-- constituents that are subject to indicator Part_Of (both aspect and
-- option variants).
-- Part_Of_References (Elist11)
-- Present in variable entities. Contains all references to the variable
-- when it is subject to pragma Part_Of. If the variable is a constituent
-- of a single protected/task type, the references are examined as they
-- must appear only within the type defintion and the corresponding body.
-- Partial_Invariant_Procedure (synthesized)
-- Defined in types and subtypes. Set for private types when one or more
-- [class-wide] type invariants apply to them. Points to the entity for a
-- procedure which checks the invariant. This invariant procedure takes a
-- single argument of the given type, and returns if the invariant holds,
-- or raises exception Assertion_Error with an appropriate message if it
-- does not hold. This attribute is defined but always Empty for private
-- subtypes. This attribute is also set for the corresponding full type.
--
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- Partial_Refinement_Constituents (synthesized)
-- Defined in abstract state entities. Returns the constituents that
-- refine the state in the current scope, which are allowed in a global
-- refinement in this scope. These consist of those constituents that are
-- abstract states with no or only partial refinement visible, and those
-- that are not themselves abstract states.
-- Partial_View_Has_Unknown_Discr (Flag280)
-- Present in all types. Set to Indicate that the partial view of a type
-- has unknown discriminants. A default initialization of an object of
-- the type does not require an invariant check (AI12-0133).
-- Pending_Access_Types (Elist15)
-- Defined in all types. Set for incomplete, private, Taft-amendment
-- types, and their corresponding full views. This list contains all
-- access types, both named and anonymous, declared between the partial
-- and the full view. The list is used by the finalization machinery to
-- ensure that the finalization masters of all pending access types are
-- fully initialized when the full view is frozen.
-- Postconditions_Proc (Node14)
-- Defined in functions, procedures, entries, and entry families. Refers
-- to the entity of the _Postconditions procedure used to check contract
-- assertions on exit from a subprogram.
-- Predicate_Function (synthesized)
-- Defined in all types. Set for types for which (Has_Predicates is True)
-- and for which a predicate procedure has been built that tests that the
-- specified predicates are True. Contains the entity for the function
-- which takes a single argument of the given type, and returns True if
-- the predicate holds and False if it does not.
--
-- Note: flag Has_Predicate does not imply that Predicate_Function is set
-- to a non-empty entity; this happens, for example, for itypes created
-- when instantiating generic units with private types with predicates.
-- However, if an explicit pragma Predicate or Predicate aspect is given
-- either for private or full type declaration then both Has_Predicates
-- and a non-empty Predicate_Function will be set on both the partial and
-- full views of the type.
--
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- Predicate_Function_M (synthesized)
-- Defined in all types. Present only if Predicate_Function is present,
-- and only if the predicate function has Raise_Expression nodes. It
-- is the special version created for membership tests, where if one of
-- these raise expressions is executed, the result is to return False.
-- Predicated_Parent (Node38)
-- Defined on itypes created by subtype indications, when the parent
-- subtype has predicates. The itype shares the Predicate_Function
-- of the predicated parent, but this function may not have been built
-- at the point the Itype is constructed, so this attribute allows its
-- retrieval at the point a predicate check needs to be generated.
-- The utility Predicate_Function takes this link into account.
-- Predicates_Ignored (Flag288)
-- Defined on all types. Indicates whether the subtype declaration is in
-- a context where Assertion_Policy is Ignore, in which case no checks
-- (static or dynamic) must be generated for objects of the type.
-- Prev_Entity (Node36)
-- Defined in all entities. The entities of a scope are chained, and this
-- field is used as a backward pointer for this entity list - effectivly
-- making the entity chain doubly-linked.
-- Primitive_Operations (synthesized)
-- Defined in concurrent types, tagged record types and subtypes, tagged
-- private types and tagged incomplete types. For concurrent types whose
-- Corresponding_Record_Type (CRT) is available, returns the list of
-- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist.
-- For all the other types returns the Direct_Primitive_Operations.
-- Prival (Node17)
-- Defined in private components of protected types. Refers to the entity
-- of the component renaming declaration generated inside protected
-- subprograms, entries or barrier functions.
-- Prival_Link (Node20)
-- Defined in constants and variables which rename private components of
-- protected types. Set to the original private component.
-- Private_Dependents (Elist18)
-- Defined in private (sub)types. Records the subtypes of the private
-- type, derivations from it, and records and arrays with components
-- dependent on the type.
--
-- The subtypes are traversed when installing and deinstalling (the full
-- view of) a private type in order to ensure correct view of the
-- subtypes.
--
-- Used in similar fashion for incomplete types: holds list of subtypes
-- of these incomplete types that have discriminant constraints. The
-- full views of these subtypes are constructed when the full view of
-- the incomplete type is processed.
-- In addition, if the incomplete type is the designated type in an
-- access definition for an access parameter, the operation may be
-- a dispatching primitive operation, which is only known when the full
-- declaration of the type is seen. Subprograms that have such an
-- access parameter are also placed in the list of private_dependents.
-- Protected_Body_Subprogram (Node11)
-- Defined in protected operations. References the entity for the
-- subprogram which implements the body of the operation.
-- Protected_Formal (Node22)
-- Defined in formal parameters (in, in out and out parameters). Used
-- only for formals of protected operations. References corresponding
-- formal parameter in the unprotected version of the operation that
-- is created during expansion.
-- Protected_Subprogram (Node39)
-- Defined in functions and procedures. Set for the pair of subprograms
-- which emulate the runtime semantics of a protected subprogram. Denotes
-- the entity of the origial protected subprogram.
-- Protection_Object (Node23)
-- Applies to protected entries, entry families and subprograms. Denotes
-- the entity which is used to rename the _object component of protected
-- types.
-- Reachable (Flag49)
-- Defined in labels. The flag is set over the range of statements in
-- which a goto to that label is legal.
-- Receiving_Entry (Node19)
-- Defined in procedures. Set for an internally generated procedure which
-- wraps the original statements of an accept alternative. Designates the
-- entity of the task entry being accepted.
-- Referenced (Flag156)
-- Defined in all entities. Set if the entity is referenced, except for
-- the case of an appearance of a simple variable that is not a renaming
-- as the left side of an assignment in which case Referenced_As_LHS is
-- set instead, or a similar appearance as an out parameter actual, in
-- which case Referenced_As_Out_Parameter is set.
-- Referenced_As_LHS (Flag36):
-- Defined in all entities. This flag is set instead of Referenced if a
-- simple variable that is not a renaming appears as the left side of an
-- assignment. The reason we distinguish this kind of reference is that
-- we have a separate warning for variables that are only assigned and
-- never read.
-- Referenced_As_Out_Parameter (Flag227):
-- Defined in all entities. This flag is set instead of Referenced if a
-- simple variable that is not a renaming appears as an actual for an out
-- formal. The reason we distinguish this kind of reference is that
-- we have a separate warning for variables that are only assigned and
-- never read, and out parameters are a special case.
-- Refinement_Constituents (Elist8)
-- Present in abstract state entities. Contains all the constituents that
-- refine the state, in other words, all the hidden states that appear in
-- the constituent_list of aspect/pragma Refined_State.
-- Register_Exception_Call (Node20)
-- Defined in exception entities. When an exception is declared,
-- a call is expanded to Register_Exception. This field points to
-- the expanded N_Procedure_Call_Statement node for this call. It
-- is used for Import/Export_Exception processing to modify the
-- register call to make appropriate entries in the special tables
-- used for handling these pragmas at run time.
-- Related_Array_Object (Node25)
-- Defined in array types and subtypes. Used only for the base type
-- and subtype created for an anonymous array object. Set to point
-- to the entity of the corresponding array object. Currently used
-- only for type-related error messages.
-- Related_Expression (Node24)
-- Defined in variables and types. When Set for internally generated
-- entities, it may be used to denote the source expression whose
-- elaboration created the variable declaration. If set, it is used
-- for generating clearer messages from CodePeer. It is used on source
-- entities that are variables in iterator specifications, to provide
-- a link to the container that is the domain of iteration. This allows
-- for better cross-reference information when the loop modifies elements
-- of the container, and suppresses spurious warnings.
--
-- Shouldn't it also be used for the same purpose in errout? It seems
-- odd to have two mechanisms here???
-- Related_Instance (Node15)
-- Defined in the wrapper packages created for subprogram instances.
-- The internal subprogram that implements the instance is inside the
-- wrapper package, but for debugging purposes its external symbol
-- must correspond to the name and scope of the related instance.
-- Related_Type (Node27)
-- Defined in components, constants and variables. Set when there is an
-- associated dispatch table to point to entities containing primary or
-- secondary tags. Not set in the _tag component of record types.
-- Relative_Deadline_Variable (Node28) [implementation base type only]
-- Defined in task type entities. This flag is set if a valid and
-- effective pragma Relative_Deadline applies to the base type. Points
-- to the entity for a variable that is created to hold the value given
-- in a Relative_Deadline pragma for a task type.
-- Renamed_Entity (Node18)
-- Defined in exception, generic unit, package, and subprogram entities.
-- Set when the entity is defined by a renaming declaration. Denotes the
-- renamed entity, or transitively the ultimate renamed entity if there
-- is a chain of renaming declarations. Empty if no renaming.
-- Renamed_In_Spec (Flag231)
-- Defined in package entities. If a package renaming occurs within
-- a package spec, then this flag is set on the renamed package. The
-- purpose is to prevent a warning about unused entities in the renamed
-- package. Such a warning would be inappropriate since clients of the
-- package can see the entities in the package via the renaming.
-- Renamed_Object (Node18)
-- Defined in components, constants, discriminants, formal parameters,
-- generic formals, loop parameters, and variables. Set to non-Empty if
-- the object was declared by a renaming declaration. For constants and
-- variables, the attribute references the tree node for the name of the
-- renamed object. For formal parameters, the field is used in inlining
-- and maps the entities of all formal parameters of a subprogram to the
-- entities of the corresponding actuals. For formals of a task entry,
-- the attribute denotes the local renaming that replaces the actual
-- within an accept statement. For all remaining cases (discriminants,
-- loop parameters) the field is Empty.
-- Renaming_Map (Uint9)
-- Defined in generic subprograms, generic packages, and their
-- instances. Also defined in the instances of the corresponding
-- bodies. Denotes the renaming map (generic entities => instance
-- entities) used to construct the instance by giving an index into
-- the tables used to represent these maps. See Sem_Ch12 for further
-- details. The maps for package instances are also used when the
-- instance is the actual corresponding to a formal package.
-- Requires_Overriding (Flag213)
-- Defined in all subprograms and entries. Set for subprograms that
-- require overriding as defined by RM-2005-3.9.3(6/2). Note that this
-- is True only for implicitly declared subprograms; it is not set on the
-- parent type's subprogram. See also Is_Abstract_Subprogram.
-- Return_Applies_To (Node8)
-- Defined in E_Return_Statement. Points to the entity representing
-- the construct to which the return statement applies, as defined in
-- RM-6.5(4/2). Note that a (simple) return statement within an
-- extended_return_statement applies to the extended_return_statement,
-- even though it causes the whole function to return.
-- Also defined in special E_Block entities built as E_Return_Statement
-- for extended return statements and attached to the block statement
-- by Expand_N_Extended_Return_Statement before being turned into an
-- E_Block by semantic analysis.
-- Return_Present (Flag54)
-- Defined in function and generic function entities. Set if the
-- function contains a return statement (used for error checking).
-- This flag can also be set in procedure and generic procedure
-- entities (for convenience in setting it), but is only tested
-- for the function case.
-- Returns_By_Ref (Flag90)
-- Defined in subprogram type entities and functions. Set if a function
-- (or an access-to-function type) returns a result by reference, either
-- because its return type is a by-reference-type or because the function
-- explicitly uses the secondary stack.
-- Reverse_Bit_Order (Flag164) [base type only]
-- Defined in all record type entities. Set if entity has a Bit_Order
-- aspect (set by an aspect clause or attribute definition clause) that
-- has reversed the order of bits from the default value. When this flag
-- is set, a component clause must specify a set of bits entirely within
-- a single storage unit (Ada 95) or within a single machine scalar (see
-- Ada 2005 AI-133), or must occupy an integral number of storage units.
-- Reverse_Storage_Order (Flag93) [base type only]
-- Defined in all record and array type entities. Set if entity has a
-- Scalar_Storage_Order aspect (set by an aspect clause or attribute
-- definition clause) that has reversed the order of storage elements
-- from the default value. When this flag is set for a record type,
-- the Bit_Order aspect must be set to the same value (either explicitly
-- or as the target default value).
-- Rewritten_For_C (Flag287)
-- Defined on functions that return a constrained array type, when
-- Modify_Tree_For_C is set. Indicates that a procedure with an extra
-- out parameter has been created for it, and calls must be rewritten as
-- calls to the new procedure.
-- RM_Size (Uint13)
-- Defined in all type and subtype entities. Contains the value of
-- type'Size as defined in the RM. See also the Esize field and
-- and the description on "Handling of Type'Size Values". A value
-- of zero in this field for a non-discrete type means that
-- the front end has not yet determined the size value. For the
-- case of a discrete type, this field is always set by the front
-- end and zero is a legitimate value for a type with one value.
-- Root_Type (synthesized)
-- Applies to all type entities. For class-wide types, returns the root
-- type of the class covered by the CW type, otherwise returns the
-- ultimate derivation ancestor of the given type. This function
-- preserves the view, i.e. the Root_Type of a partial view is the
-- partial view of the ultimate ancestor, the Root_Type of a full view
-- is the full view of the ultimate ancestor. Note that this function
-- does not correspond exactly to the use of root type in the RM, since
-- in the RM root type applies to a class of types, not to a type.
-- Scalar_Range (Node20)
-- Defined in all scalar types (including modular types, where the
-- bounds are 0 .. modulus - 1). References a node in the tree that
-- contains the bounds for the range. Note that this information
-- could be obtained by rummaging around the tree, but it is more
-- convenient to have it immediately at hand in the entity. The
-- contents of Scalar_Range can either be an N_Subtype_Indication
-- node (with a constraint), a Range node, or an Integer_Type_Definition,
-- but not a simple subtype reference (a subtype is converted into a
-- explicit range).
-- Scale_Value (Uint16)
-- Defined in decimal fixed-point types and subtypes. Contains the scale
-- for the type (i.e. the value of type'Scale = the number of decimal
-- digits after the decimal point).
-- Scope (Node3)
-- Defined in all entities. Points to the entity for the scope (block,
-- loop, subprogram, package etc.) in which the entity is declared.
-- Since this field is in the base part of the entity node, the access
-- routines for this field are in Sinfo. Note that for a child unit,
-- the Scope will be the parent package, and for a root library unit,
-- the Scope will be Standard.
-- Scope_Depth (synthesized)
-- Applies to program units, blocks, loops, return statements,
-- concurrent types, private types and entries, and also to record types,
-- i.e. to any entity that can appear on the scope stack. Yields the
-- scope depth value, which for those entities other than records is
-- simply the scope depth value, for record entities, it is the
-- Scope_Depth of the record scope.
-- Scope_Depth_Value (Uint22)
-- Defined in program units, blocks, loops, return statements,
-- concurrent types, private types and entries.
-- Indicates the number of scopes that statically enclose the declaration
-- of the unit or type. Library units have a depth of zero. Note that
-- record types can act as scopes but do NOT have this field set (see
-- Scope_Depth above).
-- Scope_Depth_Set (synthesized)
-- Applies to a special predicate function that returns a Boolean value
-- indicating whether or not the Scope_Depth field has been set. It is
-- needed, since returns an invalid value in this case.
-- Sec_Stack_Needed_For_Return (Flag167)
-- Defined in scope entities (blocks, entries, entry families, functions,
-- and procedures). Set to True when secondary stack is used to hold the
-- returned value of a function and thus should not be released on scope
-- exit.
-- Shared_Var_Procs_Instance (Node22)
-- Defined in variables. Set non-Empty only if Is_Shared_Passive is
-- set, in which case this is the entity for the associated instance of
-- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details.
-- Size_Check_Code (Node19)
-- Defined in constants and variables. Normally Empty. Set if code is
-- generated to check the size of the object. This field is used to
-- suppress this code if a subsequent address clause is encountered.
-- Size_Clause (synthesized)
-- Applies to all entities. If a size clause is present in the rep
-- item chain for an entity then the attribute definition clause node
-- for the size clause is returned. Otherwise Size_Clause returns Empty
-- if no item is present. Usually this is only meaningful if the flag
-- Has_Size_Clause is set. This is because when the representation item
-- chain is copied for a derived type, it can inherit a size clause that
-- is not applicable to the entity.
-- Size_Depends_On_Discriminant (Flag177)
-- Defined in all entities for types and subtypes. Indicates that the
-- size of the type depends on the value of one or more discriminants.
-- Currently, this flag is only set for arrays which have one or more
-- bounds depending on a discriminant value.
-- Size_Known_At_Compile_Time (Flag92)
-- Defined in all entities for types and subtypes. Indicates that the
-- size of objects of the type is known at compile time. This flag is
-- used to optimize some generated code sequences, and also to enable
-- some error checks (e.g. disallowing component clauses on variable
-- length objects). It is set conservatively (i.e. if it is True, the
-- size is certainly known at compile time, if it is False, then the
-- size may or may not be known at compile time, but the code will
-- assume that it is not known). Note that the value may be known only
-- to the back end, so the fact that this flag is set does not mean that
-- the front end can access the value.
-- Small_Value (Ureal21)
-- Defined in fixed point types. Points to the universal real for the
-- Small of the type, either as given in a representation clause, or
-- as computed (as a power of two) by the compiler.
-- SPARK_Aux_Pragma (Node41)
-- Present in concurrent type, [generic] package spec and package body
-- entities. For concurrent types and package specs it refers to the
-- SPARK mode setting for the private part. This field points to the
-- N_Pragma node that either appears in the private part or is inherited
-- from the enclosing context. For package bodies, it refers to the SPARK
-- mode of the elaboration sequence after the BEGIN. The fields points to
-- the N_Pragma node that either appears in the statement sequence or is
-- inherited from the enclosing context. In all cases, if the pragma is
-- inherited, then the SPARK_Aux_Pragma_Inherited flag is set.
-- SPARK_Aux_Pragma_Inherited (Flag266)
-- Present in concurrent type, [generic] package spec and package body
-- entities. Set if the SPARK_Aux_Pragma field points to a pragma that is
-- inherited, rather than a local one.
-- SPARK_Pragma (Node40)
-- Present in the following entities:
--
-- abstract states
-- constants
-- entries
-- operators
-- [generic] packages
-- package bodies
-- [generic] subprograms
-- subprogram bodies
-- variables
-- types
--
-- Points to the N_Pragma node that applies to the initial declaration or
-- body. This is either set by a local SPARK_Mode pragma or is inherited
-- from the context (from an outer scope for the spec case or from the
-- spec for the body case). In the case where the attribute is inherited,
-- flag SPARK_Pragma_Inherited is set. Empty if no SPARK_Mode pragma is
-- applicable.
-- SPARK_Pragma_Inherited (Flag265)
-- Present in the following entities:
--
-- abstract states
-- constants
-- entries
-- operators
-- [generic] packages
-- package bodies
-- [generic] subprograms
-- subprogram bodies
-- variables
-- types
--
-- Set if the SPARK_Pragma attribute points to an inherited pragma rather
-- than a local one.
-- Spec_Entity (Node19)
-- Defined in package body entities. Points to corresponding package
-- spec entity. Also defined in subprogram body parameters in the
-- case where there is a separate spec, where this field references
-- the corresponding parameter entities in the spec.
-- SSO_Set_High_By_Default (Flag273) [base type only]
-- Defined for record and array types. Set in the base type if a pragma
-- Default_Scalar_Storage_Order (High_Order_First) was active at the time
-- the record or array was declared and therefore applies to it.
-- SSO_Set_Low_By_Default (Flag272) [base type only]
-- Defined for record and array types. Set in the base type if a pragma
-- Default_Scalar_Storage_Order (High_Order_First) was active at the time
-- the record or array was declared and therefore applies to it.
-- Static_Discrete_Predicate (List25)
-- Defined in discrete types/subtypes with static predicates (with the
-- two flags Has_Predicates and Has_Static_Predicate set). Set if the
-- type/subtype has a static predicate. Points to a list of expression
-- and N_Range nodes that represent the predicate in canonical form. The
-- canonical form has entries sorted in ascending order, with duplicates
-- eliminated, and adjacent ranges coalesced, so that there is always a
-- gap in the values between successive entries. The entries in this list
-- are fully analyzed and typed with the base type of the subtype. Note
-- that all entries are static and have values within the subtype range.
-- Static_Elaboration_Desired (Flag77)
-- Defined in library-level packages. Set by the pragma of the same
-- name, to indicate that static initialization must be attempted for
-- all types declared in the package, and that a warning must be emitted
-- for those types to which static initialization is not available.
-- Static_Initialization (Node30)
-- Defined in initialization procedures for types whose objects can be
-- initialized statically. The value of this attribute is a positional
-- aggregate whose components are compile-time static values. Used
-- when available in object declarations to eliminate the call to the
-- initialization procedure, and to minimize elaboration code. Note:
-- This attribute uses the same field as Overridden_Operation, which is
-- irrelevant in init_procs.
-- Static_Real_Or_String_Predicate (Node25)
-- Defined in real types/subtypes with static predicates (with the two
-- flags Has_Predicates and Has_Static_Predicate set). Set if the type
-- or subtype has a static predicate. Points to the return expression
-- of the predicate function. This is the original expression given as
-- the predicate except that occurrences of the type are replaced by
-- occurrences of the formal parameter of the predicate function (note
-- that the spec of this function including this formal parameter name
-- is available from the Subprograms_For_Type field; it can be accessed
-- as Predicate_Function (typ)). Also, in the case where a predicate is
-- inherited, the expression is of the form:
--
-- xxxPredicate (typ2 (ent)) AND THEN expression
--
-- where typ2 is the type from which the predicate is inherited, ent is
-- the entity for the current predicate function, and xxxPredicate is the
-- inherited predicate (from typ2). Finally for a predicate that inherits
-- from another predicate but does not add a predicate of its own, the
-- expression may consist of the above xxxPredicate call on its own.
-- Status_Flag_Or_Transient_Decl (Node15)
-- Defined in constant, loop, and variable entities. Applies to objects
-- that require special treatment by the finalization machinery, such as
-- extended return results, IF and CASE expression results, and objects
-- inside N_Expression_With_Actions nodes. The attribute contains the
-- entity of a flag which specifies particular behavior over a region of
-- code or the declaration of a "hook" object.
-- In which case is it a flag, or a hook object???
-- Storage_Size_Variable (Node26) [implementation base type only]
-- Defined in access types and task type entities. This flag is set
-- if a valid and effective pragma Storage_Size applies to the base
-- type. Points to the entity for a variable that is created to
-- hold the value given in a Storage_Size pragma for an access
-- collection or a task type. Note that in the access type case,
-- this field is defined only in the root type (since derived types
-- share the same storage pool).
-- Stored_Constraint (Elist23)
-- Defined in entities that can have discriminants (concurrent types
-- subtypes, record types and subtypes, private types and subtypes,
-- limited private types and subtypes and incomplete types). Points
-- to an element list containing the expressions for each of the
-- stored discriminants for the record (sub)type.
-- Stores_Attribute_Old_Prefix (Flag270)
-- Defined in constants. Set when the constant has been generated to save
-- the value of attribute 'Old's prefix.
-- Strict_Alignment (Flag145) [implementation base type only]
-- Defined in all type entities. Indicates that the type is by-reference
-- or contains an aliased part. This forbids packing a component of this
-- type tighter than the alignment and size of the type, as specified by
-- RM 13.2(7) modified by AI12-001 as a Binding Interpretation.
-- String_Literal_Length (Uint16)
-- Defined in string literal subtypes (which are created to correspond
-- to string literals in the program). Contains the length of the string
-- literal.
-- String_Literal_Low_Bound (Node18)
-- Defined in string literal subtypes (which are created to correspond
-- to string literals in the program). Contains an expression whose
-- value represents the low bound of the literal. This is a copy of
-- the low bound of the applicable index constraint if there is one,
-- or a copy of the low bound of the index base type if not.
-- Subprograms_For_Type (Elist29)
-- Defined in all types. The list may contain the entities of the default
-- initial condition procedure, invariant procedure, and the two versions
-- of the predicate function.
--
-- Historical note: This attribute used to be a direct linked list of
-- entities rather than an Elist. The Elist allows greater flexibility
-- in inheritance of subprograms between views of the same type.
-- Subps_Index (Uint24)
-- Present in subprogram entries. Set if the subprogram contains nested
-- subprograms, or is a subprogram nested within such a subprogram. Holds
-- the index in the Exp_Unst.Subps table for the subprogram. Note that
-- for the outer level subprogram, this is the starting index in the Subp
-- table for the entries for this subprogram.
-- Suppress_Elaboration_Warnings (Flag303)
-- NOTE: this flag is relevant only for the legacy ABE mechanism and
-- should not be used outside of that context.
--
-- Defined in all entities, can be set only for subprogram entities and
-- for variables. If this flag is set then Sem_Elab will not generate
-- elaboration warnings for the subprogram or variable. Suppression of
-- such warnings is automatic for subprograms for which elaboration
-- checks are suppressed (without the need to set this flag), but the
-- flag is also set for various internal entities (such as init procs)
-- which are known not to generate any possible access before elaboration
-- and it is set on variables when a warning is given to avoid multiple
-- elaboration warnings for the same variable.
-- Suppress_Initialization (Flag105)
-- Defined in all variable, type and subtype entities. If set for a base
-- type, then the generation of initialization procedures is suppressed
-- for the type. Any other implicit initialization (e.g. from the use of
-- pragma Initialize_Scalars) is also suppressed if this flag is set for
-- either the subtype in question, or for the base type. For variables,
-- this flag suppresses all implicit initialization for the object, even
-- if the type would normally require initialization. Set by use of
-- pragma Suppress_Initialization and also for internal entities where
-- we know that no initialization is required. For example, enumeration
-- image table entities set it.
-- Suppress_Style_Checks (Flag165)
-- Defined in all entities. Suppresses any style checks specifically
-- associated with the given entity if set.
-- Suppress_Value_Tracking_On_Call (Flag217)
-- Defined in all entities. Set in a scope entity if value tracking is to
-- be suppressed on any call within the scope. Used when an access to a
-- local subprogram is computed, to deal with the possibility that this
-- value may be passed around, and if used, may clobber a local variable.
-- Task_Body_Procedure (Node25)
-- Defined in task types and subtypes. Points to the entity for the task
-- task body procedure (as further described in Exp_Ch9, task bodies are
-- expanded into procedures). A convenient function to retrieve this
-- field is Sem_Util.Get_Task_Body_Procedure.
--
-- The last sentence is odd??? Why not have Task_Body_Procedure go to the
-- Underlying_Type of the Root_Type???
-- Thunk_Entity (Node31)
-- Defined in functions and procedures which have been classified as
-- Is_Thunk. Set to the target entity called by the thunk.
-- Treat_As_Volatile (Flag41)
-- Defined in all type entities, and also in constants, components and
-- variables. Set if this entity is to be treated as volatile for code
-- generation purposes. Always set if Is_Volatile is set, but can also
-- be set as a result of situations (such as address overlays) where
-- the front end wishes to force volatile handling to inhibit aliasing
-- optimization which might be legally ok, but is undesirable. Note
-- that the backend always tests this flag rather than Is_Volatile.
-- The front end tests Is_Volatile if it is concerned with legality
-- checks associated with declared volatile variables, but if the test
-- is for the purposes of suppressing optimizations, then the front
-- end should test Treat_As_Volatile rather than Is_Volatile.
--
-- Note: before testing Treat_As_Volatile, consider whether it would
-- be more appropriate to use Exp_Util.Is_Volatile_Reference instead,
-- which catches more cases of volatile references.
-- Type_High_Bound (synthesized)
-- Applies to scalar types. Returns the tree node (Node_Id) that contains
-- the high bound of a scalar type. The returned value is literal for a
-- base type, but may be an expression in the case of scalar type with
-- dynamic bounds. Note that in the case of a fixed point type, the high
-- bound is in units of small, and is an integer.
-- Type_Low_Bound (synthesized)
-- Applies to scalar types. Returns the tree node (Node_Id) that contains
-- the low bound of a scalar type. The returned value is literal for a
-- base type, but may be an expression in the case of scalar type with
-- dynamic bounds. Note that in the case of a fixed point type, the low
-- bound is in units of small, and is an integer.
-- Underlying_Full_View (Node19)
-- Defined in private subtypes that are the completion of other private
-- types, or in private types that are derived from private subtypes. If
-- the full view of a private type T is derived from another private type
-- with discriminants Td, the full view of T is also private, and there
-- is no way to attach to it a further full view that would convey the
-- structure of T to the backend. The Underlying_Full_View is an
-- attribute of the full view that is a subtype of Td with the same
-- constraint as the declaration for T. The declaration for this subtype
-- is built at the point of the declaration of T, either as completion,
-- or as a subtype declaration where the base type is private and has a
-- private completion. If Td is already constrained, then its full view
-- can serve directly as the full view of T.
-- Underlying_Record_View (Node28)
-- Defined in record types. Set for record types that are extensions of
-- types with unknown discriminants, and also set for internally built
-- underlying record views to reference its original record type. Record
-- types that are extensions of types with unknown discriminants do not
-- have a completion, but they cannot be used without having some
-- discriminated view at hand. This view is a record type with the same
-- structure, whose parent type is the full view of the parent in the
-- original type extension.
-- Underlying_Type (synthesized)
-- Applies to all entities. This is the identity function except in the
-- case where it is applied to an incomplete or private type, in which
-- case it is the underlying type of the type declared by the completion,
-- or Empty if the completion has not yet been encountered and analyzed.
--
-- Note: the reason this attribute applies to all entities, and not just
-- types, is to legitimize code where Underlying_Type is applied to an
-- entity which may or may not be a type, with the intent that if it is a
-- type, its underlying type is taken.
--
-- Note also that the value of this attribute is interesting only after
-- the full view of the parent type has been processed. If the parent
-- type is declared in an enclosing package, the attribute will be non-
-- trivial only after the full view of the type has been analyzed.
-- Universal_Aliasing (Flag216) [implementation base type only]
-- Defined in all type entities. Set to direct the back-end to avoid
-- any optimizations based on type-based alias analysis for this type.
-- Indicates that objects of this type can alias objects of any other
-- types, which guarantees that any objects can be referenced through
-- access types designating this type safely, whatever the actual type
-- of these objects. In other words, the effect is as though access
-- types designating this type were subject to No_Strict_Aliasing.
-- Unset_Reference (Node16)
-- Defined in variables and out parameters. This is normally Empty. It
-- is set to point to an identifier that represents a reference to the
-- entity before any value has been set. Only the first such reference
-- is identified. This field is used to generate a warning message if
-- necessary (see Sem_Warn.Check_Unset_Reference).
-- Used_As_Generic_Actual (Flag222)
-- Defined in all entities, set if the entity is used as an argument to
-- a generic instantiation. Used to tune certain warning messages, and
-- in checking type conformance within an instantiation that involves
-- incomplete formal and actual types.
-- Uses_Lock_Free (Flag188)
-- Defined in protected type entities. Set to True when the Lock Free
-- implementation is used for the protected type. This implementation is
-- based on atomic transactions and doesn't require anymore the use of
-- Protection object (see System.Tasking.Protected_Objects).
-- Uses_Sec_Stack (Flag95)
-- Defined in scope entities (blocks, entries, entry families, functions,
-- loops, and procedures). Set to True when the secondary stack is used
-- in this scope and must be released on exit unless flag
-- Sec_Stack_Needed_For_Return is set.
-- Validated_Object (Node38)
-- Defined in variables. Contains the object whose value is captured by
-- the variable for validity check purposes.
-- Warnings_Off (Flag96)
-- Defined in all entities. Set if a pragma Warnings (Off, entity-name)
-- is used to suppress warnings for a given entity. It is also used by
-- the compiler in some situations to kill spurious warnings. Note that
-- clients should generally not test this flag directly, but instead
-- use function Has_Warnings_Off.
-- Warnings_Off_Used (Flag236)
-- Defined in all entities. Can only be set if Warnings_Off is set. If
-- set indicates that a warning was suppressed by the Warnings_Off flag,
-- and Unmodified/Unreferenced would not have suppressed the warning.
-- Warnings_Off_Used_Unmodified (Flag237)
-- Defined in all entities. Can only be set if Warnings_Off is set and
-- Has_Pragma_Unmodified is not set. If set indicates that a warning was
-- suppressed by the Warnings_Off status but that pragma Unmodified
-- would also have suppressed the warning.
-- Warnings_Off_Used_Unreferenced (Flag238)
-- Defined in all entities. Can only be set if Warnings_Off is set and
-- Has_Pragma_Unreferenced is not set. If set indicates that a warning
-- was suppressed by the Warnings_Off status but that pragma Unreferenced
-- would also have suppressed the warning.
-- Was_Hidden (Flag196)
-- Defined in all entities. Used to save the value of the Is_Hidden
-- attribute when the limited-view is installed (Ada 2005: AI-217).
-- Wrapped_Entity (Node27)
-- Defined in functions and procedures which have been classified as
-- Is_Primitive_Wrapper. Set to the entity being wrapper.
---------------------------
-- Renaming and Aliasing --
---------------------------
-- Several entity attributes relate to renaming constructs, and to the use of
-- different names to refer to the same entity. The following is a summary of
-- these constructs and their prefered uses.
-- There are three related attributes:
-- Renamed_Entity
-- Renamed_Object
-- Alias
-- They all overlap because they are supposed to apply to different entity
-- kinds. They are semantically related, and have the following intended uses:
-- a) Renamed_Entity applies to entities in renaming declarations that rename
-- an entity, so the value of the attribute IS an entity. This applies to
-- generic renamings, package renamings, exception renamings, and subprograms
-- renamings that rename a subprogram (rather than an attribute, an entry, a
-- protected operation, etc).
-- b) Alias applies to overloadable entities, and the value is an overloadable
-- entity. So this is a subset of the previous one. We use the term Alias to
-- cover both renamings and inherited operations, because both cases are
-- handled in the same way when expanding a call. Namely the Alias of a given
-- subprogram is the subprogram that will actually be called.
-- Both a) and b) are set transitively, so that in fact it is not necessary to
-- traverse chains of renamings when looking for the original entity: it's
-- there in one step (this is done when analyzing renaming declarations other
-- than object renamings in sem_ch8).
-- c) Renamed_Object applies to constants and variables. Given that the name
-- in an object renaming declaration is not necessarily an entity name, the
-- value of the attribute is the tree for that name, eg AR (1).Comp. The case
-- when that name is in fact an entity is not handled specially. This is why
-- in a few cases we need to use a loop to trace a chain of object renamings
-- where all of them happen to be entities. So:
-- X : integer;
-- Y : integer renames X; -- renamed object is the identifier X
-- Z : integer renames Y; -- renamed object is the identifier Y
-- The front-end does not store explicitly the fact that Z renames X.
--------------------------------------
-- Delayed Freezing and Elaboration --
--------------------------------------
-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
-- freeze node, which appears later in the expanded tree.
-- a) The flag is used by the front-end to trigger expansion actions
-- which include the generation of that freeze node. Typically this happens at
-- the end of the current compilation unit, or before the first subprogram
-- body is encountered in the current unit. See files freeze and exp_ch13 for
-- details on the actions triggered by a freeze node, which include the
-- construction of initialization procedures and dispatch tables.
-- b) The flag is used by the backend to defer elaboration of the entity until
-- its freeze node is seen. In the absence of an explicit freeze node, an
-- entity is frozen (and elaborated) at the point of declaration.
-- For object declarations, the flag is set when an address clause for the
-- object is encountered. Legality checks on the address expression only
-- take place at the freeze point of the object.
-- Most types have an explicit freeze node, because they cannot be elaborated
-- until all representation and operational items that apply to them have been
-- analyzed. Private types and incomplete types have the flag set as well, as
-- do task and protected types.
-- Implicit base types created for type derivations, as well as classwide
-- types created for all tagged types, have the flag set.
-- If a subprogram has an access parameter whose designated type is incomplete
-- the subprogram has the flag set.
------------------
-- Access Kinds --
------------------
-- The following entity kinds are introduced by the corresponding type
-- definitions:
-- E_Access_Type,
-- E_General_Access_Type,
-- E_Access_Subprogram_Type,
-- E_Anonymous_Access_Subprogram_Type,
-- E_Access_Protected_Subprogram_Type,
-- E_Anonymous_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Type.
-- E_Access_Subtype is for an access subtype created by a subtype
-- declaration.
-- In addition, we define the kind E_Allocator_Type to label allocators.
-- This is because special resolution rules apply to this construct.
-- Eventually the constructs are labeled with the access type imposed by
-- the context. The backend should never see types with this Ekind.
-- Similarly, the type E_Access_Attribute_Type is used as the initial kind
-- associated with an access attribute. After resolution a specific access
-- type will be established as determined by the context.
-- Finally, the type Any_Access is used to label -null- during type
-- resolution. Any_Access is also replaced by the context type after
-- resolution.
--------------------------------
-- Classification of Entities --
--------------------------------
-- The classification of program entities which follows is a refinement of
-- the list given in RM 3.1(1). E.g., separate entities denote subtypes of
-- different type classes. Ada 95 entities include class wide types,
-- protected types, subprogram types, generalized access types, generic
-- formal derived types and generic formal packages.
-- The order chosen for these kinds allows us to classify related entities
-- so that they are contiguous. As a result, they do not appear in the
-- exact same order as their order of first appearance in the LRM (For
-- example, private types are listed before packages). The contiguity
-- allows us to define useful subtypes (see below) such as type entities,
-- overloaded entities, etc.
-- Each entity (explicitly or implicitly declared) has a kind, which is
-- a value of the following type:
type Entity_Kind is (
E_Void,
-- The initial Ekind value for a newly created entity. Also used as the
-- Ekind for Standard_Void_Type, a type entity in Standard used as a
-- dummy type for the return type of a procedure (the reason we create
-- this type is to share the circuits for performing overload resolution
-- on calls).
-------------
-- Objects --
-------------
E_Component,
-- Components of a record declaration, private declarations of
-- protected objects.
E_Constant,
-- Constants created by an object declaration with a constant keyword
E_Discriminant,
-- A discriminant, created by the use of a discriminant in a type
-- declaration.
E_Loop_Parameter,
-- A loop parameter created by a for loop
E_Variable,
-- Variables created by an object declaration with no constant keyword
------------------------
-- Parameter Entities --
------------------------
-- Parameters are also objects
E_Out_Parameter,
-- An out parameter of a subprogram or entry
E_In_Out_Parameter,
-- An in-out parameter of a subprogram or entry
E_In_Parameter,
-- An in parameter of a subprogram or entry
--------------------------------
-- Generic Parameter Entities --
--------------------------------
-- Generic parameters are also objects
E_Generic_In_Out_Parameter,
-- A generic in out parameter, created by the use of a generic in out
-- parameter in a generic declaration.
E_Generic_In_Parameter,
-- A generic in parameter, created by the use of a generic in
-- parameter in a generic declaration.
-------------------
-- Named Numbers --
-------------------
E_Named_Integer,
-- Named numbers created by a number declaration with an integer value
E_Named_Real,
-- Named numbers created by a number declaration with a real value
-----------------------
-- Enumeration Types --
-----------------------
E_Enumeration_Type,
-- Enumeration types, created by an enumeration type declaration
E_Enumeration_Subtype,
-- Enumeration subtypes, created by an explicit or implicit subtype
-- declaration applied to an enumeration type or subtype.
-------------------
-- Numeric Types --
-------------------
E_Signed_Integer_Type,
-- Signed integer type, used for the anonymous base type of the
-- integer subtype created by an integer type declaration.
E_Signed_Integer_Subtype,
-- Signed integer subtype, created by either an integer subtype or
-- integer type declaration (in the latter case an integer type is
-- created for the base type, and this is the first named subtype).
E_Modular_Integer_Type,
-- Modular integer type, used for the anonymous base type of the
-- integer subtype created by a modular integer type declaration.
E_Modular_Integer_Subtype,
-- Modular integer subtype, created by either an modular subtype
-- or modular type declaration (in the latter case a modular type
-- is created for the base type, and this is the first named subtype).
E_Ordinary_Fixed_Point_Type,
-- Ordinary fixed type, used for the anonymous base type of the fixed
-- subtype created by an ordinary fixed point type declaration.
E_Ordinary_Fixed_Point_Subtype,
-- Ordinary fixed point subtype, created by either an ordinary fixed
-- point subtype or ordinary fixed point type declaration (in the
-- latter case a fixed point type is created for the base type, and
-- this is the first named subtype).
E_Decimal_Fixed_Point_Type,
-- Decimal fixed type, used for the anonymous base type of the decimal
-- fixed subtype created by an ordinary fixed point type declaration.
E_Decimal_Fixed_Point_Subtype,
-- Decimal fixed point subtype, created by either a decimal fixed point
-- subtype or decimal fixed point type declaration (in the latter case
-- a fixed point type is created for the base type, and this is the
-- first named subtype).
E_Floating_Point_Type,
-- Floating point type, used for the anonymous base type of the
-- floating point subtype created by a floating point type declaration.
E_Floating_Point_Subtype,
-- Floating point subtype, created by either a floating point subtype
-- or floating point type declaration (in the latter case a floating
-- point type is created for the base type, and this is the first
-- named subtype).
------------------
-- Access Types --
------------------
E_Access_Type,
-- An access type created by an access type declaration with no all
-- keyword present. Note that the predefined type Any_Access, which
-- has E_Access_Type Ekind, is used to label NULL in the upwards pass
-- of type analysis, to be replaced by the true access type in the
-- downwards resolution pass.
E_Access_Subtype,
-- An access subtype created by a subtype declaration for any access
-- type (whether or not it is a general access type).
E_Access_Attribute_Type,
-- An access type created for an access attribute (one of 'Access,
-- 'Unrestricted_Access, or Unchecked_Access).
E_Allocator_Type,
-- A special internal type used to label allocators and references to
-- objects using 'Reference. This is needed because special resolution
-- rules apply to these constructs. On the resolution pass, this type
-- is almost always replaced by the actual access type, but if the
-- context does not provide one, the backend will see Allocator_Type
-- itself (which will already have been frozen).
E_General_Access_Type,
-- An access type created by an access type declaration with the all
-- keyword present.
E_Access_Subprogram_Type,
-- An access-to-subprogram type, created by an access-to-subprogram
-- declaration.
E_Access_Protected_Subprogram_Type,
-- An access to a protected subprogram, created by the corresponding
-- declaration. Values of such a type denote both a protected object
-- and a protected operation within, and have different compile-time
-- and run-time properties than other access-to-subprogram values.
E_Anonymous_Access_Protected_Subprogram_Type,
-- An anonymous access-to-protected-subprogram type, created by an
-- access-to-subprogram declaration.
E_Anonymous_Access_Subprogram_Type,
-- An anonymous access-to-subprogram type, created by an access-to-
-- subprogram declaration, or generated for a current instance of
-- a type name appearing within a component definition that has an
-- anonymous access-to-subprogram type.
E_Anonymous_Access_Type,
-- An anonymous access type created by an access parameter or access
-- discriminant.
---------------------
-- Composite Types --
---------------------
E_Array_Type,
-- An array type created by an array type declaration. Includes all
-- cases of arrays, except for string types.
E_Array_Subtype,
-- An array subtype, created by an explicit array subtype declaration,
-- or the use of an anonymous array subtype.
E_String_Literal_Subtype,
-- A special string subtype, used only to describe the type of a string
-- literal (will always be one dimensional, with literal bounds).
E_Class_Wide_Type,
-- A class wide type, created by any tagged type declaration (i.e. if
-- a tagged type is declared, the corresponding class type is always
-- created, using this Ekind value).
E_Class_Wide_Subtype,
-- A subtype of a class wide type, created by a subtype declaration
-- used to declare a subtype of a class type.
E_Record_Type,
-- A record type, created by a record type declaration
E_Record_Subtype,
-- A record subtype, created by a record subtype declaration
E_Record_Type_With_Private,
-- Used for types defined by a private extension declaration,
-- and for tagged private types. Includes the fields for both
-- private types and for record types (with the sole exception of
-- Corresponding_Concurrent_Type which is obviously not needed). This
-- entity is considered to be both a record type and a private type.
E_Record_Subtype_With_Private,
-- A subtype of a type defined by a private extension declaration
E_Private_Type,
-- A private type, created by a private type declaration that has
-- neither the keyword limited nor the keyword tagged.
E_Private_Subtype,
-- A subtype of a private type, created by a subtype declaration used
-- to declare a subtype of a private type.
E_Limited_Private_Type,
-- A limited private type, created by a private type declaration that
-- has the keyword limited, but not the keyword tagged.
E_Limited_Private_Subtype,
-- A subtype of a limited private type, created by a subtype declaration
-- used to declare a subtype of a limited private type.
E_Incomplete_Type,
-- An incomplete type, created by an incomplete type declaration
E_Incomplete_Subtype,
-- An incomplete subtype, created by a subtype declaration where the
-- subtype mark denotes an incomplete type.
E_Task_Type,
-- A task type, created by a task type declaration. An entity with this
-- Ekind is also created to describe the anonymous type of a task that
-- is created by a single task declaration.
E_Task_Subtype,
-- A subtype of a task type, created by a subtype declaration used to
-- declare a subtype of a task type.
E_Protected_Type,
-- A protected type, created by a protected type declaration. An entity
-- with this Ekind is also created to describe the anonymous type of
-- a protected object created by a single protected declaration.
E_Protected_Subtype,
-- A subtype of a protected type, created by a subtype declaration used
-- to declare a subtype of a protected type.
-----------------
-- Other Types --
-----------------
E_Exception_Type,
-- The type of an exception created by an exception declaration
E_Subprogram_Type,
-- This is the designated type of an Access_To_Subprogram. Has type and
-- signature like a subprogram entity, so can appear in calls, which
-- are resolved like regular calls, except that such an entity is not
-- overloadable.
---------------------------
-- Overloadable Entities --
---------------------------
E_Enumeration_Literal,
-- An enumeration literal, created by the use of the literal in an
-- enumeration type definition.
E_Function,
-- A function, created by a function declaration or a function body
-- that acts as its own declaration.
E_Operator,
-- A predefined operator, appearing in Standard, or an implicitly
-- defined concatenation operator created whenever an array is declared.
-- We do not make normal derived operators explicit in the tree, but the
-- concatenation operators are made explicit.
E_Procedure,
-- A procedure, created by a procedure declaration or a procedure
-- body that acts as its own declaration.
E_Abstract_State,
-- A state abstraction. Used to designate entities introduced by aspect
-- or pragma Abstract_State. The entity carries the various properties
-- of the state.
E_Entry,
-- An entry, created by an entry declaration in a task or protected
-- object.
--------------------
-- Other Entities --
--------------------
E_Entry_Family,
-- An entry family, created by an entry family declaration in a
-- task or protected type definition.
E_Block,
-- A block identifier, created by an explicit or implicit label on
-- a block or declare statement.
E_Entry_Index_Parameter,
-- An entry index parameter created by an entry index specification
-- for the body of a protected entry family.
E_Exception,
-- An exception created by an exception declaration. The exception
-- itself uses E_Exception for the Ekind, the implicit type that is
-- created to represent its type uses the Ekind E_Exception_Type.
E_Generic_Function,
-- A generic function. This is the entity for a generic function
-- created by a generic subprogram declaration.
E_Generic_Procedure,
-- A generic function. This is the entity for a generic procedure
-- created by a generic subprogram declaration.
E_Generic_Package,
-- A generic package, this is the entity for a generic package created
-- by a generic package declaration.
E_Label,
-- The defining entity for a label. Note that this is created by the
-- implicit label declaration, not the occurrence of the label itself,
-- which is simply a direct name referring to the label.
E_Loop,
-- A loop identifier, created by an explicit or implicit label on a
-- loop statement.
E_Return_Statement,
-- A dummy entity created for each return statement. Used to hold
-- information about the return statement (what it applies to) and in
-- rules checking. For example, a simple_return_statement that applies
-- to an extended_return_statement cannot have an expression; this
-- requires putting the E_Return_Statement entity for the
-- extended_return_statement on the scope stack.
E_Package,
-- A package, created by a package declaration
E_Package_Body,
-- A package body. This entity serves only limited functions, since
-- most semantic analysis uses the package entity (E_Package). However
-- there are some attributes that are significant for the body entity.
-- For example, collection of exception handlers.
E_Protected_Body,
-- A protected body. This entity serves almost no function, since all
-- semantic analysis uses the protected entity (E_Protected_Type).
E_Task_Body,
-- A task body. This entity serves almost no function, since all
-- semantic analysis uses the protected entity (E_Task_Type).
E_Subprogram_Body
-- A subprogram body. Used when a subprogram has a separate declaration
-- to represent the entity for the body. This entity serves almost no
-- function, since all semantic analysis uses the subprogram entity
-- for the declaration (E_Function or E_Procedure).
);
for Entity_Kind'Size use 8;
-- The data structures in Atree assume this
--------------------------
-- Subtype Declarations --
--------------------------
-- The above entities are arranged so that they can be conveniently grouped
-- into subtype ranges. Note that for each of the xxx_Kind ranges defined
-- below, there is a corresponding Is_xxx (or for types, Is_xxx_Type)
-- predicate which is to be used in preference to direct range tests using
-- the subtype name. However, the subtype names are available for direct
-- use, e.g. as choices in case statements.
subtype Access_Kind is Entity_Kind range
E_Access_Type ..
-- E_Access_Subtype
-- E_Access_Attribute_Type
-- E_Allocator_Type
-- E_General_Access_Type
-- E_Access_Subprogram_Type
-- E_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Subprogram_Type
E_Anonymous_Access_Type;
subtype Access_Subprogram_Kind is Entity_Kind range
E_Access_Subprogram_Type ..
-- E_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Protected_Subprogram_Type
E_Anonymous_Access_Subprogram_Type;
subtype Access_Protected_Kind is Entity_Kind range
E_Access_Protected_Subprogram_Type ..
E_Anonymous_Access_Protected_Subprogram_Type;
subtype Aggregate_Kind is Entity_Kind range
E_Array_Type ..
-- E_Array_Subtype
-- E_String_Literal_Subtype
-- E_Class_Wide_Type
-- E_Class_Wide_Subtype
-- E_Record_Type
E_Record_Subtype;
subtype Anonymous_Access_Kind is Entity_Kind range
E_Anonymous_Access_Protected_Subprogram_Type ..
-- E_Anonymous_Subprogram_Type
E_Anonymous_Access_Type;
subtype Array_Kind is Entity_Kind range
E_Array_Type ..
-- E_Array_Subtype
E_String_Literal_Subtype;
subtype Assignable_Kind is Entity_Kind range
E_Variable ..
-- E_Out_Parameter
E_In_Out_Parameter;
subtype Class_Wide_Kind is Entity_Kind range
E_Class_Wide_Type ..
E_Class_Wide_Subtype;
subtype Composite_Kind is Entity_Kind range
E_Array_Type ..
-- E_Array_Subtype
-- E_String_Literal_Subtype
-- E_Class_Wide_Type
-- E_Class_Wide_Subtype
-- E_Record_Type
-- E_Record_Subtype
-- E_Record_Type_With_Private
-- E_Record_Subtype_With_Private
-- E_Private_Type
-- E_Private_Subtype
-- E_Limited_Private_Type
-- E_Limited_Private_Subtype
-- E_Incomplete_Type
-- E_Incomplete_Subtype
-- E_Task_Type
-- E_Task_Subtype,
-- E_Protected_Type,
E_Protected_Subtype;
subtype Concurrent_Kind is Entity_Kind range
E_Task_Type ..
-- E_Task_Subtype,
-- E_Protected_Type,
E_Protected_Subtype;
subtype Concurrent_Body_Kind is Entity_Kind range
E_Protected_Body ..
E_Task_Body;
subtype Decimal_Fixed_Point_Kind is Entity_Kind range
E_Decimal_Fixed_Point_Type ..
E_Decimal_Fixed_Point_Subtype;
subtype Digits_Kind is Entity_Kind range
E_Decimal_Fixed_Point_Type ..
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
E_Floating_Point_Subtype;
subtype Discrete_Kind is Entity_Kind range
E_Enumeration_Type ..
-- E_Enumeration_Subtype
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
E_Modular_Integer_Subtype;
subtype Discrete_Or_Fixed_Point_Kind is Entity_Kind range
E_Enumeration_Type ..
-- E_Enumeration_Subtype
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
E_Decimal_Fixed_Point_Subtype;
subtype Elementary_Kind is Entity_Kind range
E_Enumeration_Type ..
-- E_Enumeration_Subtype
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
-- E_Floating_Point_Subtype
-- E_Access_Type
-- E_Access_Subtype
-- E_Access_Attribute_Type
-- E_Allocator_Type
-- E_General_Access_Type
-- E_Access_Subprogram_Type
-- E_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Subprogram_Type
E_Anonymous_Access_Type;
subtype Enumeration_Kind is Entity_Kind range
E_Enumeration_Type ..
E_Enumeration_Subtype;
subtype Entry_Kind is Entity_Kind range
E_Entry ..
E_Entry_Family;
subtype Fixed_Point_Kind is Entity_Kind range
E_Ordinary_Fixed_Point_Type ..
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
E_Decimal_Fixed_Point_Subtype;
subtype Float_Kind is Entity_Kind range
E_Floating_Point_Type ..
E_Floating_Point_Subtype;
subtype Formal_Kind is Entity_Kind range
E_Out_Parameter ..
-- E_In_Out_Parameter
E_In_Parameter;
subtype Formal_Object_Kind is Entity_Kind range
E_Generic_In_Out_Parameter ..
E_Generic_In_Parameter;
subtype Generic_Subprogram_Kind is Entity_Kind range
E_Generic_Function ..
E_Generic_Procedure;
subtype Generic_Unit_Kind is Entity_Kind range
E_Generic_Function ..
-- E_Generic_Procedure
E_Generic_Package;
subtype Incomplete_Kind is Entity_Kind range
E_Incomplete_Type ..
E_Incomplete_Subtype;
subtype Incomplete_Or_Private_Kind is Entity_Kind range
E_Record_Type_With_Private ..
-- E_Record_Subtype_With_Private
-- E_Private_Type
-- E_Private_Subtype
-- E_Limited_Private_Type
-- E_Limited_Private_Subtype
-- E_Incomplete_Type
E_Incomplete_Subtype;
subtype Integer_Kind is Entity_Kind range
E_Signed_Integer_Type ..
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
E_Modular_Integer_Subtype;
subtype Modular_Integer_Kind is Entity_Kind range
E_Modular_Integer_Type ..
E_Modular_Integer_Subtype;
subtype Named_Kind is Entity_Kind range
E_Named_Integer ..
E_Named_Real;
subtype Numeric_Kind is Entity_Kind range
E_Signed_Integer_Type ..
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
E_Floating_Point_Subtype;
subtype Object_Kind is Entity_Kind range
E_Component ..
-- E_Constant
-- E_Discriminant
-- E_Loop_Parameter
-- E_Variable
-- E_Out_Parameter
-- E_In_Out_Parameter
-- E_In_Parameter
-- E_Generic_In_Out_Parameter
E_Generic_In_Parameter;
subtype Ordinary_Fixed_Point_Kind is Entity_Kind range
E_Ordinary_Fixed_Point_Type ..
E_Ordinary_Fixed_Point_Subtype;
subtype Overloadable_Kind is Entity_Kind range
E_Enumeration_Literal ..
-- E_Function
-- E_Operator
-- E_Procedure
-- E_Abstract_State
E_Entry;
subtype Private_Kind is Entity_Kind range
E_Record_Type_With_Private ..
-- E_Record_Subtype_With_Private
-- E_Private_Type
-- E_Private_Subtype
-- E_Limited_Private_Type
E_Limited_Private_Subtype;
subtype Protected_Kind is Entity_Kind range
E_Protected_Type ..
E_Protected_Subtype;
subtype Real_Kind is Entity_Kind range
E_Ordinary_Fixed_Point_Type ..
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
E_Floating_Point_Subtype;
subtype Record_Kind is Entity_Kind range
E_Class_Wide_Type ..
-- E_Class_Wide_Subtype
-- E_Record_Type
-- E_Record_Subtype
-- E_Record_Type_With_Private
E_Record_Subtype_With_Private;
subtype Scalar_Kind is Entity_Kind range
E_Enumeration_Type ..
-- E_Enumeration_Subtype
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
E_Floating_Point_Subtype;
subtype Subprogram_Kind is Entity_Kind range
E_Function ..
-- E_Operator
E_Procedure;
subtype Signed_Integer_Kind is Entity_Kind range
E_Signed_Integer_Type ..
E_Signed_Integer_Subtype;
subtype Task_Kind is Entity_Kind range
E_Task_Type ..
E_Task_Subtype;
subtype Type_Kind is Entity_Kind range
E_Enumeration_Type ..
-- E_Enumeration_Subtype
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Point_Subtype
-- E_Floating_Point_Type
-- E_Floating_Point_Subtype
-- E_Access_Type
-- E_Access_Subtype
-- E_Access_Attribute_Type
-- E_Allocator_Type,
-- E_General_Access_Type
-- E_Access_Subprogram_Type,
-- E_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Protected_Subprogram_Type
-- E_Anonymous_Access_Subprogram_Type
-- E_Anonymous_Access_Type
-- E_Array_Type
-- E_Array_Subtype
-- E_String_Literal_Subtype
-- E_Class_Wide_Subtype
-- E_Class_Wide_Type
-- E_Record_Type
-- E_Record_Subtype
-- E_Record_Type_With_Private
-- E_Record_Subtype_With_Private
-- E_Private_Type
-- E_Private_Subtype
-- E_Limited_Private_Type
-- E_Limited_Private_Subtype
-- E_Incomplete_Type
-- E_Incomplete_Subtype
-- E_Task_Type
-- E_Task_Subtype
-- E_Protected_Type
-- E_Protected_Subtype
-- E_Exception_Type
E_Subprogram_Type;
--------------------------------------------------------
-- Description of Defined Attributes for Entity_Kinds --
--------------------------------------------------------
-- For each enumeration value defined in Entity_Kind we list all the
-- attributes defined in Einfo which can legally be applied to an entity
-- of that kind. The implementation of the attribute functions (and for
-- non-synthesized attributes, of the corresponding set procedures) are
-- in the Einfo body.
-- The following attributes are defined in all entities
-- Ekind (Ekind)
-- Chars (Name1)
-- Next_Entity (Node2)
-- Scope (Node3)
-- Homonym (Node4)
-- Etype (Node5)
-- First_Rep_Item (Node6)
-- Freeze_Node (Node7)
-- Prev_Entity (Node36)
-- Associated_Entity (Node37)
-- Address_Taken (Flag104)
-- Can_Never_Be_Null (Flag38)
-- Checks_May_Be_Suppressed (Flag31)
-- Debug_Info_Off (Flag166)
-- Has_Convention_Pragma (Flag119)
-- Has_Delayed_Aspects (Flag200)
-- Has_Delayed_Freeze (Flag18)
-- Has_Fully_Qualified_Name (Flag173)
-- Has_Gigi_Rep_Item (Flag82)
-- Has_Homonym (Flag56)
-- Has_Pragma_Elaborate_Body (Flag150)
-- Has_Pragma_Inline (Flag157)
-- Has_Pragma_Inline_Always (Flag230)
-- Has_Pragma_No_Inline (Flag201)
-- Has_Pragma_Pure (Flag203)
-- Has_Pragma_Pure_Function (Flag179)
-- Has_Pragma_Thread_Local_Storage (Flag169)
-- Has_Pragma_Unmodified (Flag233)
-- Has_Pragma_Unreferenced (Flag180)
-- Has_Pragma_Unused (Flag294)
-- Has_Private_Declaration (Flag155)
-- Has_Qualified_Name (Flag161)
-- Has_Stream_Size_Clause (Flag184)
-- Has_Unknown_Discriminants (Flag72)
-- Has_Xref_Entry (Flag182)
-- In_Private_Part (Flag45)
-- Is_Ada_2005_Only (Flag185)
-- Is_Ada_2012_Only (Flag199)
-- Is_Bit_Packed_Array (Flag122) (base type only)
-- Is_Aliased (Flag15)
-- Is_Character_Type (Flag63)
-- Is_Checked_Ghost_Entity (Flag277)
-- Is_Child_Unit (Flag73)
-- Is_Compilation_Unit (Flag149)
-- Is_Descendant_Of_Address (Flag223)
-- Is_Discrim_SO_Function (Flag176)
-- Is_Discriminant_Check_Function (Flag264)
-- Is_Dispatch_Table_Entity (Flag234)
-- Is_Dispatching_Operation (Flag6)
-- Is_Entry_Formal (Flag52)
-- Is_Exported (Flag99)
-- Is_First_Subtype (Flag70)
-- Is_Formal_Subprogram (Flag111)
-- Is_Generic_Instance (Flag130)
-- Is_Generic_Type (Flag13)
-- Is_Hidden (Flag57)
-- Is_Hidden_Open_Scope (Flag171)
-- Is_Ignored_Ghost_Entity (Flag278)
-- Is_Immediately_Visible (Flag7)
-- Is_Implementation_Defined (Flag254)
-- Is_Imported (Flag24)
-- Is_Inlined (Flag11)
-- Is_Internal (Flag17)
-- Is_Itype (Flag91)
-- Is_Known_Non_Null (Flag37)
-- Is_Known_Null (Flag204)
-- Is_Known_Valid (Flag170)
-- Is_Limited_Composite (Flag106)
-- Is_Limited_Record (Flag25)
-- Is_Loop_Parameter (Flag307)
-- Is_Obsolescent (Flag153)
-- Is_Package_Body_Entity (Flag160)
-- Is_Packed_Array_Impl_Type (Flag138)
-- Is_Potentially_Use_Visible (Flag9)
-- Is_Preelaborated (Flag59)
-- Is_Primitive_Wrapper (Flag195)
-- Is_Public (Flag10)
-- Is_Pure (Flag44)
-- Is_Remote_Call_Interface (Flag62)
-- Is_Remote_Types (Flag61)
-- Is_Renaming_Of_Object (Flag112)
-- Is_Shared_Passive (Flag60)
-- Is_Statically_Allocated (Flag28)
-- Is_Static_Type (Flag281)
-- Is_Tagged_Type (Flag55)
-- Is_Thunk (Flag225)
-- Is_Trivial_Subprogram (Flag235)
-- Is_Unchecked_Union (Flag117)
-- Is_Unimplemented (Flag284)
-- Is_Visible_Formal (Flag206)
-- Kill_Elaboration_Checks (Flag32)
-- Kill_Range_Checks (Flag33)
-- Low_Bound_Tested (Flag205)
-- Materialize_Entity (Flag168)
-- Needs_Debug_Info (Flag147)
-- Never_Set_In_Source (Flag115)
-- No_Return (Flag113)
-- Overlays_Constant (Flag243)
-- Referenced (Flag156)
-- Referenced_As_LHS (Flag36)
-- Referenced_As_Out_Parameter (Flag227)
-- Suppress_Elaboration_Warnings (Flag303)
-- Suppress_Style_Checks (Flag165)
-- Suppress_Value_Tracking_On_Call (Flag217)
-- Used_As_Generic_Actual (Flag222)
-- Warnings_Off (Flag96)
-- Warnings_Off_Used (Flag236)
-- Warnings_Off_Used_Unmodified (Flag237)
-- Warnings_Off_Used_Unreferenced (Flag238)
-- Was_Hidden (Flag196)
-- Declaration_Node (synth)
-- Has_Foreign_Convention (synth)
-- Is_Dynamic_Scope (synth)
-- Is_Ghost_Entity (synth)
-- Is_Standard_Character_Type (synth)
-- Is_Standard_String_Type (synth)
-- Underlying_Type (synth)
-- all classification attributes (synth)
-- The following list of access functions applies to all entities for
-- types and subtypes. References to this list appear subsequently as
-- "(plus type attributes)" for each appropriate Entity_Kind.
-- Associated_Node_For_Itype (Node8)
-- Class_Wide_Type (Node9)
-- Full_View (Node11)
-- Esize (Uint12)
-- RM_Size (Uint13)
-- Alignment (Uint14)
-- Pending_Access_Types (Elist15)
-- Related_Expression (Node24)
-- Current_Use_Clause (Node27)
-- Subprograms_For_Type (Elist29)
-- Derived_Type_Link (Node31)
-- No_Tagged_Streams_Pragma (Node32)
-- Linker_Section_Pragma (Node33)
-- SPARK_Pragma (Node40)
-- Depends_On_Private (Flag14)
-- Disable_Controlled (Flag253)
-- Discard_Names (Flag88)
-- Finalize_Storage_Only (Flag158) (base type only)
-- From_Limited_With (Flag159)
-- Has_Aliased_Components (Flag135) (base type only)
-- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86) (base type only)
-- Has_Completion_In_Body (Flag71)
-- Has_Complex_Representation (Flag140) (base type only)
-- Has_Constrained_Partial_View (Flag187)
-- Has_Controlled_Component (Flag43) (base type only)
-- Has_Default_Aspect (Flag39) (base type only)
-- Has_Delayed_Rep_Aspects (Flag261)
-- Has_Discriminants (Flag5)
-- Has_Dynamic_Predicate_Aspect (Flag258)
-- Has_Independent_Components (Flag34) (base type only)
-- Has_Inheritable_Invariants (Flag248) (base type only)
-- Has_Inherited_DIC (Flag133) (base type only)
-- Has_Inherited_Invariants (Flag291) (base type only)
-- Has_Non_Standard_Rep (Flag75) (base type only)
-- Has_Object_Size_Clause (Flag172)
-- Has_Own_DIC (Flag3) (base type only)
-- Has_Own_Invariants (Flag232) (base type only)
-- Has_Pragma_Preelab_Init (Flag221)
-- Has_Pragma_Unreferenced_Objects (Flag212)
-- Has_Predicates (Flag250)
-- Has_Primitive_Operations (Flag120) (base type only)
-- Has_Protected (Flag271) (base type only)
-- Has_Size_Clause (Flag29)
-- Has_Specified_Layout (Flag100) (base type only)
-- Has_Specified_Stream_Input (Flag190)
-- Has_Specified_Stream_Output (Flag191)
-- Has_Specified_Stream_Read (Flag192)
-- Has_Specified_Stream_Write (Flag193)
-- Has_Static_Predicate (Flag269)
-- Has_Static_Predicate_Aspect (Flag259)
-- Has_Task (Flag30) (base type only)
-- Has_Timing_Event (Flag289) (base type only)
-- Has_Unchecked_Union (Flag123) (base type only)
-- Has_Volatile_Components (Flag87) (base type only)
-- In_Use (Flag8)
-- Is_Abstract_Type (Flag146)
-- Is_Asynchronous (Flag81)
-- Is_Atomic (Flag85)
-- Is_Constr_Subt_For_U_Nominal (Flag80)
-- Is_Constr_Subt_For_UN_Aliased (Flag141)
-- Is_Controlled_Active (Flag42) (base type only)
-- Is_Eliminated (Flag124)
-- Is_Frozen (Flag4)
-- Is_Generic_Actual_Type (Flag94)
-- Is_Independent (Flag268)
-- Is_Non_Static_Subtype (Flag109)
-- Is_Packed (Flag51) (base type only)
-- Is_Private_Composite (Flag107)
-- Is_RACW_Stub_Type (Flag244)
-- Is_Unsigned_Type (Flag144)
-- Is_Volatile (Flag16)
-- Is_Volatile_Full_Access (Flag285)
-- Itype_Printed (Flag202) (itypes only)
-- Known_To_Have_Preelab_Init (Flag207)
-- May_Inherit_Delayed_Rep_Aspects (Flag262)
-- Must_Be_On_Byte_Boundary (Flag183)
-- Must_Have_Preelab_Init (Flag208)
-- Optimize_Alignment_Space (Flag241)
-- Optimize_Alignment_Time (Flag242)
-- Partial_View_Has_Unknown_Discr (Flag280)
-- Size_Depends_On_Discriminant (Flag177)
-- Size_Known_At_Compile_Time (Flag92)
-- SPARK_Pragma_Inherited (Flag265)
-- Strict_Alignment (Flag145) (base type only)
-- Suppress_Initialization (Flag105)
-- Treat_As_Volatile (Flag41)
-- Universal_Aliasing (Flag216) (impl base type only)
-- Alignment_Clause (synth)
-- Base_Type (synth)
-- DIC_Procedure (synth)
-- Has_DIC (synth)
-- Has_Invariants (synth)
-- Implementation_Base_Type (synth)
-- Invariant_Procedure (synth)
-- Is_Access_Protected_Subprogram_Type (synth)
-- Is_Atomic_Or_VFA (synth)
-- Is_Controlled (synth)
-- Object_Size_Clause (synth)
-- Partial_Invariant_Procedure (synth)
-- Predicate_Function (synth)
-- Predicate_Function_M (synth)
-- Root_Type (synth)
-- Size_Clause (synth)
------------------------------------------
-- Applicable attributes by entity kind --
------------------------------------------
-- E_Abstract_State
-- Refinement_Constituents (Elist8)
-- Part_Of_Constituents (Elist10)
-- Body_References (Elist16)
-- Non_Limited_View (Node19)
-- Encapsulating_State (Node32)
-- SPARK_Pragma (Node40)
-- From_Limited_With (Flag159)
-- Has_Partial_Visible_Refinement (Flag296)
-- Has_Visible_Refinement (Flag263)
-- SPARK_Pragma_Inherited (Flag265)
-- Has_Non_Limited_View (synth)
-- Has_Non_Null_Visible_Refinement (synth)
-- Has_Null_Visible_Refinement (synth)
-- Is_External_State (synth)
-- Is_Null_State (synth)
-- Is_Relaxed_Initialization_State (synth)
-- Is_Synchronized_State (synth)
-- Partial_Refinement_Constituents (synth)
-- E_Access_Protected_Subprogram_Type
-- Equivalent_Type (Node18)
-- Directly_Designated_Type (Node20)
-- Needs_No_Actuals (Flag22)
-- Can_Use_Internal_Rep (Flag229)
-- (plus type attributes)
-- E_Access_Subprogram_Type
-- Equivalent_Type (Node18) (remote types only)
-- Directly_Designated_Type (Node20)
-- Needs_No_Actuals (Flag22)
-- Original_Access_Type (Node28)
-- Can_Use_Internal_Rep (Flag229)
-- Needs_Activation_Record (Flag306)
-- (plus type attributes)
-- E_Access_Type
-- E_Access_Subtype
-- Master_Id (Node17)
-- Directly_Designated_Type (Node20)
-- Associated_Storage_Pool (Node22) (base type only)
-- Finalization_Master (Node23) (base type only)
-- Storage_Size_Variable (Node26) (base type only)
-- Has_Pragma_Controlled (Flag27) (base type only)
-- Has_Storage_Size_Clause (Flag23) (base type only)
-- Is_Access_Constant (Flag69)
-- Is_Local_Anonymous_Access (Flag194)
-- Is_Pure_Unit_Access_Type (Flag189)
-- No_Pool_Assigned (Flag131) (base type only)
-- No_Strict_Aliasing (Flag136) (base type only)
-- Is_Param_Block_Component_Type (Flag215) (base type only)
-- (plus type attributes)
-- E_Access_Attribute_Type
-- Directly_Designated_Type (Node20)
-- (plus type attributes)
-- E_Allocator_Type
-- Directly_Designated_Type (Node20)
-- (plus type attributes)
-- E_Anonymous_Access_Subprogram_Type
-- E_Anonymous_Access_Protected_Subprogram_Type
-- Directly_Designated_Type (Node20)
-- Storage_Size_Variable (Node26) ??? is this needed ???
-- Can_Use_Internal_Rep (Flag229)
-- Needs_Activation_Record (Flag306)
-- (plus type attributes)
-- E_Anonymous_Access_Type
-- Directly_Designated_Type (Node20)
-- Finalization_Master (Node23)
-- Storage_Size_Variable (Node26) ??? is this needed ???
-- (plus type attributes)
-- E_Array_Type
-- E_Array_Subtype
-- First_Index (Node17)
-- Default_Aspect_Component_Value (Node19) (base type only)
-- Component_Type (Node20) (base type only)
-- Original_Array_Type (Node21)
-- Component_Size (Uint22) (base type only)
-- Packed_Array_Impl_Type (Node23)
-- Related_Array_Object (Node25)
-- Predicated_Parent (Node38) (subtype only)
-- Component_Alignment (special) (base type only)
-- Has_Component_Size_Clause (Flag68) (base type only)
-- Has_Pragma_Pack (Flag121) (impl base type only)
-- Is_Constrained (Flag12)
-- Reverse_Storage_Order (Flag93) (base type only)
-- SSO_Set_High_By_Default (Flag273) (base type only)
-- SSO_Set_Low_By_Default (Flag272) (base type only)
-- Next_Index (synth)
-- Number_Dimensions (synth)
-- (plus type attributes)
-- E_Block
-- Return_Applies_To (Node8)
-- Block_Node (Node11)
-- First_Entity (Node17)
-- Last_Entity (Node20)
-- Scope_Depth_Value (Uint22)
-- Entry_Cancel_Parameter (Node23)
-- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Cleanups (Flag114)
-- Discard_Names (Flag88)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
-- Is_Exception_Handler (Flag286)
-- Sec_Stack_Needed_For_Return (Flag167)
-- Uses_Sec_Stack (Flag95)
-- Scope_Depth (synth)
-- E_Class_Wide_Type
-- E_Class_Wide_Subtype
-- Direct_Primitive_Operations (Elist10)
-- Cloned_Subtype (Node16) (subtype case only)
-- First_Entity (Node17)
-- Equivalent_Type (Node18) (always Empty for type)
-- Non_Limited_View (Node19)
-- Last_Entity (Node20)
-- SSO_Set_High_By_Default (Flag273) (base type only)
-- SSO_Set_Low_By_Default (Flag272) (base type only)
-- First_Component (synth)
-- First_Component_Or_Discriminant (synth)
-- Has_Non_Limited_View (synth)
-- (plus type attributes)
-- E_Component
-- Normalized_First_Bit (Uint8)
-- Current_Value (Node9) (always Empty)
-- Normalized_Position_Max (Uint10)
-- Component_Bit_Offset (Uint11)
-- Esize (Uint12)
-- Component_Clause (Node13)
-- Normalized_Position (Uint14)
-- DT_Entry_Count (Uint15)
-- Entry_Formal (Node16)
-- Prival (Node17)
-- Renamed_Object (Node18) (always Empty)
-- Discriminant_Checking_Func (Node20)
-- Corresponding_Record_Component (Node21)
-- Original_Record_Component (Node22)
-- DT_Offset_To_Top_Func (Node25)
-- Related_Type (Node27)
-- Has_Biased_Representation (Flag139)
-- Has_Per_Object_Constraint (Flag154)
-- Is_Atomic (Flag85)
-- Is_Independent (Flag268)
-- Is_Return_Object (Flag209)
-- Is_Tag (Flag78)
-- Is_Volatile (Flag16)
-- Is_Volatile_Full_Access (Flag285)
-- Treat_As_Volatile (Flag41)
-- Is_Atomic_Or_VFA (synth)
-- Next_Component (synth)
-- Next_Component_Or_Discriminant (synth)
-- E_Constant
-- E_Loop_Parameter
-- Current_Value (Node9) (always Empty)
-- Discriminal_Link (Node10)
-- Full_View (Node11)
-- Esize (Uint12)
-- Extra_Accessibility (Node13) (constants only)
-- Alignment (Uint14)
-- Status_Flag_Or_Transient_Decl (Node15)
-- Actual_Subtype (Node17)
-- Renamed_Object (Node18)
-- Size_Check_Code (Node19) (constants only)
-- Prival_Link (Node20) (privals only)
-- Interface_Name (Node21) (constants only)
-- Related_Type (Node27) (constants only)
-- Initialization_Statements (Node28)
-- BIP_Initialization_Call (Node29)
-- Last_Aggregate_Assignment (Node30)
-- Activation_Record_Component (Node31)
-- Encapsulating_State (Node32) (constants only)
-- Linker_Section_Pragma (Node33)
-- Contract (Node34) (constants only)
-- SPARK_Pragma (Node40) (constants only)
-- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139)
-- Has_Completion (Flag26) (constants only)
-- Has_Independent_Components (Flag34)
-- Has_Size_Clause (Flag29)
-- Has_Thunks (Flag228) (constants only)
-- Has_Volatile_Components (Flag87)
-- Is_Atomic (Flag85)
-- Is_Elaboration_Checks_OK_Id (Flag148) (constants only)
-- Is_Elaboration_Warnings_OK_Id (Flag304) (constants only)
-- Is_Eliminated (Flag124)
-- Is_Finalized_Transient (Flag252)
-- Is_Ignored_Transient (Flag295)
-- Is_Independent (Flag268)
-- Is_Return_Object (Flag209)
-- Is_True_Constant (Flag163)
-- Is_Uplevel_Referenced_Entity (Flag283)
-- Is_Volatile (Flag16)
-- Is_Volatile_Full_Access (Flag285)
-- Optimize_Alignment_Space (Flag241) (constants only)
-- Optimize_Alignment_Time (Flag242) (constants only)
-- SPARK_Pragma_Inherited (Flag265) (constants only)
-- Stores_Attribute_Old_Prefix (Flag270) (constants only)
-- Treat_As_Volatile (Flag41)
-- Address_Clause (synth)
-- Alignment_Clause (synth)
-- Is_Atomic_Or_VFA (synth)
-- Is_Elaboration_Target (synth)
-- Size_Clause (synth)
-- E_Decimal_Fixed_Point_Type
-- E_Decimal_Fixed_Subtype
-- Scale_Value (Uint16)
-- Digits_Value (Uint17)
-- Scalar_Range (Node20)
-- Delta_Value (Ureal18)
-- Small_Value (Ureal21)
-- Static_Real_Or_String_Predicate (Node25)
-- Has_Machine_Radix_Clause (Flag83)
-- Machine_Radix_10 (Flag84)
-- Aft_Value (synth)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Discriminant
-- Normalized_First_Bit (Uint8)
-- Current_Value (Node9) (always Empty)
-- Normalized_Position_Max (Uint10)
-- Component_Bit_Offset (Uint11)
-- Esize (Uint12)
-- Component_Clause (Node13)
-- Normalized_Position (Uint14)
-- Discriminant_Number (Uint15)
-- Discriminal (Node17)
-- Renamed_Object (Node18) (always Empty)
-- Corresponding_Discriminant (Node19)
-- Discriminant_Default_Value (Node20)
-- Corresponding_Record_Component (Node21)
-- Original_Record_Component (Node22)
-- CR_Discriminant (Node23)
-- Is_Completely_Hidden (Flag103)
-- Is_Return_Object (Flag209)
-- Next_Component_Or_Discriminant (synth)
-- Next_Discriminant (synth)
-- Next_Stored_Discriminant (synth)
-- E_Entry
-- E_Entry_Family
-- Protected_Body_Subprogram (Node11)
-- Barrier_Function (Node12)
-- Elaboration_Entity (Node13)
-- Postconditions_Proc (Node14)
-- Entry_Parameters_Type (Node15)
-- First_Entity (Node17)
-- Alias (Node18) (for entry only. Empty)
-- Last_Entity (Node20)
-- Accept_Address (Elist21)
-- Scope_Depth_Value (Uint22)
-- Protection_Object (Node23) (protected kind)
-- Contract_Wrapper (Node25)
-- Extra_Formals (Node28)
-- Contract (Node34)
-- SPARK_Pragma (Node40) (protected kind)
-- Default_Expressions_Processed (Flag108)
-- Entry_Accepted (Flag152)
-- Has_Yield_Aspect (Flag308)
-- Has_Expanded_Contract (Flag240)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Entry_Wrapper (Flag297)
-- Needs_No_Actuals (Flag22)
-- Sec_Stack_Needed_For_Return (Flag167)
-- SPARK_Pragma_Inherited (Flag265) (protected kind)
-- Uses_Sec_Stack (Flag95)
-- Address_Clause (synth)
-- Entry_Index_Type (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
-- Is_Elaboration_Target (synth)
-- Last_Formal (synth)
-- Number_Formals (synth)
-- Scope_Depth (synth)
-- E_Entry_Index_Parameter
-- Entry_Index_Constant (Node18)
-- E_Enumeration_Literal
-- Enumeration_Pos (Uint11)
-- Enumeration_Rep (Uint12)
-- Alias (Node18)
-- Enumeration_Rep_Expr (Node22)
-- Next_Literal (synth)
-- E_Enumeration_Type
-- E_Enumeration_Subtype
-- Lit_Strings (Node16) (root type only)
-- First_Literal (Node17)
-- Lit_Indexes (Node18) (root type only)
-- Default_Aspect_Value (Node19) (base type only)
-- Scalar_Range (Node20)
-- Enum_Pos_To_Rep (Node23) (type only)
-- Static_Discrete_Predicate (List25)
-- Has_Biased_Representation (Flag139)
-- Has_Contiguous_Rep (Flag181)
-- Has_Enumeration_Rep_Clause (Flag66)
-- Has_Pragma_Ordered (Flag198) (base type only)
-- Nonzero_Is_True (Flag162) (base type only)
-- No_Predicate_On_Actual (Flag275)
-- No_Dynamic_Predicate_On_Actual (Flag276)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Exception
-- Esize (Uint12)
-- Alignment (Uint14)
-- Renamed_Entity (Node18)
-- Register_Exception_Call (Node20)
-- Interface_Name (Node21)
-- Activation_Record_Component (Node31)
-- Discard_Names (Flag88)
-- Is_Raised (Flag224)
-- E_Exception_Type
-- Equivalent_Type (Node18)
-- (plus type attributes)
-- E_Floating_Point_Type
-- E_Floating_Point_Subtype
-- Digits_Value (Uint17)
-- Float_Rep (Uint10) (Float_Rep_Kind)
-- Default_Aspect_Value (Node19) (base type only)
-- Scalar_Range (Node20)
-- Static_Real_Or_String_Predicate (Node25)
-- Machine_Emax_Value (synth)
-- Machine_Emin_Value (synth)
-- Machine_Mantissa_Value (synth)
-- Machine_Radix_Value (synth)
-- Model_Emin_Value (synth)
-- Model_Epsilon_Value (synth)
-- Model_Mantissa_Value (synth)
-- Model_Small_Value (synth)
-- Safe_Emax_Value (synth)
-- Safe_First_Value (synth)
-- Safe_Last_Value (synth)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Function
-- E_Generic_Function
-- Mechanism (Uint8) (Mechanism_Type)
-- Renaming_Map (Uint9)
-- Handler_Records (List10) (non-generic case only)
-- Protected_Body_Subprogram (Node11)
-- Next_Inlined_Subprogram (Node12)
-- Elaboration_Entity (Node13) (not implicit /=)
-- Postconditions_Proc (Node14) (non-generic case only)
-- DT_Position (Uint15)
-- DTC_Entity (Node16)
-- First_Entity (Node17)
-- Alias (Node18) (non-generic case only)
-- Renamed_Entity (Node18)
-- Extra_Accessibility_Of_Result (Node19) (non-generic case only)
-- Last_Entity (Node20)
-- Interface_Name (Node21)
-- Scope_Depth_Value (Uint22)
-- Generic_Renamings (Elist23) (for an instance)
-- Inner_Instances (Elist23) (generic case only)
-- Protection_Object (Node23) (for concurrent kind)
-- Subps_Index (Uint24) (non-generic case only)
-- Interface_Alias (Node25)
-- Overridden_Operation (Node26)
-- Wrapped_Entity (Node27) (non-generic case only)
-- Extra_Formals (Node28)
-- Anonymous_Masters (Elist29) (non-generic case only)
-- Corresponding_Equality (Node30) (implicit /= only)
-- Thunk_Entity (Node31) (thunk case only)
-- Corresponding_Procedure (Node32) (generate C code only)
-- Linker_Section_Pragma (Node33)
-- Contract (Node34)
-- Import_Pragma (Node35) (non-generic case only)
-- Class_Wide_Clone (Node38)
-- Protected_Subprogram (Node39) (non-generic case only)
-- SPARK_Pragma (Node40)
-- Original_Protected_Subprogram (Node41)
-- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279)
-- Default_Expressions_Processed (Flag108)
-- Delay_Cleanups (Flag114)
-- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88)
-- Elaboration_Entity_Required (Flag174)
-- Has_Completion (Flag26)
-- Has_Controlling_Result (Flag98)
-- Has_Expanded_Contract (Flag240) (non-generic case only)
-- Has_Master_Entity (Flag21)
-- Has_Missing_Return (Flag142)
-- Has_Nested_Block_With_Handler (Flag101)
-- Has_Nested_Subprogram (Flag282)
-- Has_Out_Or_In_Out_Parameter (Flag110)
-- Has_Recursive_Call (Flag143)
-- Has_Yield_Aspect (Flag308)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Abstract_Subprogram (Flag19) (non-generic case only)
-- Is_Called (Flag102) (non-generic case only)
-- Is_Constructor (Flag76)
-- Is_CUDA_Kernel (Flag118) (non-generic case only)
-- Is_DIC_Procedure (Flag132) (non-generic case only)
-- Is_Discrim_SO_Function (Flag176)
-- Is_Discriminant_Check_Function (Flag264)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Eliminated (Flag124)
-- Is_Generic_Actual_Subprogram (Flag274) (non-generic case only)
-- Is_Hidden_Non_Overridden_Subpgm (Flag2) (non-generic case only)
-- Is_Initial_Condition_Procedure (Flag302) (non-generic case only)
-- Is_Inlined_Always (Flag1) (non-generic case only)
-- Is_Instantiated (Flag126) (generic case only)
-- Is_Intrinsic_Subprogram (Flag64)
-- Is_Invariant_Procedure (Flag257) (non-generic case only)
-- Is_Machine_Code_Subprogram (Flag137) (non-generic case only)
-- Is_Partial_Invariant_Procedure (Flag292) (non-generic case only)
-- Is_Predicate_Function (Flag255) (non-generic case only)
-- Is_Predicate_Function_M (Flag256) (non-generic case only)
-- Is_Primitive (Flag218)
-- Is_Primitive_Wrapper (Flag195) (non-generic case only)
-- Is_Private_Descendant (Flag53)
-- Is_Private_Primitive (Flag245) (non-generic case only)
-- Is_Pure (Flag44)
-- Is_Visible_Lib_Unit (Flag116)
-- Needs_No_Actuals (Flag22)
-- Requires_Overriding (Flag213) (non-generic case only)
-- Return_Present (Flag54)
-- Returns_By_Ref (Flag90)
-- Rewritten_For_C (Flag287) (generate C code only)
-- Sec_Stack_Needed_For_Return (Flag167)
-- SPARK_Pragma_Inherited (Flag265)
-- Uses_Sec_Stack (Flag95)
-- Address_Clause (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
-- Is_Elaboration_Target (synth)
-- Last_Formal (synth)
-- Number_Formals (synth)
-- Scope_Depth (synth)
-- E_General_Access_Type
-- Master_Id (Node17)
-- Directly_Designated_Type (Node20)
-- Associated_Storage_Pool (Node22) (root type only)
-- Finalization_Master (Node23) (root type only)
-- Storage_Size_Variable (Node26) (base type only)
-- (plus type attributes)
-- E_Generic_In_Parameter
-- E_Generic_In_Out_Parameter
-- Current_Value (Node9) (always Empty)
-- Entry_Component (Node11)
-- Actual_Subtype (Node17)
-- Renamed_Object (Node18) (always Empty)
-- Default_Value (Node20)
-- Protected_Formal (Node22)
-- Is_Controlling_Formal (Flag97)
-- Is_Return_Object (Flag209)
-- Parameter_Mode (synth)
-- E_Incomplete_Type
-- E_Incomplete_Subtype
-- Direct_Primitive_Operations (Elist10)
-- Non_Limited_View (Node19)
-- Private_Dependents (Elist18)
-- Discriminant_Constraint (Elist21)
-- Stored_Constraint (Elist23)
-- Has_Non_Limited_View (synth)
-- (plus type attributes)
-- E_In_Parameter
-- E_In_Out_Parameter
-- E_Out_Parameter
-- Mechanism (Uint8) (Mechanism_Type)
-- Current_Value (Node9)
-- Discriminal_Link (Node10) (discriminals only)
-- Entry_Component (Node11)
-- Esize (Uint12)
-- Extra_Accessibility (Node13)
-- Alignment (Uint14)
-- Extra_Formal (Node15)
-- Unset_Reference (Node16)
-- Actual_Subtype (Node17)
-- Renamed_Object (Node18)
-- Spec_Entity (Node19)
-- Default_Value (Node20)
-- Default_Expr_Function (Node21)
-- Protected_Formal (Node22)
-- Extra_Constrained (Node23)
-- Minimum_Accessibility (Node24)
-- Last_Assignment (Node26) (OUT, IN-OUT only)
-- Activation_Record_Component (Node31)
-- Has_Initial_Value (Flag219)
-- Is_Controlling_Formal (Flag97)
-- Is_Only_Out_Parameter (Flag226)
-- Low_Bound_Tested (Flag205)
-- Is_Return_Object (Flag209)
-- Is_Activation_Record (Flag305)
-- Parameter_Mode (synth)
-- E_Label
-- Enclosing_Scope (Node18)
-- Reachable (Flag49)
-- E_Limited_Private_Type
-- E_Limited_Private_Subtype
-- First_Entity (Node17)
-- Private_Dependents (Elist18)
-- Underlying_Full_View (Node19)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Stored_Constraint (Elist23)
-- Has_Completion (Flag26)
-- (plus type attributes)
-- E_Loop
-- First_Exit_Statement (Node8)
-- Has_Exit (Flag47)
-- Has_Loop_Entry_Attributes (Flag260)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
-- Uses_Sec_Stack (Flag95)
-- E_Modular_Integer_Type
-- E_Modular_Integer_Subtype
-- Modulus (Uint17) (base type only)
-- Default_Aspect_Value (Node19) (base type only)
-- Original_Array_Type (Node21)
-- Scalar_Range (Node20)
-- Static_Discrete_Predicate (List25)
-- Non_Binary_Modulus (Flag58) (base type only)
-- Has_Biased_Representation (Flag139)
-- Has_Shift_Operator (Flag267) (base type only)
-- No_Predicate_On_Actual (Flag275)
-- No_Dynamic_Predicate_On_Actual (Flag276)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Named_Integer
-- E_Named_Real
-- E_Operator
-- First_Entity (Node17)
-- Alias (Node18)
-- Extra_Accessibility_Of_Result (Node19)
-- Last_Entity (Node20)
-- Subps_Index (Uint24)
-- Overridden_Operation (Node26)
-- Linker_Section_Pragma (Node33)
-- Contract (Node34)
-- Import_Pragma (Node35)
-- SPARK_Pragma (Node40)
-- Default_Expressions_Processed (Flag108)
-- Has_Nested_Subprogram (Flag282)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Intrinsic_Subprogram (Flag64)
-- Is_Machine_Code_Subprogram (Flag137)
-- Is_Primitive (Flag218)
-- Is_Pure (Flag44)
-- SPARK_Pragma_Inherited (Flag265)
-- Is_Elaboration_Target (synth)
-- Aren't there more flags and fields? seems like this list should be
-- more similar to the E_Function list, which is much longer ???
-- E_Ordinary_Fixed_Point_Type
-- E_Ordinary_Fixed_Point_Subtype
-- Delta_Value (Ureal18)
-- Default_Aspect_Value (Node19) (base type only)
-- Scalar_Range (Node20)
-- Static_Real_Or_String_Predicate (Node25)
-- Small_Value (Ureal21)
-- Has_Small_Clause (Flag67)
-- Aft_Value (synth)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Package
-- E_Generic_Package
-- Dependent_Instances (Elist8) (for an instance)
-- Renaming_Map (Uint9)
-- Handler_Records (List10) (non-generic case only)
-- Generic_Homonym (Node11) (generic case only)
-- Associated_Formal_Package (Node12)
-- Elaboration_Entity (Node13)
-- Related_Instance (Node15) (non-generic case only)
-- First_Private_Entity (Node16)
-- First_Entity (Node17)
-- Renamed_Entity (Node18)
-- Body_Entity (Node19)
-- Last_Entity (Node20)
-- Interface_Name (Node21)
-- Scope_Depth_Value (Uint22)
-- Generic_Renamings (Elist23) (for an instance)
-- Inner_Instances (Elist23) (generic case only)
-- Limited_View (Node23) (non-generic/instance)
-- Incomplete_Actuals (Elist24) (for an instance)
-- Abstract_States (Elist25)
-- Package_Instantiation (Node26)
-- Current_Use_Clause (Node27)
-- Finalizer (Node28) (non-generic case only)
-- Anonymous_Masters (Elist29) (non-generic case only)
-- Contract (Node34)
-- SPARK_Pragma (Node40)
-- SPARK_Aux_Pragma (Node41)
-- Body_Needed_For_Inlining (Flag299)
-- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88)
-- Elaborate_Body_Desirable (Flag210) (non-generic case only)
-- Elaboration_Entity_Required (Flag174)
-- From_Limited_With (Flag159)
-- Has_All_Calls_Remote (Flag79)
-- Has_Completion (Flag26)
-- Has_Forward_Instantiation (Flag175)
-- Has_Master_Entity (Flag21)
-- Has_RACW (Flag214) (non-generic case only)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Called (Flag102) (non-generic case only)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Instantiated (Flag126)
-- In_Package_Body (Flag48)
-- Is_Private_Descendant (Flag53)
-- In_Use (Flag8)
-- Is_Visible_Lib_Unit (Flag116)
-- Renamed_In_Spec (Flag231) (non-generic case only)
-- SPARK_Aux_Pragma_Inherited (Flag266)
-- SPARK_Pragma_Inherited (Flag265)
-- Static_Elaboration_Desired (Flag77) (non-generic case only)
-- Has_Non_Null_Abstract_State (synth)
-- Has_Null_Abstract_State (synth)
-- Is_Elaboration_Target (synth)
-- Is_Wrapper_Package (synth) (non-generic case only)
-- Scope_Depth (synth)
-- E_Package_Body
-- Handler_Records (List10) (non-generic case only)
-- Related_Instance (Node15) (non-generic case only)
-- First_Entity (Node17)
-- Spec_Entity (Node19)
-- Last_Entity (Node20)
-- Scope_Depth_Value (Uint22)
-- Finalizer (Node28) (non-generic case only)
-- Contract (Node34)
-- SPARK_Pragma (Node40)
-- SPARK_Aux_Pragma (Node41)
-- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Subprogram_Descriptors (Flag50)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- SPARK_Aux_Pragma_Inherited (Flag266)
-- SPARK_Pragma_Inherited (Flag265)
-- Scope_Depth (synth)
-- E_Private_Type
-- E_Private_Subtype
-- Direct_Primitive_Operations (Elist10)
-- First_Entity (Node17)
-- Private_Dependents (Elist18)
-- Underlying_Full_View (Node19)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Stored_Constraint (Elist23)
-- Has_Completion (Flag26)
-- Is_Controlled_Active (Flag42) (base type only)
-- (plus type attributes)
-- E_Procedure
-- E_Generic_Procedure
-- Renaming_Map (Uint9)
-- Handler_Records (List10) (non-generic case only)
-- Protected_Body_Subprogram (Node11)
-- Next_Inlined_Subprogram (Node12)
-- Elaboration_Entity (Node13)
-- Postconditions_Proc (Node14) (non-generic case only)
-- DT_Position (Uint15)
-- DTC_Entity (Node16)
-- First_Entity (Node17)
-- Alias (Node18) (non-generic case only)
-- Renamed_Entity (Node18)
-- Receiving_Entry (Node19) (non-generic case only)
-- Last_Entity (Node20)
-- Interface_Name (Node21)
-- Scope_Depth_Value (Uint22)
-- Generic_Renamings (Elist23) (for an instance)
-- Inner_Instances (Elist23) (generic case only)
-- Protection_Object (Node23) (for concurrent kind)
-- Subps_Index (Uint24) (non-generic case only)
-- Interface_Alias (Node25)
-- Overridden_Operation (Node26) (never for init proc)
-- Wrapped_Entity (Node27) (non-generic case only)
-- Extra_Formals (Node28)
-- Anonymous_Masters (Elist29) (non-generic case only)
-- Static_Initialization (Node30) (init_proc only)
-- Thunk_Entity (Node31) (thunk case only)
-- Corresponding_Function (Node32) (generate C code only)
-- Linker_Section_Pragma (Node33)
-- Contract (Node34)
-- Import_Pragma (Node35) (non-generic case only)
-- Class_Wide_Clone (Node38)
-- Protected_Subprogram (Node39) (non-generic case only)
-- SPARK_Pragma (Node40)
-- Original_Protected_Subprogram (Node41)
-- Body_Needed_For_SAL (Flag40)
-- Contains_Ignored_Ghost_Code (Flag279)
-- Delay_Cleanups (Flag114)
-- Discard_Names (Flag88)
-- Elaboration_Entity_Required (Flag174)
-- Default_Expressions_Processed (Flag108)
-- Delay_Cleanups (Flag114)
-- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88)
-- Has_Completion (Flag26)
-- Has_Expanded_Contract (Flag240) (non-generic case only)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
-- Has_Nested_Subprogram (Flag282)
-- Has_Yield_Aspect (Flag308)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Abstract_Subprogram (Flag19) (non-generic case only)
-- Is_Asynchronous (Flag81)
-- Is_Called (Flag102) (non-generic case only)
-- Is_Constructor (Flag76)
-- Is_CUDA_Kernel (Flag118)
-- Is_DIC_Procedure (Flag132) (non-generic case only)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Eliminated (Flag124)
-- Is_Generic_Actual_Subprogram (Flag274) (non-generic case only)
-- Is_Hidden_Non_Overridden_Subpgm (Flag2) (non-generic case only)
-- Is_Initial_Condition_Procedure (Flag302) (non-generic case only)
-- Is_Inlined_Always (Flag1) (non-generic case only)
-- Is_Instantiated (Flag126) (generic case only)
-- Is_Interrupt_Handler (Flag89)
-- Is_Intrinsic_Subprogram (Flag64)
-- Is_Invariant_Procedure (Flag257) (non-generic case only)
-- Is_Machine_Code_Subprogram (Flag137) (non-generic case only)
-- Is_Null_Init_Proc (Flag178)
-- Is_Partial_Invariant_Procedure (Flag292) (non-generic case only)
-- Is_Predicate_Function (Flag255) (non-generic case only)
-- Is_Predicate_Function_M (Flag256) (non-generic case only)
-- Is_Primitive (Flag218)
-- Is_Primitive_Wrapper (Flag195) (non-generic case only)
-- Is_Private_Descendant (Flag53)
-- Is_Private_Primitive (Flag245) (non-generic case only)
-- Is_Pure (Flag44)
-- Is_Valued_Procedure (Flag127)
-- Is_Visible_Lib_Unit (Flag116)
-- Needs_No_Actuals (Flag22)
-- No_Return (Flag113)
-- Requires_Overriding (Flag213) (non-generic case only)
-- Sec_Stack_Needed_For_Return (Flag167)
-- SPARK_Pragma_Inherited (Flag265)
-- Address_Clause (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
-- Is_Elaboration_Target (synth)
-- Is_Finalizer (synth)
-- Last_Formal (synth)
-- Number_Formals (synth)
-- E_Protected_Body
-- SPARK_Pragma (Node40)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- SPARK_Pragma_Inherited (Flag265)
-- (any others??? First/Last Entity, Scope_Depth???)
-- E_Protected_Object
-- E_Protected_Type
-- E_Protected_Subtype
-- Direct_Primitive_Operations (Elist10)
-- First_Private_Entity (Node16)
-- First_Entity (Node17)
-- Corresponding_Record_Type (Node18)
-- Entry_Bodies_Array (Node19)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Scope_Depth_Value (Uint22)
-- Stored_Constraint (Elist23)
-- Anonymous_Object (Node30)
-- Contract (Node34)
-- Entry_Max_Queue_Lengths_Array (Node35)
-- SPARK_Aux_Pragma (Node41)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- SPARK_Aux_Pragma_Inherited (Flag266)
-- Uses_Lock_Free (Flag188)
-- First_Component (synth)
-- First_Component_Or_Discriminant (synth)
-- Has_Entries (synth)
-- Has_Interrupt_Handler (synth)
-- Number_Entries (synth)
-- Scope_Depth (synth)
-- (plus type attributes)
-- E_Record_Type
-- E_Record_Subtype
-- Direct_Primitive_Operations (Elist10)
-- Access_Disp_Table (Elist16) (base type only)
-- Cloned_Subtype (Node16) (subtype case only)
-- First_Entity (Node17)
-- Corresponding_Concurrent_Type (Node18)
-- Parent_Subtype (Node19) (base type only)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Corresponding_Remote_Type (Node22)
-- Stored_Constraint (Elist23)
-- Interfaces (Elist25)
-- Dispatch_Table_Wrappers (Elist26) (base type only)
-- Underlying_Record_View (Node28) (base type only)
-- Access_Disp_Table_Elab_Flag (Node30) (base type only)
-- Predicated_Parent (Node38) (subtype only)
-- Component_Alignment (special) (base type only)
-- C_Pass_By_Copy (Flag125) (base type only)
-- Has_Dispatch_Table (Flag220) (base tagged type only)
-- Has_Pragma_Pack (Flag121) (impl base type only)
-- Has_Private_Ancestor (Flag151)
-- Has_Private_Extension (Flag300)
-- Has_Record_Rep_Clause (Flag65) (base type only)
-- Has_Static_Discriminants (Flag211) (subtype only)
-- Is_Class_Wide_Equivalent_Type (Flag35)
-- Is_Concurrent_Record_Type (Flag20)
-- Is_Constrained (Flag12)
-- Is_Controlled_Active (Flag42) (base type only)
-- Is_Interface (Flag186)
-- Is_Limited_Interface (Flag197)
-- No_Reordering (Flag239) (base type only)
-- Reverse_Bit_Order (Flag164) (base type only)
-- Reverse_Storage_Order (Flag93) (base type only)
-- SSO_Set_High_By_Default (Flag273) (base type only)
-- SSO_Set_Low_By_Default (Flag272) (base type only)
-- First_Component (synth)
-- First_Component_Or_Discriminant (synth)
-- (plus type attributes)
-- E_Record_Type_With_Private
-- E_Record_Subtype_With_Private
-- Direct_Primitive_Operations (Elist10)
-- First_Entity (Node17)
-- Private_Dependents (Elist18)
-- Underlying_Full_View (Node19)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Stored_Constraint (Elist23)
-- Interfaces (Elist25)
-- Predicated_Parent (Node38) (subtype only)
-- Has_Completion (Flag26)
-- Has_Private_Ancestor (Flag151)
-- Has_Private_Extension (Flag300)
-- Has_Record_Rep_Clause (Flag65) (base type only)
-- Is_Concurrent_Record_Type (Flag20)
-- Is_Constrained (Flag12)
-- Is_Controlled_Active (Flag42) (base type only)
-- Is_Interface (Flag186)
-- Is_Limited_Interface (Flag197)
-- No_Reordering (Flag239) (base type only)
-- Reverse_Bit_Order (Flag164) (base type only)
-- Reverse_Storage_Order (Flag93) (base type only)
-- SSO_Set_High_By_Default (Flag273) (base type only)
-- SSO_Set_Low_By_Default (Flag272) (base type only)
-- First_Component (synth)
-- First_Component_Or_Discriminant (synth)
-- (plus type attributes)
-- E_Return_Statement
-- Return_Applies_To (Node8)
-- E_Signed_Integer_Type
-- E_Signed_Integer_Subtype
-- Default_Aspect_Value (Node19) (base type only)
-- Scalar_Range (Node20)
-- Static_Discrete_Predicate (List25)
-- Has_Biased_Representation (Flag139)
-- Has_Shift_Operator (Flag267) (base type only)
-- No_Predicate_On_Actual (Flag275)
-- No_Dynamic_Predicate_On_Actual (Flag276)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_String_Literal_Subtype
-- String_Literal_Length (Uint16)
-- First_Index (Node17) (always Empty)
-- String_Literal_Low_Bound (Node18)
-- Packed_Array_Impl_Type (Node23)
-- (plus type attributes)
-- E_Subprogram_Body
-- Mechanism (Uint8)
-- First_Entity (Node17)
-- Corresponding_Protected_Entry (Node18)
-- Last_Entity (Node20)
-- Scope_Depth_Value (Uint22)
-- Extra_Formals (Node28)
-- Anonymous_Masters (Elist29)
-- Contract (Node34)
-- SPARK_Pragma (Node40)
-- Contains_Ignored_Ghost_Code (Flag279)
-- SPARK_Pragma_Inherited (Flag265)
-- Scope_Depth (synth)
-- E_Subprogram_Type
-- Extra_Accessibility_Of_Result (Node19)
-- Directly_Designated_Type (Node20)
-- Extra_Formals (Node28)
-- Access_Subprogram_Wrapper (Node41)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
-- Last_Formal (synth)
-- Number_Formals (synth)
-- Returns_By_Ref (Flag90)
-- (plus type attributes)
-- E_Task_Body
-- Contract (Node34)
-- SPARK_Pragma (Node40)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- SPARK_Pragma_Inherited (Flag265)
-- (any others??? First/Last Entity, Scope_Depth???)
-- E_Task_Type
-- E_Task_Subtype
-- Direct_Primitive_Operations (Elist10)
-- First_Private_Entity (Node16)
-- First_Entity (Node17)
-- Corresponding_Record_Type (Node18)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Scope_Depth_Value (Uint22)
-- Stored_Constraint (Elist23)
-- Task_Body_Procedure (Node25)
-- Storage_Size_Variable (Node26) (base type only)
-- Relative_Deadline_Variable (Node28) (base type only)
-- Anonymous_Object (Node30)
-- Contract (Node34)
-- SPARK_Aux_Pragma (Node41)
-- Delay_Cleanups (Flag114)
-- Has_Master_Entity (Flag21)
-- Has_Storage_Size_Clause (Flag23) (base type only)
-- Ignore_SPARK_Mode_Pragmas (Flag301)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- SPARK_Aux_Pragma_Inherited (Flag266)
-- First_Component (synth)
-- First_Component_Or_Discriminant (synth)
-- Has_Entries (synth)
-- Is_Elaboration_Target (synth)
-- Number_Entries (synth)
-- Scope_Depth (synth)
-- (plus type attributes)
-- E_Variable
-- Hiding_Loop_Variable (Node8)
-- Current_Value (Node9)
-- Part_Of_Constituents (Elist10)
-- Part_Of_References (Elist11)
-- Esize (Uint12)
-- Extra_Accessibility (Node13)
-- Alignment (Uint14)
-- Status_Flag_Or_Transient_Decl (Node15) (transient object only)
-- Unset_Reference (Node16)
-- Actual_Subtype (Node17)
-- Renamed_Object (Node18)
-- Size_Check_Code (Node19)
-- Prival_Link (Node20)
-- Interface_Name (Node21)
-- Shared_Var_Procs_Instance (Node22)
-- Extra_Constrained (Node23)
-- Related_Expression (Node24)
-- Debug_Renaming_Link (Node25)
-- Last_Assignment (Node26)
-- Related_Type (Node27)
-- Initialization_Statements (Node28)
-- BIP_Initialization_Call (Node29)
-- Last_Aggregate_Assignment (Node30)
-- Activation_Record_Component (Node31)
-- Encapsulating_State (Node32)
-- Linker_Section_Pragma (Node33)
-- Contract (Node34)
-- Anonymous_Designated_Type (Node35)
-- Validated_Object (Node38)
-- SPARK_Pragma (Node40)
-- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139)
-- Has_Independent_Components (Flag34)
-- Has_Initial_Value (Flag219)
-- Has_Size_Clause (Flag29)
-- Has_Volatile_Components (Flag87)
-- Is_Atomic (Flag85)
-- Is_Elaboration_Checks_OK_Id (Flag148)
-- Is_Elaboration_Warnings_OK_Id (Flag304)
-- Is_Eliminated (Flag124)
-- Is_Finalized_Transient (Flag252)
-- Is_Ignored_Transient (Flag295)
-- Is_Independent (Flag268)
-- Is_Return_Object (Flag209)
-- Is_Safe_To_Reevaluate (Flag249)
-- Is_Shared_Passive (Flag60)
-- Is_True_Constant (Flag163)
-- Is_Uplevel_Referenced_Entity (Flag283)
-- Is_Volatile (Flag16)
-- Is_Volatile_Full_Access (Flag285)
-- OK_To_Rename (Flag247)
-- Optimize_Alignment_Space (Flag241)
-- Optimize_Alignment_Time (Flag242)
-- SPARK_Pragma_Inherited (Flag265)
-- Suppress_Initialization (Flag105)
-- Treat_As_Volatile (Flag41)
-- Address_Clause (synth)
-- Alignment_Clause (synth)
-- Is_Atomic_Or_VFA (synth)
-- Is_Elaboration_Target (synth)
-- Size_Clause (synth)
-- E_Void
-- Since E_Void is the initial Ekind value of an entity when it is first
-- created, one might expect that no attributes would be defined on such
-- an entity until its Ekind field is set. However, in practice, there
-- are many instances in which fields of an E_Void entity are set in the
-- code prior to setting the Ekind field. This is not well documented or
-- well controlled, and needs cleaning up later. Meanwhile, the access
-- procedures in the body of Einfo permit many, but not all, attributes
-- to be applied to an E_Void entity, precisely so that this kind of
-- pre-setting of attributes works. This is really a hole in the dynamic
-- type checking, since there is no assurance that the eventual Ekind
-- value will be appropriate for the attributes set, and the consequence
-- is that the dynamic type checking in the Einfo body is unnecessarily
-- weak. To be looked at systematically some time ???
---------------------------------
-- Component_Alignment Control --
---------------------------------
-- There are four types of alignment possible for array and record
-- types, and a field in the type entities contains a value of the
-- following type indicating which alignment choice applies. For full
-- details of the meaning of these alignment types, see description
-- of the Component_Alignment pragma.
type Component_Alignment_Kind is (
Calign_Default, -- default alignment
Calign_Component_Size, -- natural alignment for component size
Calign_Component_Size_4, -- natural for size <= 4, 4 for size >= 4
Calign_Storage_Unit); -- all components byte aligned
-----------------------------------
-- Floating Point Representation --
-----------------------------------
type Float_Rep_Kind is (
IEEE_Binary, -- IEEE 754p conforming binary format
AAMP); -- AAMP format
---------------
-- Iterators --
---------------
-- In addition to attributes that are stored as plain data, other
-- attributes are procedural, and require some small amount of
-- computation. Of course, from the point of view of a user of this
-- package, the distinction is not visible (even the field information
-- provided below should be disregarded, as it is subject to change
-- without notice). A number of attributes appear as lists: lists of
-- formals, lists of actuals, of discriminants, etc. For these, pairs
-- of functions are defined, which take the form:
-- function First_Thing (E : Enclosing_Construct) return Thing;
-- function Next_Thing (T : Thing) return Thing;
-- The end of iteration is always signaled by a value of Empty, so that
-- loops over these chains invariably have the form:
-- This : Thing;
-- ...
-- This := First_Thing (E);
-- while Present (This) loop
-- Do_Something_With (This);
-- ...
-- This := Next_Thing (This);
-- end loop;
-----------------------------------
-- Handling of Check Suppression --
-----------------------------------
-- There are three ways that checks can be suppressed:
-- 1. At the command line level
-- 2. At the scope level.
-- 3. At the entity level.
-- See spec of Sem in sem.ads for details of the data structures used
-- to keep track of these various methods for suppressing checks.
-------------------------------
-- Handling of Discriminants --
-------------------------------
-- During semantic processing, discriminants are separate entities which
-- reflect the semantic properties and allowed usage of discriminants in
-- the language.
-- In the case of discriminants used as bounds, the references are handled
-- directly, since special processing is needed in any case. However, there
-- are two circumstances in which discriminants are referenced in a quite
-- general manner, like any other variables:
-- In initialization expressions for records. Note that the expressions
-- used in Priority, Storage_Size, Task_Info and Relative_Deadline
-- pragmas are effectively in this category, since these pragmas are
-- converted to initialized record fields in the Corresponding_Record_
-- Type.
-- In task and protected bodies, where the discriminant values may be
-- referenced freely within these bodies. Discriminants can also appear
-- in bounds of entry families and in defaults of operations.
-- In both these cases, the discriminants must be treated essentially as
-- objects. The following approach is used to simplify and minimize the
-- special processing that is required.
-- When a record type with discriminants is analyzed, semantic processing
-- creates the entities for the discriminants. It also creates additional
-- sets of entities called discriminals, one for each of the discriminants,
-- and the Discriminal field of the discriminant entity points to this
-- additional entity, which is initially created as an uninitialized
-- (E_Void) entity.
-- During expansion of expressions, any discriminant reference is replaced
-- by a reference to the corresponding discriminal. When the initialization
-- procedure for the record is created (there will always be one, since
-- discriminants are present, see Exp_Ch3 for further details), the
-- discriminals are used as the entities for the formal parameters of
-- this initialization procedure. The references to these discriminants
-- have already been replaced by references to these discriminals, which
-- are now the formal parameters corresponding to the required objects.
-- In the case of a task or protected body, the semantics similarly creates
-- a set of discriminals for the discriminants of the task or protected
-- type. When the procedure is created for the task body, the parameter
-- passed in is a reference to the task value type, which contains the
-- required discriminant values. The expander creates a set of declarations
-- of the form:
-- discr_nameD : constant discr_type renames _task.discr_name;
-- where discr_nameD is the discriminal entity referenced by the task
-- discriminant, and _task is the task value passed in as the parameter.
-- Again, any references to discriminants in the task body have been
-- replaced by the discriminal reference, which is now an object that
-- contains the required value.
-- This approach for tasks means that two sets of discriminals are needed
-- for a task type, one for the initialization procedure, and one for the
-- task body. This works out nicely, since the semantics allocates one set
-- for the task itself, and one set for the corresponding record.
-- The one bit of trickiness arises in making sure that the right set of
-- discriminals is used at the right time. First the task definition is
-- processed. Any references to discriminants here are replaced by the
-- corresponding *task* discriminals (the record type doesn't even exist
-- yet, since it is constructed as part of the expansion of the task
-- declaration, which happens after the semantic processing of the task
-- definition). The discriminants to be used for the corresponding record
-- are created at the same time as the other discriminals, and held in the
-- CR_Discriminant field of the discriminant. A use of the discriminant in
-- a bound for an entry family is replaced with the CR_Discriminant because
-- it controls the bound of the entry queue array which is a component of
-- the corresponding record.
-- Just before the record initialization routine is constructed, the
-- expander exchanges the task and record discriminals. This has two
-- effects. First the generation of the record initialization routine
-- uses the discriminals that are now on the record, which is the set
-- that used to be on the task, which is what we want.
-- Second, a new set of (so far unused) discriminals is now on the task
-- discriminants, and it is this set that will be used for expanding the
-- task body, and also for the discriminal declarations at the start of
-- the task body.
---------------------------------------------------
-- Handling of private data in protected objects --
---------------------------------------------------
-- Private components in protected types pose problems similar to those
-- of discriminants. Private data is visible and can be directly referenced
-- from protected bodies. However, when protected entries and subprograms
-- are expanded into corresponding bodies and barrier functions, private
-- components lose their original context and visibility.
-- To remedy this side effect of expansion, private components are expanded
-- into renamings called "privals", by analogy with "discriminals".
-- private_comp : comp_type renames _object.private_comp;
-- Prival declarations are inserted during the analysis of subprogram and
-- entry bodies to ensure proper visibility for any subsequent expansion.
-- _Object is the formal parameter of the generated corresponding body or
-- a local renaming which denotes the protected object obtained from entry
-- parameter _O. Privals receive minimal decoration upon creation and are
-- categorized as either E_Variable for the general case or E_Constant when
-- they appear in functions.
-- Along with the local declarations, each private component carries a
-- placeholder which references the prival entity in the current body. This
-- form of indirection is used to resolve name clashes of privals and other
-- locally visible entities such as parameters, local objects, entry family
-- indexes or identifiers used in the barrier condition.
-- When analyzing the statements of a protected subprogram or entry, any
-- reference to a private component must resolve to the locally declared
-- prival through normal visibility. In case of name conflicts (the cases
-- above), the prival is marked as hidden and acts as a weakly declared
-- entity. As a result, the reference points to the correct entity. When a
-- private component is denoted by an expanded name (prot_type.comp for
-- example), the expansion mechanism uses the placeholder of the component
-- to correct the Entity and Etype of the reference.
-------------------
-- Type Synonyms --
-------------------
-- The following type synonyms are used to tidy up the function and
-- procedure declarations that follow, and also to make it possible to meet
-- the requirement for the XEINFO utility that all function specs must fit
-- on a single source line.
subtype B is Boolean;
subtype C is Component_Alignment_Kind;
subtype E is Entity_Id;
subtype F is Float_Rep_Kind;
subtype M is Mechanism_Type;
subtype N is Node_Id;
subtype U is Uint;
subtype R is Ureal;
subtype L is Elist_Id;
subtype S is List_Id;
--------------------------------
-- Attribute Access Functions --
--------------------------------
-- All attributes are manipulated through a procedural interface. This
-- section contains the functions used to obtain attribute values which
-- correspond to values in fields or flags in the entity itself.
function Abstract_States (Id : E) return L;
function Accept_Address (Id : E) return L;
function Access_Disp_Table (Id : E) return L;
function Access_Disp_Table_Elab_Flag (Id : E) return E;
function Access_Subprogram_Wrapper (Id : E) return E;
function Activation_Record_Component (Id : E) return E;
function Actual_Subtype (Id : E) return E;
function Address_Taken (Id : E) return B;
function Alias (Id : E) return E;
function Alignment (Id : E) return U;
function Anonymous_Designated_Type (Id : E) return E;
function Anonymous_Masters (Id : E) return L;
function Anonymous_Object (Id : E) return E;
function Associated_Entity (Id : E) return E;
function Associated_Formal_Package (Id : E) return E;
function Associated_Node_For_Itype (Id : E) return N;
function Associated_Storage_Pool (Id : E) return E;
function Barrier_Function (Id : E) return N;
function BIP_Initialization_Call (Id : E) return N;
function Block_Node (Id : E) return N;
function Body_Entity (Id : E) return E;
function Body_Needed_For_SAL (Id : E) return B;
function Body_Needed_For_Inlining (Id : E) return B;
function Body_References (Id : E) return L;
function C_Pass_By_Copy (Id : E) return B;
function Can_Never_Be_Null (Id : E) return B;
function Can_Use_Internal_Rep (Id : E) return B;
function Checks_May_Be_Suppressed (Id : E) return B;
function Class_Wide_Clone (Id : E) return E;
function Class_Wide_Type (Id : E) return E;
function Cloned_Subtype (Id : E) return E;
function Component_Bit_Offset (Id : E) return U;
function Component_Clause (Id : E) return N;
function Component_Size (Id : E) return U;
function Component_Type (Id : E) return E;
function Contains_Ignored_Ghost_Code (Id : E) return B;
function Contract (Id : E) return N;
function Contract_Wrapper (Id : E) return E;
function Corresponding_Concurrent_Type (Id : E) return E;
function Corresponding_Discriminant (Id : E) return E;
function Corresponding_Equality (Id : E) return E;
function Corresponding_Function (Id : E) return E;
function Corresponding_Procedure (Id : E) return E;
function Corresponding_Protected_Entry (Id : E) return E;
function Corresponding_Record_Component (Id : E) return E;
function Corresponding_Record_Type (Id : E) return E;
function Corresponding_Remote_Type (Id : E) return E;
function CR_Discriminant (Id : E) return E;
function Current_Use_Clause (Id : E) return E;
function Current_Value (Id : E) return N;
function Debug_Info_Off (Id : E) return B;
function Debug_Renaming_Link (Id : E) return E;
function Default_Aspect_Component_Value (Id : E) return N;
function Default_Aspect_Value (Id : E) return N;
function Default_Expr_Function (Id : E) return E;
function Default_Expressions_Processed (Id : E) return B;
function Default_Value (Id : E) return N;
function Delay_Cleanups (Id : E) return B;
function Delay_Subprogram_Descriptors (Id : E) return B;
function Delta_Value (Id : E) return R;
function Dependent_Instances (Id : E) return L;
function Depends_On_Private (Id : E) return B;
function Derived_Type_Link (Id : E) return E;
function Digits_Value (Id : E) return U;
function Direct_Primitive_Operations (Id : E) return L;
function Directly_Designated_Type (Id : E) return E;
function Disable_Controlled (Id : E) return B;
function Discard_Names (Id : E) return B;
function Discriminal (Id : E) return E;
function Discriminal_Link (Id : E) return E;
function Discriminant_Checking_Func (Id : E) return E;
function Discriminant_Constraint (Id : E) return L;
function Discriminant_Default_Value (Id : E) return N;
function Discriminant_Number (Id : E) return U;
function Dispatch_Table_Wrappers (Id : E) return L;
function DT_Entry_Count (Id : E) return U;
function DT_Offset_To_Top_Func (Id : E) return E;
function DT_Position (Id : E) return U;
function DTC_Entity (Id : E) return E;
function Elaborate_Body_Desirable (Id : E) return B;
function Elaboration_Entity (Id : E) return E;
function Elaboration_Entity_Required (Id : E) return B;
function Encapsulating_State (Id : E) return E;
function Enclosing_Scope (Id : E) return E;
function Entry_Accepted (Id : E) return B;
function Entry_Bodies_Array (Id : E) return E;
function Entry_Cancel_Parameter (Id : E) return E;
function Entry_Component (Id : E) return E;
function Entry_Formal (Id : E) return E;
function Entry_Index_Constant (Id : E) return E;
function Entry_Index_Type (Id : E) return E;
function Entry_Max_Queue_Lengths_Array (Id : E) return E;
function Entry_Parameters_Type (Id : E) return E;
function Enum_Pos_To_Rep (Id : E) return E;
function Enumeration_Pos (Id : E) return U;
function Enumeration_Rep (Id : E) return U;
function Enumeration_Rep_Expr (Id : E) return N;
function Equivalent_Type (Id : E) return E;
function Esize (Id : E) return U;
function Extra_Accessibility (Id : E) return E;
function Extra_Accessibility_Of_Result (Id : E) return E;
function Extra_Constrained (Id : E) return E;
function Extra_Formal (Id : E) return E;
function Extra_Formals (Id : E) return E;
function Finalization_Master (Id : E) return E;
function Finalize_Storage_Only (Id : E) return B;
function Finalizer (Id : E) return E;
function First_Entity (Id : E) return E;
function First_Exit_Statement (Id : E) return N;
function First_Index (Id : E) return N;
function First_Literal (Id : E) return E;
function First_Private_Entity (Id : E) return E;
function First_Rep_Item (Id : E) return N;
function Float_Rep (Id : E) return F;
function Freeze_Node (Id : E) return N;
function From_Limited_With (Id : E) return B;
function Full_View (Id : E) return E;
function Generic_Homonym (Id : E) return E;
function Generic_Renamings (Id : E) return L;
function Handler_Records (Id : E) return S;
function Has_Aliased_Components (Id : E) return B;
function Has_Alignment_Clause (Id : E) return B;
function Has_All_Calls_Remote (Id : E) return B;
function Has_Atomic_Components (Id : E) return B;
function Has_Biased_Representation (Id : E) return B;
function Has_Completion (Id : E) return B;
function Has_Completion_In_Body (Id : E) return B;
function Has_Complex_Representation (Id : E) return B;
function Has_Component_Size_Clause (Id : E) return B;
function Has_Constrained_Partial_View (Id : E) return B;
function Has_Contiguous_Rep (Id : E) return B;
function Has_Controlled_Component (Id : E) return B;
function Has_Controlling_Result (Id : E) return B;
function Has_Convention_Pragma (Id : E) return B;
function Has_Default_Aspect (Id : E) return B;
function Has_Delayed_Aspects (Id : E) return B;
function Has_Delayed_Freeze (Id : E) return B;
function Has_Delayed_Rep_Aspects (Id : E) return B;
function Has_Discriminants (Id : E) return B;
function Has_Dispatch_Table (Id : E) return B;
function Has_Dynamic_Predicate_Aspect (Id : E) return B;
function Has_Enumeration_Rep_Clause (Id : E) return B;
function Has_Exit (Id : E) return B;
function Has_Expanded_Contract (Id : E) return B;
function Has_Forward_Instantiation (Id : E) return B;
function Has_Fully_Qualified_Name (Id : E) return B;
function Has_Gigi_Rep_Item (Id : E) return B;
function Has_Homonym (Id : E) return B;
function Has_Implicit_Dereference (Id : E) return B;
function Has_Independent_Components (Id : E) return B;
function Has_Inheritable_Invariants (Id : E) return B;
function Has_Inherited_DIC (Id : E) return B;
function Has_Inherited_Invariants (Id : E) return B;
function Has_Initial_Value (Id : E) return B;
function Has_Loop_Entry_Attributes (Id : E) return B;
function Has_Machine_Radix_Clause (Id : E) return B;
function Has_Master_Entity (Id : E) return B;
function Has_Missing_Return (Id : E) return B;
function Has_Nested_Block_With_Handler (Id : E) return B;
function Has_Nested_Subprogram (Id : E) return B;
function Has_Non_Standard_Rep (Id : E) return B;
function Has_Object_Size_Clause (Id : E) return B;
function Has_Out_Or_In_Out_Parameter (Id : E) return B;
function Has_Own_DIC (Id : E) return B;
function Has_Own_Invariants (Id : E) return B;
function Has_Partial_Visible_Refinement (Id : E) return B;
function Has_Per_Object_Constraint (Id : E) return B;
function Has_Pragma_Controlled (Id : E) return B;
function Has_Pragma_Elaborate_Body (Id : E) return B;
function Has_Pragma_Inline (Id : E) return B;
function Has_Pragma_Inline_Always (Id : E) return B;
function Has_Pragma_No_Inline (Id : E) return B;
function Has_Pragma_Ordered (Id : E) return B;
function Has_Pragma_Pack (Id : E) return B;
function Has_Pragma_Preelab_Init (Id : E) return B;
function Has_Pragma_Pure (Id : E) return B;
function Has_Pragma_Pure_Function (Id : E) return B;
function Has_Pragma_Thread_Local_Storage (Id : E) return B;
function Has_Pragma_Unmodified (Id : E) return B;
function Has_Pragma_Unreferenced (Id : E) return B;
function Has_Pragma_Unreferenced_Objects (Id : E) return B;
function Has_Pragma_Unused (Id : E) return B;
function Has_Predicates (Id : E) return B;
function Has_Primitive_Operations (Id : E) return B;
function Has_Private_Ancestor (Id : E) return B;
function Has_Private_Declaration (Id : E) return B;
function Has_Private_Extension (Id : E) return B;
function Has_Protected (Id : E) return B;
function Has_Qualified_Name (Id : E) return B;
function Has_RACW (Id : E) return B;
function Has_Record_Rep_Clause (Id : E) return B;
function Has_Recursive_Call (Id : E) return B;
function Has_Shift_Operator (Id : E) return B;
function Has_Size_Clause (Id : E) return B;
function Has_Small_Clause (Id : E) return B;
function Has_Specified_Layout (Id : E) return B;
function Has_Specified_Stream_Input (Id : E) return B;
function Has_Specified_Stream_Output (Id : E) return B;
function Has_Specified_Stream_Read (Id : E) return B;
function Has_Specified_Stream_Write (Id : E) return B;
function Has_Static_Discriminants (Id : E) return B;
function Has_Static_Predicate (Id : E) return B;
function Has_Static_Predicate_Aspect (Id : E) return B;
function Has_Storage_Size_Clause (Id : E) return B;
function Has_Stream_Size_Clause (Id : E) return B;
function Has_Task (Id : E) return B;
function Has_Timing_Event (Id : E) return B;
function Has_Thunks (Id : E) return B;
function Has_Unchecked_Union (Id : E) return B;
function Has_Unknown_Discriminants (Id : E) return B;
function Has_Visible_Refinement (Id : E) return B;
function Has_Volatile_Components (Id : E) return B;
function Has_Xref_Entry (Id : E) return B;
function Has_Yield_Aspect (Id : E) return B;
function Hiding_Loop_Variable (Id : E) return E;
function Hidden_In_Formal_Instance (Id : E) return L;
function Homonym (Id : E) return E;
function Ignore_SPARK_Mode_Pragmas (Id : E) return B;
function Import_Pragma (Id : E) return E;
function Incomplete_Actuals (Id : E) return L;
function In_Package_Body (Id : E) return B;
function In_Private_Part (Id : E) return B;
function In_Use (Id : E) return B;
function Initialization_Statements (Id : E) return N;
function Inner_Instances (Id : E) return L;
function Interface_Alias (Id : E) return E;
function Interface_Name (Id : E) return N;
function Interfaces (Id : E) return L;
function Is_Abstract_Subprogram (Id : E) return B;
function Is_Abstract_Type (Id : E) return B;
function Is_Access_Constant (Id : E) return B;
function Is_Activation_Record (Id : E) return B;
function Is_Actual_Subtype (Id : E) return B;
function Is_Ada_2005_Only (Id : E) return B;
function Is_Ada_2012_Only (Id : E) return B;
function Is_Aliased (Id : E) return B;
function Is_Asynchronous (Id : E) return B;
function Is_Atomic (Id : E) return B;
function Is_Bit_Packed_Array (Id : E) return B;
function Is_Called (Id : E) return B;
function Is_Character_Type (Id : E) return B;
function Is_Checked_Ghost_Entity (Id : E) return B;
function Is_Child_Unit (Id : E) return B;
function Is_Class_Wide_Clone (Id : E) return B;
function Is_Class_Wide_Equivalent_Type (Id : E) return B;
function Is_Compilation_Unit (Id : E) return B;
function Is_Completely_Hidden (Id : E) return B;
function Is_Constr_Subt_For_U_Nominal (Id : E) return B;
function Is_Constr_Subt_For_UN_Aliased (Id : E) return B;
function Is_Constrained (Id : E) return B;
function Is_Constructor (Id : E) return B;
function Is_Controlled_Active (Id : E) return B;
function Is_Controlling_Formal (Id : E) return B;
function Is_CPP_Class (Id : E) return B;
function Is_CUDA_Kernel (Id : E) return B;
function Is_Descendant_Of_Address (Id : E) return B;
function Is_DIC_Procedure (Id : E) return B;
function Is_Discrim_SO_Function (Id : E) return B;
function Is_Discriminant_Check_Function (Id : E) return B;
function Is_Dispatch_Table_Entity (Id : E) return B;
function Is_Dispatching_Operation (Id : E) return B;
function Is_Elaboration_Checks_OK_Id (Id : E) return B;
function Is_Elaboration_Warnings_OK_Id (Id : E) return B;
function Is_Eliminated (Id : E) return B;
function Is_Entry_Formal (Id : E) return B;
function Is_Entry_Wrapper (Id : E) return B;
function Is_Exception_Handler (Id : E) return B;
function Is_Exported (Id : E) return B;
function Is_Finalized_Transient (Id : E) return B;
function Is_First_Subtype (Id : E) return B;
function Is_Frozen (Id : E) return B;
function Is_Generic_Instance (Id : E) return B;
function Is_Hidden (Id : E) return B;
function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B;
function Is_Hidden_Open_Scope (Id : E) return B;
function Is_Ignored_Ghost_Entity (Id : E) return B;
function Is_Ignored_Transient (Id : E) return B;
function Is_Immediately_Visible (Id : E) return B;
function Is_Implementation_Defined (Id : E) return B;
function Is_Imported (Id : E) return B;
function Is_Independent (Id : E) return B;
function Is_Initial_Condition_Procedure (Id : E) return B;
function Is_Inlined (Id : E) return B;
function Is_Inlined_Always (Id : E) return B;
function Is_Instantiated (Id : E) return B;
function Is_Interface (Id : E) return B;
function Is_Internal (Id : E) return B;
function Is_Interrupt_Handler (Id : E) return B;
function Is_Intrinsic_Subprogram (Id : E) return B;
function Is_Invariant_Procedure (Id : E) return B;
function Is_Itype (Id : E) return B;
function Is_Known_Non_Null (Id : E) return B;
function Is_Known_Null (Id : E) return B;
function Is_Known_Valid (Id : E) return B;
function Is_Limited_Composite (Id : E) return B;
function Is_Limited_Interface (Id : E) return B;
function Is_Local_Anonymous_Access (Id : E) return B;
function Is_Loop_Parameter (Id : E) return B;
function Is_Machine_Code_Subprogram (Id : E) return B;
function Is_Non_Static_Subtype (Id : E) return B;
function Is_Null_Init_Proc (Id : E) return B;
function Is_Obsolescent (Id : E) return B;
function Is_Only_Out_Parameter (Id : E) return B;
function Is_Package_Body_Entity (Id : E) return B;
function Is_Packed (Id : E) return B;
function Is_Packed_Array_Impl_Type (Id : E) return B;
function Is_Potentially_Use_Visible (Id : E) return B;
function Is_Param_Block_Component_Type (Id : E) return B;
function Is_Partial_Invariant_Procedure (Id : E) return B;
function Is_Predicate_Function (Id : E) return B;
function Is_Predicate_Function_M (Id : E) return B;
function Is_Preelaborated (Id : E) return B;
function Is_Primitive (Id : E) return B;
function Is_Primitive_Wrapper (Id : E) return B;
function Is_Private_Composite (Id : E) return B;
function Is_Private_Descendant (Id : E) return B;
function Is_Private_Primitive (Id : E) return B;
function Is_Public (Id : E) return B;
function Is_Pure (Id : E) return B;
function Is_Pure_Unit_Access_Type (Id : E) return B;
function Is_RACW_Stub_Type (Id : E) return B;
function Is_Raised (Id : E) return B;
function Is_Remote_Call_Interface (Id : E) return B;
function Is_Remote_Types (Id : E) return B;
function Is_Renaming_Of_Object (Id : E) return B;
function Is_Return_Object (Id : E) return B;
function Is_Safe_To_Reevaluate (Id : E) return B;
function Is_Shared_Passive (Id : E) return B;
function Is_Static_Type (Id : E) return B;
function Is_Statically_Allocated (Id : E) return B;
function Is_Tag (Id : E) return B;
function Is_Tagged_Type (Id : E) return B;
function Is_Thunk (Id : E) return B;
function Is_Trivial_Subprogram (Id : E) return B;
function Is_True_Constant (Id : E) return B;
function Is_Unchecked_Union (Id : E) return B;
function Is_Underlying_Full_View (Id : E) return B;
function Is_Underlying_Record_View (Id : E) return B;
function Is_Unimplemented (Id : E) return B;
function Is_Unsigned_Type (Id : E) return B;
function Is_Uplevel_Referenced_Entity (Id : E) return B;
function Is_Valued_Procedure (Id : E) return B;
function Is_Visible_Formal (Id : E) return B;
function Is_Visible_Lib_Unit (Id : E) return B;
function Is_Volatile (Id : E) return B;
function Is_Volatile_Full_Access (Id : E) return B;
function Itype_Printed (Id : E) return B;
function Kill_Elaboration_Checks (Id : E) return B;
function Kill_Range_Checks (Id : E) return B;
function Known_To_Have_Preelab_Init (Id : E) return B;
function Last_Aggregate_Assignment (Id : E) return N;
function Last_Assignment (Id : E) return N;
function Last_Entity (Id : E) return E;
function Limited_View (Id : E) return E;
function Linker_Section_Pragma (Id : E) return N;
function Lit_Indexes (Id : E) return E;
function Lit_Strings (Id : E) return E;
function Low_Bound_Tested (Id : E) return B;
function Machine_Radix_10 (Id : E) return B;
function Master_Id (Id : E) return E;
function Materialize_Entity (Id : E) return B;
function May_Inherit_Delayed_Rep_Aspects (Id : E) return B;
function Mechanism (Id : E) return M;
function Minimum_Accessibility (Id : E) return E;
function Modulus (Id : E) return U;
function Must_Be_On_Byte_Boundary (Id : E) return B;
function Must_Have_Preelab_Init (Id : E) return B;
function Needs_Activation_Record (Id : E) return B;
function Needs_Debug_Info (Id : E) return B;
function Needs_No_Actuals (Id : E) return B;
function Never_Set_In_Source (Id : E) return B;
function Next_Inlined_Subprogram (Id : E) return E;
function No_Dynamic_Predicate_On_Actual (Id : E) return B;
function No_Pool_Assigned (Id : E) return B;
function No_Predicate_On_Actual (Id : E) return B;
function No_Reordering (Id : E) return B;
function No_Return (Id : E) return B;
function No_Strict_Aliasing (Id : E) return B;
function No_Tagged_Streams_Pragma (Id : E) return N;
function Non_Binary_Modulus (Id : E) return B;
function Non_Limited_View (Id : E) return E;
function Nonzero_Is_True (Id : E) return B;
function Normalized_First_Bit (Id : E) return U;
function Normalized_Position (Id : E) return U;
function Normalized_Position_Max (Id : E) return U;
function OK_To_Rename (Id : E) return B;
function Optimize_Alignment_Space (Id : E) return B;
function Optimize_Alignment_Time (Id : E) return B;
function Original_Access_Type (Id : E) return E;
function Original_Array_Type (Id : E) return E;
function Original_Protected_Subprogram (Id : E) return N;
function Original_Record_Component (Id : E) return E;
function Overlays_Constant (Id : E) return B;
function Overridden_Operation (Id : E) return E;
function Package_Instantiation (Id : E) return N;
function Packed_Array_Impl_Type (Id : E) return E;
function Parent_Subtype (Id : E) return E;
function Part_Of_Constituents (Id : E) return L;
function Part_Of_References (Id : E) return L;
function Partial_View_Has_Unknown_Discr (Id : E) return B;
function Pending_Access_Types (Id : E) return L;
function Postconditions_Proc (Id : E) return E;
function Predicated_Parent (Id : E) return E;
function Predicates_Ignored (Id : E) return B;
function Prev_Entity (Id : E) return E;
function Prival (Id : E) return E;
function Prival_Link (Id : E) return E;
function Private_Dependents (Id : E) return L;
function Protected_Body_Subprogram (Id : E) return E;
function Protected_Formal (Id : E) return E;
function Protected_Subprogram (Id : E) return N;
function Protection_Object (Id : E) return E;
function Reachable (Id : E) return B;
function Receiving_Entry (Id : E) return E;
function Referenced (Id : E) return B;
function Referenced_As_LHS (Id : E) return B;
function Referenced_As_Out_Parameter (Id : E) return B;
function Refinement_Constituents (Id : E) return L;
function Register_Exception_Call (Id : E) return N;
function Related_Array_Object (Id : E) return E;
function Related_Expression (Id : E) return N;
function Related_Instance (Id : E) return E;
function Related_Type (Id : E) return E;
function Relative_Deadline_Variable (Id : E) return E;
function Renamed_Entity (Id : E) return N;
function Renamed_In_Spec (Id : E) return B;
function Renamed_Object (Id : E) return N;
function Renaming_Map (Id : E) return U;
function Requires_Overriding (Id : E) return B;
function Return_Applies_To (Id : E) return N;
function Return_Present (Id : E) return B;
function Returns_By_Ref (Id : E) return B;
function Reverse_Bit_Order (Id : E) return B;
function Reverse_Storage_Order (Id : E) return B;
function Rewritten_For_C (Id : E) return B;
function RM_Size (Id : E) return U;
function Scalar_Range (Id : E) return N;
function Scale_Value (Id : E) return U;
function Scope_Depth_Value (Id : E) return U;
function Sec_Stack_Needed_For_Return (Id : E) return B;
function Shared_Var_Procs_Instance (Id : E) return E;
function Size_Check_Code (Id : E) return N;
function Size_Depends_On_Discriminant (Id : E) return B;
function Size_Known_At_Compile_Time (Id : E) return B;
function Small_Value (Id : E) return R;
function SPARK_Aux_Pragma (Id : E) return N;
function SPARK_Aux_Pragma_Inherited (Id : E) return B;
function SPARK_Pragma (Id : E) return N;
function SPARK_Pragma_Inherited (Id : E) return B;
function Spec_Entity (Id : E) return E;
function SSO_Set_High_By_Default (Id : E) return B;
function SSO_Set_Low_By_Default (Id : E) return B;
function Static_Discrete_Predicate (Id : E) return S;
function Static_Elaboration_Desired (Id : E) return B;
function Static_Initialization (Id : E) return N;
function Static_Real_Or_String_Predicate (Id : E) return N;
function Status_Flag_Or_Transient_Decl (Id : E) return E;
function Storage_Size_Variable (Id : E) return E;
function Stored_Constraint (Id : E) return L;
function Stores_Attribute_Old_Prefix (Id : E) return B;
function Strict_Alignment (Id : E) return B;
function String_Literal_Length (Id : E) return U;
function String_Literal_Low_Bound (Id : E) return N;
function Subprograms_For_Type (Id : E) return L;
function Subps_Index (Id : E) return U;
function Suppress_Elaboration_Warnings (Id : E) return B;
function Suppress_Initialization (Id : E) return B;
function Suppress_Style_Checks (Id : E) return B;
function Suppress_Value_Tracking_On_Call (Id : E) return B;
function Task_Body_Procedure (Id : E) return N;
function Thunk_Entity (Id : E) return E;
function Treat_As_Volatile (Id : E) return B;
function Underlying_Full_View (Id : E) return E;
function Underlying_Record_View (Id : E) return E;
function Universal_Aliasing (Id : E) return B;
function Unset_Reference (Id : E) return N;
function Used_As_Generic_Actual (Id : E) return B;
function Uses_Lock_Free (Id : E) return B;
function Uses_Sec_Stack (Id : E) return B;
function Validated_Object (Id : E) return N;
function Warnings_Off (Id : E) return B;
function Warnings_Off_Used (Id : E) return B;
function Warnings_Off_Used_Unmodified (Id : E) return B;
function Warnings_Off_Used_Unreferenced (Id : E) return B;
function Was_Hidden (Id : E) return B;
function Wrapped_Entity (Id : E) return E;
-------------------------------
-- Classification Attributes --
-------------------------------
-- These functions provide a convenient functional notation for testing
-- whether an Ekind value belongs to a specified kind, for example the
-- function Is_Elementary_Type tests if its argument is in Elementary_Kind.
-- In some cases, the test is of an entity attribute (e.g. in the case of
-- Is_Generic_Type where the Ekind does not provide the needed
-- information).
function Is_Access_Object_Type (Id : E) return B;
function Is_Access_Type (Id : E) return B;
function Is_Access_Protected_Subprogram_Type (Id : E) return B;
function Is_Access_Subprogram_Type (Id : E) return B;
function Is_Aggregate_Type (Id : E) return B;
function Is_Anonymous_Access_Type (Id : E) return B;
function Is_Array_Type (Id : E) return B;
function Is_Assignable (Id : E) return B;
function Is_Class_Wide_Type (Id : E) return B;
function Is_Composite_Type (Id : E) return B;
function Is_Concurrent_Body (Id : E) return B;
function Is_Concurrent_Record_Type (Id : E) return B;
function Is_Concurrent_Type (Id : E) return B;
function Is_Decimal_Fixed_Point_Type (Id : E) return B;
function Is_Digits_Type (Id : E) return B;
function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B;
function Is_Discrete_Type (Id : E) return B;
function Is_Elementary_Type (Id : E) return B;
function Is_Entry (Id : E) return B;
function Is_Enumeration_Type (Id : E) return B;
function Is_Fixed_Point_Type (Id : E) return B;
function Is_Floating_Point_Type (Id : E) return B;
function Is_Formal (Id : E) return B;
function Is_Formal_Object (Id : E) return B;
function Is_Formal_Subprogram (Id : E) return B;
function Is_Generic_Actual_Subprogram (Id : E) return B;
function Is_Generic_Actual_Type (Id : E) return B;
function Is_Generic_Subprogram (Id : E) return B;
function Is_Generic_Type (Id : E) return B;
function Is_Generic_Unit (Id : E) return B;
function Is_Ghost_Entity (Id : E) return B;
function Is_Incomplete_Or_Private_Type (Id : E) return B;
function Is_Incomplete_Type (Id : E) return B;
function Is_Integer_Type (Id : E) return B;
function Is_Limited_Record (Id : E) return B;
function Is_Modular_Integer_Type (Id : E) return B;
function Is_Named_Access_Type (Id : E) return B;
function Is_Named_Number (Id : E) return B;
function Is_Numeric_Type (Id : E) return B;
function Is_Object (Id : E) return B;
function Is_Ordinary_Fixed_Point_Type (Id : E) return B;
function Is_Overloadable (Id : E) return B;
function Is_Private_Type (Id : E) return B;
function Is_Protected_Type (Id : E) return B;
function Is_Real_Type (Id : E) return B;
function Is_Record_Type (Id : E) return B;
function Is_Scalar_Type (Id : E) return B;
function Is_Signed_Integer_Type (Id : E) return B;
function Is_Subprogram (Id : E) return B;
function Is_Subprogram_Or_Entry (Id : E) return B;
function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B;
function Is_Task_Type (Id : E) return B;
function Is_Type (Id : E) return B;
-------------------------------------
-- Synthesized Attribute Functions --
-------------------------------------
-- The functions in this section synthesize attributes from the tree,
-- so they do not correspond to defined fields in the entity itself.
function Address_Clause (Id : E) return N;
function Aft_Value (Id : E) return U;
function Alignment_Clause (Id : E) return N;
function Base_Type (Id : E) return E;
function Component_Alignment (Id : E) return C;
function Declaration_Node (Id : E) return N;
function Designated_Type (Id : E) return E;
function First_Component (Id : E) return E;
function First_Component_Or_Discriminant (Id : E) return E;
function First_Formal (Id : E) return E;
function First_Formal_With_Extras (Id : E) return E;
function Has_Attach_Handler (Id : E) return B;
function Has_DIC (Id : E) return B;
function Has_Entries (Id : E) return B;
function Has_Foreign_Convention (Id : E) return B;
function Has_Interrupt_Handler (Id : E) return B;
function Has_Invariants (Id : E) return B;
function Has_Non_Limited_View (Id : E) return B;
function Has_Non_Null_Abstract_State (Id : E) return B;
function Has_Non_Null_Visible_Refinement (Id : E) return B;
function Has_Null_Abstract_State (Id : E) return B;
function Has_Null_Visible_Refinement (Id : E) return B;
function Implementation_Base_Type (Id : E) return E;
function Is_Atomic_Or_VFA (Id : E) return B;
function Is_Base_Type (Id : E) return B;
function Is_Boolean_Type (Id : E) return B;
function Is_Constant_Object (Id : E) return B;
function Is_Controlled (Id : E) return B;
function Is_Discriminal (Id : E) return B;
function Is_Dynamic_Scope (Id : E) return B;
function Is_Elaboration_Target (Id : E) return B;
function Is_External_State (Id : E) return B;
function Is_Finalizer (Id : E) return B;
function Is_Null_State (Id : E) return B;
function Is_Package_Or_Generic_Package (Id : E) return B;
function Is_Packed_Array (Id : E) return B;
function Is_Prival (Id : E) return B;
function Is_Protected_Component (Id : E) return B;
function Is_Protected_Interface (Id : E) return B;
function Is_Protected_Record_Type (Id : E) return B;
function Is_Relaxed_Initialization_State (Id : E) return B;
function Is_Standard_Character_Type (Id : E) return B;
function Is_Standard_String_Type (Id : E) return B;
function Is_String_Type (Id : E) return B;
function Is_Synchronized_Interface (Id : E) return B;
function Is_Synchronized_State (Id : E) return B;
function Is_Task_Interface (Id : E) return B;
function Is_Task_Record_Type (Id : E) return B;
function Is_Wrapper_Package (Id : E) return B;
function Last_Formal (Id : E) return E;
function Machine_Emax_Value (Id : E) return U;
function Machine_Emin_Value (Id : E) return U;
function Machine_Mantissa_Value (Id : E) return U;
function Machine_Radix_Value (Id : E) return U;
function Model_Emin_Value (Id : E) return U;
function Model_Epsilon_Value (Id : E) return R;
function Model_Mantissa_Value (Id : E) return U;
function Model_Small_Value (Id : E) return R;
function Next_Component (Id : E) return E;
function Next_Component_Or_Discriminant (Id : E) return E;
function Next_Discriminant (Id : E) return E;
function Next_Formal (Id : E) return E;
function Next_Formal_With_Extras (Id : E) return E;
function Next_Index (Id : N) return N;
function Next_Literal (Id : E) return E;
function Next_Stored_Discriminant (Id : E) return E;
function Number_Dimensions (Id : E) return Pos;
function Number_Entries (Id : E) return Nat;
function Number_Formals (Id : E) return Pos;
function Object_Size_Clause (Id : E) return N;
function Parameter_Mode (Id : E) return Formal_Kind;
function Partial_Refinement_Constituents (Id : E) return L;
function Primitive_Operations (Id : E) return L;
function Root_Type (Id : E) return E;
function Safe_Emax_Value (Id : E) return U;
function Safe_First_Value (Id : E) return R;
function Safe_Last_Value (Id : E) return R;
function Scope_Depth (Id : E) return U;
function Scope_Depth_Set (Id : E) return B;
function Size_Clause (Id : E) return N;
function Stream_Size_Clause (Id : E) return N;
function Type_High_Bound (Id : E) return N;
function Type_Low_Bound (Id : E) return N;
function Underlying_Type (Id : E) return E;
----------------------------------------------
-- Type Representation Attribute Predicates --
----------------------------------------------
-- These predicates test the setting of the indicated attribute. If the
-- value has been set, then Known is True, and Unknown is False. If no
-- value is set, then Known is False and Unknown is True. The Known_Static
-- predicate is true only if the value is set (Known) and is set to a
-- compile time known value. Note that in the case of Alignment and
-- Normalized_First_Bit, dynamic values are not possible, so we do not
-- need a separate Known_Static calls in these cases. The not set (unknown)
-- values are as follows:
-- Alignment Uint_0 or No_Uint
-- Component_Size Uint_0 or No_Uint
-- Component_Bit_Offset No_Uint
-- Digits_Value Uint_0 or No_Uint
-- Esize Uint_0 or No_Uint
-- Normalized_First_Bit No_Uint
-- Normalized_Position No_Uint
-- Normalized_Position_Max No_Uint
-- RM_Size Uint_0 or No_Uint
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
-- is legitimate. We deal with this by a considering that the value is
-- always known static for discrete types (and no other types can have
-- an RM_Size value of zero).
-- In two cases, Known_Static_Esize and Known_Static_RM_Size, there is one
-- more consideration, which is that we always return False for generic
-- types. Within a template, the size can look known, because of the fake
-- size values we put in template types, but they are not really known and
-- anyone testing if they are known within the template should get False as
-- a result to prevent incorrect assumptions.
function Known_Alignment (E : Entity_Id) return B;
function Known_Component_Bit_Offset (E : Entity_Id) return B;
function Known_Component_Size (E : Entity_Id) return B;
function Known_Esize (E : Entity_Id) return B;
function Known_Normalized_First_Bit (E : Entity_Id) return B;
function Known_Normalized_Position (E : Entity_Id) return B;
function Known_Normalized_Position_Max (E : Entity_Id) return B;
function Known_RM_Size (E : Entity_Id) return B;
function Known_Static_Component_Bit_Offset (E : Entity_Id) return B;
function Known_Static_Component_Size (E : Entity_Id) return B;
function Known_Static_Esize (E : Entity_Id) return B;
function Known_Static_Normalized_First_Bit (E : Entity_Id) return B;
function Known_Static_Normalized_Position (E : Entity_Id) return B;
function Known_Static_Normalized_Position_Max (E : Entity_Id) return B;
function Known_Static_RM_Size (E : Entity_Id) return B;
function Unknown_Alignment (E : Entity_Id) return B;
function Unknown_Component_Bit_Offset (E : Entity_Id) return B;
function Unknown_Component_Size (E : Entity_Id) return B;
function Unknown_Esize (E : Entity_Id) return B;
function Unknown_Normalized_First_Bit (E : Entity_Id) return B;
function Unknown_Normalized_Position (E : Entity_Id) return B;
function Unknown_Normalized_Position_Max (E : Entity_Id) return B;
function Unknown_RM_Size (E : Entity_Id) return B;
------------------------------
-- Attribute Set Procedures --
------------------------------
-- WARNING: There is a matching C declaration of a few subprograms in fe.h
procedure Set_Abstract_States (Id : E; V : L);
procedure Set_Accept_Address (Id : E; V : L);
procedure Set_Access_Disp_Table (Id : E; V : L);
procedure Set_Access_Disp_Table_Elab_Flag (Id : E; V : E);
procedure Set_Access_Subprogram_Wrapper (Id : E; V : E);
procedure Set_Activation_Record_Component (Id : E; V : E);
procedure Set_Actual_Subtype (Id : E; V : E);
procedure Set_Address_Taken (Id : E; V : B := True);
procedure Set_Alias (Id : E; V : E);
procedure Set_Alignment (Id : E; V : U);
procedure Set_Anonymous_Designated_Type (Id : E; V : E);
procedure Set_Anonymous_Masters (Id : E; V : L);
procedure Set_Anonymous_Object (Id : E; V : E);
procedure Set_Associated_Entity (Id : E; V : E);
procedure Set_Associated_Formal_Package (Id : E; V : E);
procedure Set_Associated_Node_For_Itype (Id : E; V : N);
procedure Set_Associated_Storage_Pool (Id : E; V : E);
procedure Set_Barrier_Function (Id : E; V : N);
procedure Set_BIP_Initialization_Call (Id : E; V : N);
procedure Set_Block_Node (Id : E; V : N);
procedure Set_Body_Entity (Id : E; V : E);
procedure Set_Body_Needed_For_Inlining (Id : E; V : B := True);
procedure Set_Body_Needed_For_SAL (Id : E; V : B := True);
procedure Set_Body_References (Id : E; V : L);
procedure Set_C_Pass_By_Copy (Id : E; V : B := True);
procedure Set_Can_Never_Be_Null (Id : E; V : B := True);
procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True);
procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True);
procedure Set_Class_Wide_Clone (Id : E; V : E);
procedure Set_Class_Wide_Type (Id : E; V : E);
procedure Set_Cloned_Subtype (Id : E; V : E);
procedure Set_Component_Alignment (Id : E; V : C);
procedure Set_Component_Bit_Offset (Id : E; V : U);
procedure Set_Component_Clause (Id : E; V : N);
procedure Set_Component_Size (Id : E; V : U);
procedure Set_Component_Type (Id : E; V : E);
procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True);
procedure Set_Contract (Id : E; V : N);
procedure Set_Contract_Wrapper (Id : E; V : E);
procedure Set_Corresponding_Concurrent_Type (Id : E; V : E);
procedure Set_Corresponding_Discriminant (Id : E; V : E);
procedure Set_Corresponding_Equality (Id : E; V : E);
procedure Set_Corresponding_Function (Id : E; V : E);
procedure Set_Corresponding_Procedure (Id : E; V : E);
procedure Set_Corresponding_Protected_Entry (Id : E; V : E);
procedure Set_Corresponding_Record_Component (Id : E; V : E);
procedure Set_Corresponding_Record_Type (Id : E; V : E);
procedure Set_Corresponding_Remote_Type (Id : E; V : E);
procedure Set_CR_Discriminant (Id : E; V : E);
procedure Set_Current_Use_Clause (Id : E; V : E);
procedure Set_Current_Value (Id : E; V : N);
procedure Set_Debug_Info_Off (Id : E; V : B := True);
procedure Set_Debug_Renaming_Link (Id : E; V : E);
procedure Set_Default_Aspect_Component_Value (Id : E; V : N);
procedure Set_Default_Aspect_Value (Id : E; V : N);
procedure Set_Default_Expr_Function (Id : E; V : E);
procedure Set_Default_Expressions_Processed (Id : E; V : B := True);
procedure Set_Default_Value (Id : E; V : N);
procedure Set_Delay_Cleanups (Id : E; V : B := True);
procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True);
procedure Set_Delta_Value (Id : E; V : R);
procedure Set_Dependent_Instances (Id : E; V : L);
procedure Set_Depends_On_Private (Id : E; V : B := True);
procedure Set_Derived_Type_Link (Id : E; V : E);
procedure Set_Digits_Value (Id : E; V : U);
procedure Set_Predicated_Parent (Id : E; V : E);
procedure Set_Predicates_Ignored (Id : E; V : B);
procedure Set_Direct_Primitive_Operations (Id : E; V : L);
procedure Set_Directly_Designated_Type (Id : E; V : E);
procedure Set_Disable_Controlled (Id : E; V : B := True);
procedure Set_Discard_Names (Id : E; V : B := True);
procedure Set_Discriminal (Id : E; V : E);
procedure Set_Discriminal_Link (Id : E; V : E);
procedure Set_Discriminant_Checking_Func (Id : E; V : E);
procedure Set_Discriminant_Constraint (Id : E; V : L);
procedure Set_Discriminant_Default_Value (Id : E; V : N);
procedure Set_Discriminant_Number (Id : E; V : U);
procedure Set_Dispatch_Table_Wrappers (Id : E; V : L);
procedure Set_DT_Entry_Count (Id : E; V : U);
procedure Set_DT_Offset_To_Top_Func (Id : E; V : E);
procedure Set_DT_Position (Id : E; V : U);
procedure Set_DTC_Entity (Id : E; V : E);
procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True);
procedure Set_Elaboration_Entity (Id : E; V : E);
procedure Set_Elaboration_Entity_Required (Id : E; V : B := True);
procedure Set_Encapsulating_State (Id : E; V : E);
procedure Set_Enclosing_Scope (Id : E; V : E);
procedure Set_Entry_Accepted (Id : E; V : B := True);
procedure Set_Entry_Bodies_Array (Id : E; V : E);
procedure Set_Entry_Cancel_Parameter (Id : E; V : E);
procedure Set_Entry_Component (Id : E; V : E);
procedure Set_Entry_Formal (Id : E; V : E);
procedure Set_Entry_Index_Constant (Id : E; V : E);
procedure Set_Entry_Max_Queue_Lengths_Array (Id : E; V : E);
procedure Set_Entry_Parameters_Type (Id : E; V : E);
procedure Set_Enum_Pos_To_Rep (Id : E; V : E);
procedure Set_Enumeration_Pos (Id : E; V : U);
procedure Set_Enumeration_Rep (Id : E; V : U);
procedure Set_Enumeration_Rep_Expr (Id : E; V : N);
procedure Set_Equivalent_Type (Id : E; V : E);
procedure Set_Esize (Id : E; V : U);
procedure Set_Extra_Accessibility (Id : E; V : E);
procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E);
procedure Set_Extra_Constrained (Id : E; V : E);
procedure Set_Extra_Formal (Id : E; V : E);
procedure Set_Extra_Formals (Id : E; V : E);
procedure Set_Finalization_Master (Id : E; V : E);
procedure Set_Finalize_Storage_Only (Id : E; V : B := True);
procedure Set_Finalizer (Id : E; V : E);
procedure Set_First_Entity (Id : E; V : E);
procedure Set_First_Exit_Statement (Id : E; V : N);
procedure Set_First_Index (Id : E; V : N);
procedure Set_First_Literal (Id : E; V : E);
procedure Set_First_Private_Entity (Id : E; V : E);
procedure Set_First_Rep_Item (Id : E; V : N);
procedure Set_Float_Rep (Id : E; V : F);
procedure Set_Freeze_Node (Id : E; V : N);
procedure Set_From_Limited_With (Id : E; V : B := True);
procedure Set_Full_View (Id : E; V : E);
procedure Set_Generic_Homonym (Id : E; V : E);
procedure Set_Generic_Renamings (Id : E; V : L);
procedure Set_Handler_Records (Id : E; V : S);
procedure Set_Has_Aliased_Components (Id : E; V : B := True);
procedure Set_Has_Alignment_Clause (Id : E; V : B := True);
procedure Set_Has_All_Calls_Remote (Id : E; V : B := True);
procedure Set_Has_Atomic_Components (Id : E; V : B := True);
procedure Set_Has_Biased_Representation (Id : E; V : B := True);
procedure Set_Has_Completion (Id : E; V : B := True);
procedure Set_Has_Completion_In_Body (Id : E; V : B := True);
procedure Set_Has_Complex_Representation (Id : E; V : B := True);
procedure Set_Has_Component_Size_Clause (Id : E; V : B := True);
procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True);
procedure Set_Has_Contiguous_Rep (Id : E; V : B := True);
procedure Set_Has_Controlled_Component (Id : E; V : B := True);
procedure Set_Has_Controlling_Result (Id : E; V : B := True);
procedure Set_Has_Convention_Pragma (Id : E; V : B := True);
procedure Set_Has_Default_Aspect (Id : E; V : B := True);
procedure Set_Has_Delayed_Aspects (Id : E; V : B := True);
procedure Set_Has_Delayed_Freeze (Id : E; V : B := True);
procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True);
procedure Set_Has_Discriminants (Id : E; V : B := True);
procedure Set_Has_Dispatch_Table (Id : E; V : B := True);
procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True);
procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True);
procedure Set_Has_Exit (Id : E; V : B := True);
procedure Set_Has_Expanded_Contract (Id : E; V : B := True);
procedure Set_Has_Forward_Instantiation (Id : E; V : B := True);
procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True);
procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True);
procedure Set_Has_Homonym (Id : E; V : B := True);
procedure Set_Has_Implicit_Dereference (Id : E; V : B := True);
procedure Set_Has_Independent_Components (Id : E; V : B := True);
procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True);
procedure Set_Has_Inherited_DIC (Id : E; V : B := True);
procedure Set_Has_Inherited_Invariants (Id : E; V : B := True);
procedure Set_Has_Initial_Value (Id : E; V : B := True);
procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True);
procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True);
procedure Set_Has_Master_Entity (Id : E; V : B := True);
procedure Set_Has_Missing_Return (Id : E; V : B := True);
procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True);
procedure Set_Has_Nested_Subprogram (Id : E; V : B := True);
procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True);
procedure Set_Has_Object_Size_Clause (Id : E; V : B := True);
procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True);
procedure Set_Has_Own_DIC (Id : E; V : B := True);
procedure Set_Has_Own_Invariants (Id : E; V : B := True);
procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True);
procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True);
procedure Set_Has_Pragma_Controlled (Id : E; V : B := True);
procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True);
procedure Set_Has_Pragma_Inline (Id : E; V : B := True);
procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True);
procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True);
procedure Set_Has_Pragma_Ordered (Id : E; V : B := True);
procedure Set_Has_Pragma_Pack (Id : E; V : B := True);
procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True);
procedure Set_Has_Pragma_Pure (Id : E; V : B := True);
procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True);
procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True);
procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True);
procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True);
procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True);
procedure Set_Has_Pragma_Unused (Id : E; V : B := True);
procedure Set_Has_Predicates (Id : E; V : B := True);
procedure Set_Has_Primitive_Operations (Id : E; V : B := True);
procedure Set_Has_Private_Ancestor (Id : E; V : B := True);
procedure Set_Has_Private_Declaration (Id : E; V : B := True);
procedure Set_Has_Private_Extension (Id : E; V : B := True);
procedure Set_Has_Protected (Id : E; V : B := True);
procedure Set_Has_Qualified_Name (Id : E; V : B := True);
procedure Set_Has_RACW (Id : E; V : B := True);
procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True);
procedure Set_Has_Recursive_Call (Id : E; V : B := True);
procedure Set_Has_Shift_Operator (Id : E; V : B := True);
procedure Set_Has_Size_Clause (Id : E; V : B := True);
procedure Set_Has_Small_Clause (Id : E; V : B := True);
procedure Set_Has_Specified_Layout (Id : E; V : B := True);
procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True);
procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True);
procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True);
procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True);
procedure Set_Has_Static_Discriminants (Id : E; V : B := True);
procedure Set_Has_Static_Predicate (Id : E; V : B := True);
procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True);
procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True);
procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True);
procedure Set_Has_Task (Id : E; V : B := True);
procedure Set_Has_Timing_Event (Id : E; V : B := True);
procedure Set_Has_Thunks (Id : E; V : B := True);
procedure Set_Has_Unchecked_Union (Id : E; V : B := True);
procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True);
procedure Set_Has_Visible_Refinement (Id : E; V : B := True);
procedure Set_Has_Volatile_Components (Id : E; V : B := True);
procedure Set_Has_Xref_Entry (Id : E; V : B := True);
procedure Set_Has_Yield_Aspect (Id : E; V : B := True);
procedure Set_Hiding_Loop_Variable (Id : E; V : E);
procedure Set_Hidden_In_Formal_Instance (Id : E; V : L);
procedure Set_Homonym (Id : E; V : E);
procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True);
procedure Set_Import_Pragma (Id : E; V : E);
procedure Set_Incomplete_Actuals (Id : E; V : L);
procedure Set_In_Package_Body (Id : E; V : B := True);
procedure Set_In_Private_Part (Id : E; V : B := True);
procedure Set_In_Use (Id : E; V : B := True);
procedure Set_Initialization_Statements (Id : E; V : N);
procedure Set_Inner_Instances (Id : E; V : L);
procedure Set_Interface_Alias (Id : E; V : E);
procedure Set_Interface_Name (Id : E; V : N);
procedure Set_Interfaces (Id : E; V : L);
procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True);
procedure Set_Is_Abstract_Type (Id : E; V : B := True);
procedure Set_Is_Access_Constant (Id : E; V : B := True);
procedure Set_Is_Activation_Record (Id : E; V : B := True);
procedure Set_Is_Actual_Subtype (Id : E; V : B := True);
procedure Set_Is_Ada_2005_Only (Id : E; V : B := True);
procedure Set_Is_Ada_2012_Only (Id : E; V : B := True);
procedure Set_Is_Aliased (Id : E; V : B := True);
procedure Set_Is_Asynchronous (Id : E; V : B := True);
procedure Set_Is_Atomic (Id : E; V : B := True);
procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True);
procedure Set_Is_Called (Id : E; V : B := True);
procedure Set_Is_Character_Type (Id : E; V : B := True);
procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True);
procedure Set_Is_Child_Unit (Id : E; V : B := True);
procedure Set_Is_Class_Wide_Clone (Id : E; V : B := True);
procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True);
procedure Set_Is_Compilation_Unit (Id : E; V : B := True);
procedure Set_Is_Completely_Hidden (Id : E; V : B := True);
procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True);
procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True);
procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True);
procedure Set_Is_Constrained (Id : E; V : B := True);
procedure Set_Is_Constructor (Id : E; V : B := True);
procedure Set_Is_Controlled_Active (Id : E; V : B := True);
procedure Set_Is_Controlling_Formal (Id : E; V : B := True);
procedure Set_Is_CPP_Class (Id : E; V : B := True);
procedure Set_Is_CUDA_Kernel (Id : E; V : B := True);
procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True);
procedure Set_Is_DIC_Procedure (Id : E; V : B := True);
procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True);
procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True);
procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True);
procedure Set_Is_Dispatching_Operation (Id : E; V : B := True);
procedure Set_Is_Elaboration_Checks_OK_Id (Id : E; V : B := True);
procedure Set_Is_Elaboration_Warnings_OK_Id (Id : E; V : B := True);
procedure Set_Is_Eliminated (Id : E; V : B := True);
procedure Set_Is_Entry_Formal (Id : E; V : B := True);
procedure Set_Is_Entry_Wrapper (Id : E; V : B := True);
procedure Set_Is_Exception_Handler (Id : E; V : B := True);
procedure Set_Is_Exported (Id : E; V : B := True);
procedure Set_Is_Finalized_Transient (Id : E; V : B := True);
procedure Set_Is_First_Subtype (Id : E; V : B := True);
procedure Set_Is_Formal_Subprogram (Id : E; V : B := True);
procedure Set_Is_Frozen (Id : E; V : B := True);
procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True);
procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True);
procedure Set_Is_Generic_Instance (Id : E; V : B := True);
procedure Set_Is_Generic_Type (Id : E; V : B := True);
procedure Set_Is_Hidden (Id : E; V : B := True);
procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True);
procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True);
procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True);
procedure Set_Is_Ignored_Transient (Id : E; V : B := True);
procedure Set_Is_Immediately_Visible (Id : E; V : B := True);
procedure Set_Is_Implementation_Defined (Id : E; V : B := True);
procedure Set_Is_Imported (Id : E; V : B := True);
procedure Set_Is_Independent (Id : E; V : B := True);
procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True);
procedure Set_Is_Inlined (Id : E; V : B := True);
procedure Set_Is_Inlined_Always (Id : E; V : B := True);
procedure Set_Is_Instantiated (Id : E; V : B := True);
procedure Set_Is_Interface (Id : E; V : B := True);
procedure Set_Is_Internal (Id : E; V : B := True);
procedure Set_Is_Interrupt_Handler (Id : E; V : B := True);
procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True);
procedure Set_Is_Invariant_Procedure (Id : E; V : B := True);
procedure Set_Is_Itype (Id : E; V : B := True);
procedure Set_Is_Known_Non_Null (Id : E; V : B := True);
procedure Set_Is_Known_Null (Id : E; V : B := True);
procedure Set_Is_Known_Valid (Id : E; V : B := True);
procedure Set_Is_Limited_Composite (Id : E; V : B := True);
procedure Set_Is_Limited_Interface (Id : E; V : B := True);
procedure Set_Is_Limited_Record (Id : E; V : B := True);
procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True);
procedure Set_Is_Loop_Parameter (Id : E; V : B := True);
procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True);
procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True);
procedure Set_Is_Null_Init_Proc (Id : E; V : B := True);
procedure Set_Is_Obsolescent (Id : E; V : B := True);
procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True);
procedure Set_Is_Package_Body_Entity (Id : E; V : B := True);
procedure Set_Is_Packed (Id : E; V : B := True);
procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True);
procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True);
procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True);
procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True);
procedure Set_Is_Predicate_Function (Id : E; V : B := True);
procedure Set_Is_Predicate_Function_M (Id : E; V : B := True);
procedure Set_Is_Preelaborated (Id : E; V : B := True);
procedure Set_Is_Primitive (Id : E; V : B := True);
procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True);
procedure Set_Is_Private_Composite (Id : E; V : B := True);
procedure Set_Is_Private_Descendant (Id : E; V : B := True);
procedure Set_Is_Private_Primitive (Id : E; V : B := True);
procedure Set_Is_Public (Id : E; V : B := True);
procedure Set_Is_Pure (Id : E; V : B := True);
procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True);
procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True);
procedure Set_Is_Raised (Id : E; V : B := True);
procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True);
procedure Set_Is_Remote_Types (Id : E; V : B := True);
procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True);
procedure Set_Is_Return_Object (Id : E; V : B := True);
procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True);
procedure Set_Is_Shared_Passive (Id : E; V : B := True);
procedure Set_Is_Static_Type (Id : E; V : B := True);
procedure Set_Is_Statically_Allocated (Id : E; V : B := True);
procedure Set_Is_Tag (Id : E; V : B := True);
procedure Set_Is_Tagged_Type (Id : E; V : B := True);
procedure Set_Is_Thunk (Id : E; V : B := True);
procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True);
procedure Set_Is_True_Constant (Id : E; V : B := True);
procedure Set_Is_Unchecked_Union (Id : E; V : B := True);
procedure Set_Is_Underlying_Full_View (Id : E; V : B := True);
procedure Set_Is_Underlying_Record_View (Id : E; V : B := True);
procedure Set_Is_Unimplemented (Id : E; V : B := True);
procedure Set_Is_Unsigned_Type (Id : E; V : B := True);
procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True);
procedure Set_Is_Valued_Procedure (Id : E; V : B := True);
procedure Set_Is_Visible_Formal (Id : E; V : B := True);
procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True);
procedure Set_Is_Volatile (Id : E; V : B := True);
procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True);
procedure Set_Itype_Printed (Id : E; V : B := True);
procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True);
procedure Set_Kill_Range_Checks (Id : E; V : B := True);
procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True);
procedure Set_Last_Aggregate_Assignment (Id : E; V : N);
procedure Set_Last_Assignment (Id : E; V : N);
procedure Set_Last_Entity (Id : E; V : E);
procedure Set_Limited_View (Id : E; V : E);
procedure Set_Linker_Section_Pragma (Id : E; V : N);
procedure Set_Lit_Indexes (Id : E; V : E);
procedure Set_Lit_Strings (Id : E; V : E);
procedure Set_Low_Bound_Tested (Id : E; V : B := True);
procedure Set_Machine_Radix_10 (Id : E; V : B := True);
procedure Set_Master_Id (Id : E; V : E);
procedure Set_Materialize_Entity (Id : E; V : B := True);
procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True);
procedure Set_Mechanism (Id : E; V : M);
procedure Set_Minimum_Accessibility (Id : E; V : E);
procedure Set_Modulus (Id : E; V : U);
procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True);
procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True);
procedure Set_Needs_Activation_Record (Id : E; V : B := True);
procedure Set_Needs_Debug_Info (Id : E; V : B := True);
procedure Set_Needs_No_Actuals (Id : E; V : B := True);
procedure Set_Never_Set_In_Source (Id : E; V : B := True);
procedure Set_Next_Inlined_Subprogram (Id : E; V : E);
procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True);
procedure Set_No_Pool_Assigned (Id : E; V : B := True);
procedure Set_No_Predicate_On_Actual (Id : E; V : B := True);
procedure Set_No_Reordering (Id : E; V : B := True);
procedure Set_No_Return (Id : E; V : B := True);
procedure Set_No_Strict_Aliasing (Id : E; V : B := True);
procedure Set_No_Tagged_Streams_Pragma (Id : E; V : N);
procedure Set_Non_Binary_Modulus (Id : E; V : B := True);
procedure Set_Non_Limited_View (Id : E; V : E);
procedure Set_Nonzero_Is_True (Id : E; V : B := True);
procedure Set_Normalized_First_Bit (Id : E; V : U);
procedure Set_Normalized_Position (Id : E; V : U);
procedure Set_Normalized_Position_Max (Id : E; V : U);
procedure Set_OK_To_Rename (Id : E; V : B := True);
procedure Set_Optimize_Alignment_Space (Id : E; V : B := True);
procedure Set_Optimize_Alignment_Time (Id : E; V : B := True);
procedure Set_Original_Access_Type (Id : E; V : E);
procedure Set_Original_Array_Type (Id : E; V : E);
procedure Set_Original_Protected_Subprogram (Id : E; V : N);
procedure Set_Original_Record_Component (Id : E; V : E);
procedure Set_Overlays_Constant (Id : E; V : B := True);
procedure Set_Overridden_Operation (Id : E; V : E);
procedure Set_Package_Instantiation (Id : E; V : N);
procedure Set_Packed_Array_Impl_Type (Id : E; V : E);
procedure Set_Parent_Subtype (Id : E; V : E);
procedure Set_Part_Of_Constituents (Id : E; V : L);
procedure Set_Part_Of_References (Id : E; V : L);
procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True);
procedure Set_Pending_Access_Types (Id : E; V : L);
procedure Set_Postconditions_Proc (Id : E; V : E);
procedure Set_Prev_Entity (Id : E; V : E);
procedure Set_Prival (Id : E; V : E);
procedure Set_Prival_Link (Id : E; V : E);
procedure Set_Private_Dependents (Id : E; V : L);
procedure Set_Protected_Body_Subprogram (Id : E; V : E);
procedure Set_Protected_Formal (Id : E; V : E);
procedure Set_Protected_Subprogram (Id : E; V : N);
procedure Set_Protection_Object (Id : E; V : E);
procedure Set_Reachable (Id : E; V : B := True);
procedure Set_Receiving_Entry (Id : E; V : E);
procedure Set_Referenced (Id : E; V : B := True);
procedure Set_Referenced_As_LHS (Id : E; V : B := True);
procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True);
procedure Set_Refinement_Constituents (Id : E; V : L);
procedure Set_Register_Exception_Call (Id : E; V : N);
procedure Set_Related_Array_Object (Id : E; V : E);
procedure Set_Related_Expression (Id : E; V : N);
procedure Set_Related_Instance (Id : E; V : E);
procedure Set_Related_Type (Id : E; V : E);
procedure Set_Relative_Deadline_Variable (Id : E; V : E);
procedure Set_Renamed_Entity (Id : E; V : N);
procedure Set_Renamed_In_Spec (Id : E; V : B := True);
procedure Set_Renamed_Object (Id : E; V : N);
procedure Set_Renaming_Map (Id : E; V : U);
procedure Set_Requires_Overriding (Id : E; V : B := True);
procedure Set_Return_Applies_To (Id : E; V : N);
procedure Set_Return_Present (Id : E; V : B := True);
procedure Set_Returns_By_Ref (Id : E; V : B := True);
procedure Set_Reverse_Bit_Order (Id : E; V : B := True);
procedure Set_Reverse_Storage_Order (Id : E; V : B := True);
procedure Set_Rewritten_For_C (Id : E; V : B := True);
procedure Set_RM_Size (Id : E; V : U);
procedure Set_Scalar_Range (Id : E; V : N);
procedure Set_Scale_Value (Id : E; V : U);
procedure Set_Scope_Depth_Value (Id : E; V : U);
procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True);
procedure Set_Shared_Var_Procs_Instance (Id : E; V : E);
procedure Set_Size_Check_Code (Id : E; V : N);
procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True);
procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True);
procedure Set_Small_Value (Id : E; V : R);
procedure Set_SPARK_Aux_Pragma (Id : E; V : N);
procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True);
procedure Set_SPARK_Pragma (Id : E; V : N);
procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True);
procedure Set_Spec_Entity (Id : E; V : E);
procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True);
procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True);
procedure Set_Static_Discrete_Predicate (Id : E; V : S);
procedure Set_Static_Elaboration_Desired (Id : E; V : B);
procedure Set_Static_Initialization (Id : E; V : N);
procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N);
procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E);
procedure Set_Storage_Size_Variable (Id : E; V : E);
procedure Set_Stored_Constraint (Id : E; V : L);
procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True);
procedure Set_Strict_Alignment (Id : E; V : B := True);
procedure Set_String_Literal_Length (Id : E; V : U);
procedure Set_String_Literal_Low_Bound (Id : E; V : N);
procedure Set_Subprograms_For_Type (Id : E; V : L);
procedure Set_Subps_Index (Id : E; V : U);
procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True);
procedure Set_Suppress_Initialization (Id : E; V : B := True);
procedure Set_Suppress_Style_Checks (Id : E; V : B := True);
procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True);
procedure Set_Task_Body_Procedure (Id : E; V : N);
procedure Set_Thunk_Entity (Id : E; V : E);
procedure Set_Treat_As_Volatile (Id : E; V : B := True);
procedure Set_Underlying_Full_View (Id : E; V : E);
procedure Set_Underlying_Record_View (Id : E; V : E);
procedure Set_Universal_Aliasing (Id : E; V : B := True);
procedure Set_Unset_Reference (Id : E; V : N);
procedure Set_Used_As_Generic_Actual (Id : E; V : B := True);
procedure Set_Uses_Lock_Free (Id : E; V : B := True);
procedure Set_Uses_Sec_Stack (Id : E; V : B := True);
procedure Set_Validated_Object (Id : E; V : N);
procedure Set_Warnings_Off (Id : E; V : B := True);
procedure Set_Warnings_Off_Used (Id : E; V : B := True);
procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True);
procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True);
procedure Set_Was_Hidden (Id : E; V : B := True);
procedure Set_Wrapped_Entity (Id : E; V : E);
---------------------------------------------------
-- Access to Subprograms in Subprograms_For_Type --
---------------------------------------------------
function DIC_Procedure (Id : E) return E;
function Invariant_Procedure (Id : E) return E;
function Partial_Invariant_Procedure (Id : E) return E;
function Predicate_Function (Id : E) return E;
function Predicate_Function_M (Id : E) return E;
procedure Set_DIC_Procedure (Id : E; V : E);
procedure Set_Invariant_Procedure (Id : E; V : E);
procedure Set_Partial_Invariant_Procedure (Id : E; V : E);
procedure Set_Predicate_Function (Id : E; V : E);
procedure Set_Predicate_Function_M (Id : E; V : E);
-----------------------------------
-- Field Initialization Routines --
-----------------------------------
-- These routines are overloadings of some of the above Set procedures
-- where the argument is normally a Uint. The overloadings take an Int
-- parameter instead, and appropriately convert it. There are also
-- versions that implicitly initialize to the appropriate "not set"
-- value. The not set (unknown) values are as follows:
-- Alignment Uint_0
-- Component_Size Uint_0
-- Component_Bit_Offset No_Uint
-- Digits_Value Uint_0
-- Esize Uint_0
-- Normalized_First_Bit No_Uint
-- Normalized_Position No_Uint
-- Normalized_Position_Max No_Uint
-- RM_Size Uint_0
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
-- is legitimate and causes some special tests around the code.
-- Contrary to the corresponding Set procedures above, these routines
-- do NOT check the entity kind of their argument, instead they set the
-- underlying Uint fields directly (this allows them to be used for
-- entities whose Ekind has not been set yet).
procedure Init_Alignment (Id : E; V : Int);
procedure Init_Component_Bit_Offset (Id : E; V : Int);
procedure Init_Component_Size (Id : E; V : Int);
procedure Init_Digits_Value (Id : E; V : Int);
procedure Init_Esize (Id : E; V : Int);
procedure Init_Normalized_First_Bit (Id : E; V : Int);
procedure Init_Normalized_Position (Id : E; V : Int);
procedure Init_Normalized_Position_Max (Id : E; V : Int);
procedure Init_RM_Size (Id : E; V : Int);
procedure Init_Alignment (Id : E);
procedure Init_Component_Bit_Offset (Id : E);
procedure Init_Component_Size (Id : E);
procedure Init_Digits_Value (Id : E);
procedure Init_Esize (Id : E);
procedure Init_Normalized_First_Bit (Id : E);
procedure Init_Normalized_Position (Id : E);
procedure Init_Normalized_Position_Max (Id : E);
procedure Init_RM_Size (Id : E);
procedure Init_Component_Location (Id : E);
-- Initializes all fields describing the location of a component
-- (Normalized_Position, Component_Bit_Offset, Normalized_First_Bit,
-- Normalized_Position_Max, Esize) to all be Unknown.
procedure Init_Size (Id : E; V : Int);
-- Initialize both the Esize and RM_Size fields of E to V
procedure Init_Size_Align (Id : E);
-- This procedure initializes both size fields and the alignment
-- field to all be Unknown.
procedure Init_Object_Size_Align (Id : E);
-- Same as Init_Size_Align except RM_Size field (which is only for types)
-- is unaffected.
---------------
-- Iterators --
---------------
-- The call to Next_xxx (obj) is equivalent to obj := Next_xxx (obj)
-- We define the set of Proc_Next_xxx routines simply for the purposes
-- of inlining them without necessarily inlining the function.
procedure Proc_Next_Component (N : in out Node_Id);
procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id);
procedure Proc_Next_Discriminant (N : in out Node_Id);
procedure Proc_Next_Formal (N : in out Node_Id);
procedure Proc_Next_Formal_With_Extras (N : in out Node_Id);
procedure Proc_Next_Index (N : in out Node_Id);
procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id);
procedure Proc_Next_Literal (N : in out Node_Id);
procedure Proc_Next_Stored_Discriminant (N : in out Node_Id);
pragma Inline (Proc_Next_Component);
pragma Inline (Proc_Next_Component_Or_Discriminant);
pragma Inline (Proc_Next_Discriminant);
pragma Inline (Proc_Next_Formal);
pragma Inline (Proc_Next_Formal_With_Extras);
pragma Inline (Proc_Next_Index);
pragma Inline (Proc_Next_Inlined_Subprogram);
pragma Inline (Proc_Next_Literal);
pragma Inline (Proc_Next_Stored_Discriminant);
procedure Next_Component (N : in out Node_Id)
renames Proc_Next_Component;
procedure Next_Component_Or_Discriminant (N : in out Node_Id)
renames Proc_Next_Component_Or_Discriminant;
procedure Next_Discriminant (N : in out Node_Id)
renames Proc_Next_Discriminant;
procedure Next_Formal (N : in out Node_Id)
renames Proc_Next_Formal;
procedure Next_Formal_With_Extras (N : in out Node_Id)
renames Proc_Next_Formal_With_Extras;
procedure Next_Index (N : in out Node_Id)
renames Proc_Next_Index;
procedure Next_Inlined_Subprogram (N : in out Node_Id)
renames Proc_Next_Inlined_Subprogram;
procedure Next_Literal (N : in out Node_Id)
renames Proc_Next_Literal;
procedure Next_Stored_Discriminant (N : in out Node_Id)
renames Proc_Next_Stored_Discriminant;
---------------------------
-- Testing Warning Flags --
---------------------------
-- These routines are to be used rather than testing flags Warnings_Off,
-- Has_Pragma_Unmodified, Has_Pragma_Unreferenced. They deal with setting
-- the flags Warnings_Off_Used[_Unmodified|Unreferenced] for later access.
function Has_Warnings_Off (E : Entity_Id) return Boolean;
-- If Warnings_Off is set on E, then returns True and also sets the flag
-- Warnings_Off_Used on E. If Warnings_Off is not set on E, returns False
-- and has no side effect.
function Has_Unmodified (E : Entity_Id) return Boolean;
-- If flag Has_Pragma_Unmodified is set on E, returns True with no side
-- effects. Otherwise if Warnings_Off is set on E, returns True and also
-- sets the flag Warnings_Off_Used_Unmodified on E. If neither of the flags
-- Warnings_Off nor Has_Pragma_Unmodified is set, returns False with no
-- side effects.
function Has_Unreferenced (E : Entity_Id) return Boolean;
-- If flag Has_Pragma_Unreferenced is set on E, returns True with no side
-- effects. Otherwise if Warnings_Off is set on E, returns True and also
-- sets the flag Warnings_Off_Used_Unreferenced on E. If neither of the
-- flags Warnings_Off nor Has_Pragma_Unreferenced is set, returns False
-- with no side effects.
----------------------------------------------
-- Subprograms for Accessing Rep Item Chain --
----------------------------------------------
-- The First_Rep_Item field of every entity points to a linked list (linked
-- through Next_Rep_Item) of representation pragmas, attribute definition
-- clauses, representation clauses, and aspect specifications that apply to
-- the item. Note that in the case of types, it is assumed that any such
-- rep items for a base type also apply to all subtypes. This is achieved
-- by having the chain for subtypes link onto the chain for the base type,
-- so that new entries for the subtype are added at the start of the chain.
--
-- Note: aspect specification nodes are linked only when evaluation of the
-- expression is deferred to the freeze point. For further details see
-- Sem_Ch13.Analyze_Aspect_Specifications.
function Get_Attribute_Definition_Clause
(E : Entity_Id;
Id : Attribute_Id) return Node_Id;
-- Searches the Rep_Item chain for a given entity E, for an instance of an
-- attribute definition clause with the given attribute Id. If found, the
-- value returned is the N_Attribute_Definition_Clause node, otherwise
-- Empty is returned.
-- WARNING: There is a matching C declaration of this subprogram in fe.h
function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id;
-- Searches the Rep_Item chain of entity E, for an instance of a pragma
-- with the given pragma Id. If found, the value returned is the N_Pragma
-- node, otherwise Empty is returned. The following contract pragmas that
-- appear in N_Contract nodes are also handled by this routine:
-- Abstract_State
-- Async_Readers
-- Async_Writers
-- Attach_Handler
-- Constant_After_Elaboration
-- Contract_Cases
-- Depends
-- Effective_Reads
-- Effective_Writes
-- Global
-- Initial_Condition
-- Initializes
-- Interrupt_Handler
-- No_Caching
-- Part_Of
-- Precondition
-- Postcondition
-- Refined_Depends
-- Refined_Global
-- Refined_Post
-- Refined_State
-- Subprogram_Variant
-- Test_Case
-- Volatile_Function
function Get_Class_Wide_Pragma
(E : Entity_Id;
Id : Pragma_Id) return Node_Id;
-- Examine Rep_Item chain to locate a classwide pre- or postcondition of a
-- primitive operation. Returns Empty if not present.
function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id;
-- Searches the Rep_Item chain for a given entity E, for a record
-- representation clause, and if found, returns it. Returns Empty
-- if no such clause is found.
function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean;
-- Return True if N is present in the Rep_Item chain for a given entity E
procedure Record_Rep_Item (E : Entity_Id; N : Node_Id);
-- N is the node for a representation pragma, representation clause, an
-- attribute definition clause, or an aspect specification that applies to
-- entity E. This procedure links the node N onto the Rep_Item chain for
-- entity E. Note that it is an error to call this procedure with E being
-- overloadable, and N being a pragma that applies to multiple overloadable
-- entities (Convention, Interface, Inline, Inline_Always, Import, Export,
-- External). This is not allowed even in the case where the entity is not
-- overloaded, since we can't rely on it being present in the overloaded
-- case, it is not useful to have it present in the non-overloaded case.
-------------------------------
-- Miscellaneous Subprograms --
-------------------------------
procedure Append_Entity (Id : Entity_Id; Scop : Entity_Id);
-- Add an entity to the list of entities declared in the scope Scop
function Get_Full_View (T : Entity_Id) return Entity_Id;
-- If T is an incomplete type and the full declaration has been seen, or
-- is the name of a class_wide type whose root is incomplete, return the
-- corresponding full declaration, else return T itself.
function Is_Entity_Name (N : Node_Id) return Boolean;
-- Test if the node N is the name of an entity (i.e. is an identifier,
-- expanded name, or an attribute reference that returns an entity).
-- WARNING: There is a matching C declaration of this subprogram in fe.h
procedure Link_Entities (First : Entity_Id; Second : Entity_Id);
-- Link entities First and Second in one entity chain.
--
-- NOTE: No updates are done to the First_Entity and Last_Entity fields
-- of the scope.
procedure Remove_Entity (Id : Entity_Id);
-- Remove entity Id from the entity chain of its scope
function Subtype_Kind (K : Entity_Kind) return Entity_Kind;
-- Given an entity_kind K this function returns the entity_kind
-- corresponding to subtype kind of the type represented by K. For
-- example if K is E_Signed_Integer_Type then E_Signed_Integer_Subtype
-- is returned. If K is already a subtype kind it itself is returned. An
-- internal error is generated if no such correspondence exists for K.
procedure Unlink_Next_Entity (Id : Entity_Id);
-- Unchain entity Id's forward link within the entity chain of its scope
----------------------------------
-- Debugging Output Subprograms --
----------------------------------
procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String);
-- Writes a series of entries giving a line for each flag that is
-- set to True. Each line is prefixed by the given string.
procedure Write_Entity_Info (Id : Entity_Id; Prefix : String);
-- A debugging procedure to write out information about an entity
procedure Write_Field6_Name (Id : Entity_Id);
procedure Write_Field7_Name (Id : Entity_Id);
procedure Write_Field8_Name (Id : Entity_Id);
procedure Write_Field9_Name (Id : Entity_Id);
procedure Write_Field10_Name (Id : Entity_Id);
procedure Write_Field11_Name (Id : Entity_Id);
procedure Write_Field12_Name (Id : Entity_Id);
procedure Write_Field13_Name (Id : Entity_Id);
procedure Write_Field14_Name (Id : Entity_Id);
procedure Write_Field15_Name (Id : Entity_Id);
procedure Write_Field16_Name (Id : Entity_Id);
procedure Write_Field17_Name (Id : Entity_Id);
procedure Write_Field18_Name (Id : Entity_Id);
procedure Write_Field19_Name (Id : Entity_Id);
procedure Write_Field20_Name (Id : Entity_Id);
procedure Write_Field21_Name (Id : Entity_Id);
procedure Write_Field22_Name (Id : Entity_Id);
procedure Write_Field23_Name (Id : Entity_Id);
procedure Write_Field24_Name (Id : Entity_Id);
procedure Write_Field25_Name (Id : Entity_Id);
procedure Write_Field26_Name (Id : Entity_Id);
procedure Write_Field27_Name (Id : Entity_Id);
procedure Write_Field28_Name (Id : Entity_Id);
procedure Write_Field29_Name (Id : Entity_Id);
procedure Write_Field30_Name (Id : Entity_Id);
procedure Write_Field31_Name (Id : Entity_Id);
procedure Write_Field32_Name (Id : Entity_Id);
procedure Write_Field33_Name (Id : Entity_Id);
procedure Write_Field34_Name (Id : Entity_Id);
procedure Write_Field35_Name (Id : Entity_Id);
procedure Write_Field36_Name (Id : Entity_Id);
procedure Write_Field37_Name (Id : Entity_Id);
procedure Write_Field38_Name (Id : Entity_Id);
procedure Write_Field39_Name (Id : Entity_Id);
procedure Write_Field40_Name (Id : Entity_Id);
procedure Write_Field41_Name (Id : Entity_Id);
-- These routines are used in Treepr to output a nice symbolic name for
-- the given field, depending on the Ekind. No blanks or end of lines are
-- output, just the characters of the field name.
----------------------------------
-- Inline Pragmas for functions --
----------------------------------
-- Note that these inline pragmas are referenced by the XEINFO utility
-- program in preparing the corresponding C header, and only those
-- subprograms meeting the requirements documented in the section on
-- XEINFO may be referenced in this section.
pragma Inline (Abstract_States);
pragma Inline (Accept_Address);
pragma Inline (Access_Disp_Table);
pragma Inline (Access_Disp_Table_Elab_Flag);
pragma Inline (Access_Subprogram_Wrapper);
pragma Inline (Activation_Record_Component);
pragma Inline (Actual_Subtype);
pragma Inline (Address_Taken);
pragma Inline (Alias);
pragma Inline (Alignment);
pragma Inline (Anonymous_Designated_Type);
pragma Inline (Anonymous_Masters);
pragma Inline (Anonymous_Object);
pragma Inline (Associated_Entity);
pragma Inline (Associated_Formal_Package);
pragma Inline (Associated_Node_For_Itype);
pragma Inline (Associated_Storage_Pool);
pragma Inline (Barrier_Function);
pragma Inline (BIP_Initialization_Call);
pragma Inline (Block_Node);
pragma Inline (Body_Entity);
pragma Inline (Body_Needed_For_Inlining);
pragma Inline (Body_Needed_For_SAL);
pragma Inline (Body_References);
pragma Inline (C_Pass_By_Copy);
pragma Inline (Can_Never_Be_Null);
pragma Inline (Can_Use_Internal_Rep);
pragma Inline (Checks_May_Be_Suppressed);
pragma Inline (Class_Wide_Clone);
pragma Inline (Class_Wide_Type);
pragma Inline (Cloned_Subtype);
pragma Inline (Component_Bit_Offset);
pragma Inline (Component_Clause);
pragma Inline (Component_Size);
pragma Inline (Component_Type);
pragma Inline (Contains_Ignored_Ghost_Code);
pragma Inline (Contract);
pragma Inline (Contract_Wrapper);
pragma Inline (Corresponding_Concurrent_Type);
pragma Inline (Corresponding_Discriminant);
pragma Inline (Corresponding_Equality);
pragma Inline (Corresponding_Function);
pragma Inline (Corresponding_Procedure);
pragma Inline (Corresponding_Protected_Entry);
pragma Inline (Corresponding_Record_Component);
pragma Inline (Corresponding_Record_Type);
pragma Inline (Corresponding_Remote_Type);
pragma Inline (CR_Discriminant);
pragma Inline (Current_Use_Clause);
pragma Inline (Current_Value);
pragma Inline (Debug_Info_Off);
pragma Inline (Debug_Renaming_Link);
pragma Inline (Default_Aspect_Component_Value);
pragma Inline (Default_Aspect_Value);
pragma Inline (Default_Expr_Function);
pragma Inline (Default_Expressions_Processed);
pragma Inline (Default_Value);
pragma Inline (Delay_Cleanups);
pragma Inline (Delay_Subprogram_Descriptors);
pragma Inline (Delta_Value);
pragma Inline (Dependent_Instances);
pragma Inline (Depends_On_Private);
pragma Inline (Derived_Type_Link);
pragma Inline (Digits_Value);
pragma Inline (Direct_Primitive_Operations);
pragma Inline (Directly_Designated_Type);
pragma Inline (Disable_Controlled);
pragma Inline (Discard_Names);
pragma Inline (Discriminal);
pragma Inline (Discriminal_Link);
pragma Inline (Discriminant_Checking_Func);
pragma Inline (Discriminant_Constraint);
pragma Inline (Discriminant_Default_Value);
pragma Inline (Discriminant_Number);
pragma Inline (Dispatch_Table_Wrappers);
pragma Inline (DT_Entry_Count);
pragma Inline (DT_Offset_To_Top_Func);
pragma Inline (DT_Position);
pragma Inline (DTC_Entity);
pragma Inline (Elaborate_Body_Desirable);
pragma Inline (Elaboration_Entity);
pragma Inline (Elaboration_Entity_Required);
pragma Inline (Encapsulating_State);
pragma Inline (Enclosing_Scope);
pragma Inline (Entry_Accepted);
pragma Inline (Entry_Bodies_Array);
pragma Inline (Entry_Cancel_Parameter);
pragma Inline (Entry_Component);
pragma Inline (Entry_Formal);
pragma Inline (Entry_Index_Constant);
pragma Inline (Entry_Index_Type);
pragma Inline (Entry_Max_Queue_Lengths_Array);
pragma Inline (Entry_Parameters_Type);
pragma Inline (Enum_Pos_To_Rep);
pragma Inline (Enumeration_Pos);
pragma Inline (Enumeration_Rep);
pragma Inline (Enumeration_Rep_Expr);
pragma Inline (Equivalent_Type);
pragma Inline (Esize);
pragma Inline (Extra_Accessibility);
pragma Inline (Extra_Accessibility_Of_Result);
pragma Inline (Extra_Constrained);
pragma Inline (Extra_Formal);
pragma Inline (Extra_Formals);
pragma Inline (Finalize_Storage_Only);
pragma Inline (Finalization_Master);
pragma Inline (Finalizer);
pragma Inline (First_Entity);
pragma Inline (First_Exit_Statement);
pragma Inline (First_Index);
pragma Inline (First_Literal);
pragma Inline (First_Private_Entity);
pragma Inline (First_Rep_Item);
pragma Inline (Freeze_Node);
pragma Inline (From_Limited_With);
pragma Inline (Full_View);
pragma Inline (Generic_Homonym);
pragma Inline (Generic_Renamings);
pragma Inline (Handler_Records);
pragma Inline (Has_Aliased_Components);
pragma Inline (Has_Alignment_Clause);
pragma Inline (Has_All_Calls_Remote);
pragma Inline (Has_Atomic_Components);
pragma Inline (Has_Biased_Representation);
pragma Inline (Has_Completion);
pragma Inline (Has_Completion_In_Body);
pragma Inline (Has_Complex_Representation);
pragma Inline (Has_Component_Size_Clause);
pragma Inline (Has_Constrained_Partial_View);
pragma Inline (Has_Contiguous_Rep);
pragma Inline (Has_Controlled_Component);
pragma Inline (Has_Controlling_Result);
pragma Inline (Has_Convention_Pragma);
pragma Inline (Has_Default_Aspect);
pragma Inline (Has_Delayed_Aspects);
pragma Inline (Has_Delayed_Freeze);
pragma Inline (Has_Delayed_Rep_Aspects);
pragma Inline (Has_DIC);
pragma Inline (Has_Discriminants);
pragma Inline (Has_Dispatch_Table);
pragma Inline (Has_Dynamic_Predicate_Aspect);
pragma Inline (Has_Enumeration_Rep_Clause);
pragma Inline (Has_Exit);
pragma Inline (Has_Expanded_Contract);
pragma Inline (Has_Forward_Instantiation);
pragma Inline (Has_Fully_Qualified_Name);
pragma Inline (Has_Gigi_Rep_Item);
pragma Inline (Has_Homonym);
pragma Inline (Has_Implicit_Dereference);
pragma Inline (Has_Independent_Components);
pragma Inline (Has_Inheritable_Invariants);
pragma Inline (Has_Inherited_DIC);
pragma Inline (Has_Inherited_Invariants);
pragma Inline (Has_Initial_Value);
pragma Inline (Has_Invariants);
pragma Inline (Has_Loop_Entry_Attributes);
pragma Inline (Has_Machine_Radix_Clause);
pragma Inline (Has_Master_Entity);
pragma Inline (Has_Missing_Return);
pragma Inline (Has_Nested_Block_With_Handler);
pragma Inline (Has_Nested_Subprogram);
pragma Inline (Has_Non_Standard_Rep);
pragma Inline (Has_Object_Size_Clause);
pragma Inline (Has_Out_Or_In_Out_Parameter);
pragma Inline (Has_Own_DIC);
pragma Inline (Has_Own_Invariants);
pragma Inline (Has_Partial_Visible_Refinement);
pragma Inline (Has_Per_Object_Constraint);
pragma Inline (Has_Pragma_Controlled);
pragma Inline (Has_Pragma_Elaborate_Body);
pragma Inline (Has_Pragma_Inline);
pragma Inline (Has_Pragma_Inline_Always);
pragma Inline (Has_Pragma_No_Inline);
pragma Inline (Has_Pragma_Ordered);
pragma Inline (Has_Pragma_Pack);
pragma Inline (Has_Pragma_Preelab_Init);
pragma Inline (Has_Pragma_Pure);
pragma Inline (Has_Pragma_Pure_Function);
pragma Inline (Has_Pragma_Thread_Local_Storage);
pragma Inline (Has_Pragma_Unmodified);
pragma Inline (Has_Pragma_Unreferenced);
pragma Inline (Has_Pragma_Unreferenced_Objects);
pragma Inline (Has_Pragma_Unused);
pragma Inline (Has_Predicates);
pragma Inline (Has_Primitive_Operations);
pragma Inline (Has_Private_Ancestor);
pragma Inline (Has_Private_Declaration);
pragma Inline (Has_Private_Extension);
pragma Inline (Has_Protected);
pragma Inline (Has_Qualified_Name);
pragma Inline (Has_RACW);
pragma Inline (Has_Record_Rep_Clause);
pragma Inline (Has_Recursive_Call);
pragma Inline (Has_Shift_Operator);
pragma Inline (Has_Size_Clause);
pragma Inline (Has_Small_Clause);
pragma Inline (Has_Specified_Layout);
pragma Inline (Has_Specified_Stream_Input);
pragma Inline (Has_Specified_Stream_Output);
pragma Inline (Has_Specified_Stream_Read);
pragma Inline (Has_Specified_Stream_Write);
pragma Inline (Has_Static_Discriminants);
pragma Inline (Has_Static_Predicate);
pragma Inline (Has_Static_Predicate_Aspect);
pragma Inline (Has_Storage_Size_Clause);
pragma Inline (Has_Stream_Size_Clause);
pragma Inline (Has_Task);
pragma Inline (Has_Timing_Event);
pragma Inline (Has_Thunks);
pragma Inline (Has_Unchecked_Union);
pragma Inline (Has_Unknown_Discriminants);
pragma Inline (Has_Visible_Refinement);
pragma Inline (Has_Volatile_Components);
pragma Inline (Has_Xref_Entry);
pragma Inline (Has_Yield_Aspect);
pragma Inline (Hiding_Loop_Variable);
pragma Inline (Hidden_In_Formal_Instance);
pragma Inline (Homonym);
pragma Inline (Ignore_SPARK_Mode_Pragmas);
pragma Inline (Import_Pragma);
pragma Inline (Incomplete_Actuals);
pragma Inline (In_Package_Body);
pragma Inline (In_Private_Part);
pragma Inline (In_Use);
pragma Inline (Initialization_Statements);
pragma Inline (Inner_Instances);
pragma Inline (Interface_Alias);
pragma Inline (Interface_Name);
pragma Inline (Interfaces);
pragma Inline (Is_Abstract_Subprogram);
pragma Inline (Is_Abstract_Type);
pragma Inline (Is_Access_Constant);
pragma Inline (Is_Activation_Record);
pragma Inline (Is_Actual_Subtype);
pragma Inline (Is_Access_Protected_Subprogram_Type);
pragma Inline (Is_Access_Subprogram_Type);
pragma Inline (Is_Access_Type);
pragma Inline (Is_Ada_2005_Only);
pragma Inline (Is_Ada_2012_Only);
pragma Inline (Is_Aggregate_Type);
pragma Inline (Is_Aliased);
pragma Inline (Is_Anonymous_Access_Type);
pragma Inline (Is_Array_Type);
pragma Inline (Is_Assignable);
pragma Inline (Is_Asynchronous);
pragma Inline (Is_Atomic);
pragma Inline (Is_Atomic_Or_VFA);
pragma Inline (Is_Bit_Packed_Array);
pragma Inline (Is_Called);
pragma Inline (Is_Character_Type);
pragma Inline (Is_Checked_Ghost_Entity);
pragma Inline (Is_Child_Unit);
pragma Inline (Is_Class_Wide_Clone);
pragma Inline (Is_Class_Wide_Equivalent_Type);
pragma Inline (Is_Class_Wide_Type);
pragma Inline (Is_Compilation_Unit);
pragma Inline (Is_Completely_Hidden);
pragma Inline (Is_Composite_Type);
pragma Inline (Is_Concurrent_Body);
pragma Inline (Is_Concurrent_Record_Type);
pragma Inline (Is_Concurrent_Type);
pragma Inline (Is_Constr_Subt_For_U_Nominal);
pragma Inline (Is_Constr_Subt_For_UN_Aliased);
pragma Inline (Is_Constrained);
pragma Inline (Is_Constructor);
pragma Inline (Is_Controlled_Active);
pragma Inline (Is_Controlling_Formal);
pragma Inline (Is_CPP_Class);
pragma Inline (Is_CUDA_Kernel);
pragma Inline (Is_Decimal_Fixed_Point_Type);
pragma Inline (Is_Descendant_Of_Address);
pragma Inline (Is_DIC_Procedure);
pragma Inline (Is_Digits_Type);
pragma Inline (Is_Discrete_Or_Fixed_Point_Type);
pragma Inline (Is_Discrete_Type);
pragma Inline (Is_Discrim_SO_Function);
pragma Inline (Is_Discriminant_Check_Function);
pragma Inline (Is_Dispatch_Table_Entity);
pragma Inline (Is_Dispatching_Operation);
pragma Inline (Is_Elaboration_Checks_OK_Id);
pragma Inline (Is_Elaboration_Warnings_OK_Id);
pragma Inline (Is_Elementary_Type);
pragma Inline (Is_Eliminated);
pragma Inline (Is_Entry);
pragma Inline (Is_Entry_Formal);
pragma Inline (Is_Entry_Wrapper);
pragma Inline (Is_Enumeration_Type);
pragma Inline (Is_Exception_Handler);
pragma Inline (Is_Exported);
pragma Inline (Is_Finalized_Transient);
pragma Inline (Is_First_Subtype);
pragma Inline (Is_Fixed_Point_Type);
pragma Inline (Is_Floating_Point_Type);
pragma Inline (Is_Formal);
pragma Inline (Is_Formal_Object);
pragma Inline (Is_Formal_Subprogram);
pragma Inline (Is_Frozen);
pragma Inline (Is_Generic_Actual_Subprogram);
pragma Inline (Is_Generic_Actual_Type);
pragma Inline (Is_Generic_Instance);
pragma Inline (Is_Generic_Subprogram);
pragma Inline (Is_Generic_Type);
pragma Inline (Is_Generic_Unit);
pragma Inline (Is_Ghost_Entity);
pragma Inline (Is_Hidden);
pragma Inline (Is_Hidden_Non_Overridden_Subpgm);
pragma Inline (Is_Hidden_Open_Scope);
pragma Inline (Is_Ignored_Ghost_Entity);
pragma Inline (Is_Ignored_Transient);
pragma Inline (Is_Immediately_Visible);
pragma Inline (Is_Implementation_Defined);
pragma Inline (Is_Imported);
pragma Inline (Is_Incomplete_Or_Private_Type);
pragma Inline (Is_Incomplete_Type);
pragma Inline (Is_Independent);
pragma Inline (Is_Initial_Condition_Procedure);
pragma Inline (Is_Inlined);
pragma Inline (Is_Inlined_Always);
pragma Inline (Is_Instantiated);
pragma Inline (Is_Integer_Type);
pragma Inline (Is_Interface);
pragma Inline (Is_Internal);
pragma Inline (Is_Interrupt_Handler);
pragma Inline (Is_Intrinsic_Subprogram);
pragma Inline (Is_Invariant_Procedure);
pragma Inline (Is_Itype);
pragma Inline (Is_Known_Non_Null);
pragma Inline (Is_Known_Null);
pragma Inline (Is_Known_Valid);
pragma Inline (Is_Limited_Composite);
pragma Inline (Is_Limited_Interface);
pragma Inline (Is_Limited_Record);
pragma Inline (Is_Local_Anonymous_Access);
pragma Inline (Is_Loop_Parameter);
pragma Inline (Is_Machine_Code_Subprogram);
pragma Inline (Is_Modular_Integer_Type);
pragma Inline (Is_Named_Number);
pragma Inline (Is_Non_Static_Subtype);
pragma Inline (Is_Null_Init_Proc);
pragma Inline (Is_Numeric_Type);
pragma Inline (Is_Object);
pragma Inline (Is_Obsolescent);
pragma Inline (Is_Only_Out_Parameter);
pragma Inline (Is_Ordinary_Fixed_Point_Type);
pragma Inline (Is_Overloadable);
pragma Inline (Is_Package_Body_Entity);
pragma Inline (Is_Packed);
pragma Inline (Is_Packed_Array_Impl_Type);
pragma Inline (Is_Param_Block_Component_Type);
pragma Inline (Is_Partial_Invariant_Procedure);
pragma Inline (Is_Potentially_Use_Visible);
pragma Inline (Is_Predicate_Function);
pragma Inline (Is_Predicate_Function_M);
pragma Inline (Is_Preelaborated);
pragma Inline (Is_Primitive);
pragma Inline (Is_Primitive_Wrapper);
pragma Inline (Is_Private_Composite);
pragma Inline (Is_Private_Descendant);
pragma Inline (Is_Private_Primitive);
pragma Inline (Is_Private_Type);
pragma Inline (Is_Protected_Type);
pragma Inline (Is_Public);
pragma Inline (Is_Pure);
pragma Inline (Is_Pure_Unit_Access_Type);
pragma Inline (Is_RACW_Stub_Type);
pragma Inline (Is_Raised);
pragma Inline (Is_Real_Type);
pragma Inline (Is_Record_Type);
pragma Inline (Is_Remote_Call_Interface);
pragma Inline (Is_Remote_Types);
pragma Inline (Is_Renaming_Of_Object);
pragma Inline (Is_Return_Object);
pragma Inline (Is_Safe_To_Reevaluate);
pragma Inline (Is_Scalar_Type);
pragma Inline (Is_Shared_Passive);
pragma Inline (Is_Signed_Integer_Type);
pragma Inline (Is_Static_Type);
pragma Inline (Is_Statically_Allocated);
pragma Inline (Is_Subprogram);
pragma Inline (Is_Subprogram_Or_Entry);
pragma Inline (Is_Subprogram_Or_Generic_Subprogram);
pragma Inline (Is_Tag);
pragma Inline (Is_Tagged_Type);
pragma Inline (Is_Task_Type);
pragma Inline (Is_Thunk);
pragma Inline (Is_Trivial_Subprogram);
pragma Inline (Is_True_Constant);
pragma Inline (Is_Type);
pragma Inline (Is_Unchecked_Union);
pragma Inline (Is_Underlying_Full_View);
pragma Inline (Is_Underlying_Record_View);
pragma Inline (Is_Unimplemented);
pragma Inline (Is_Unsigned_Type);
pragma Inline (Is_Uplevel_Referenced_Entity);
pragma Inline (Is_Valued_Procedure);
pragma Inline (Is_Visible_Formal);
pragma Inline (Is_Visible_Lib_Unit);
pragma Inline (Is_Volatile_Full_Access);
pragma Inline (Itype_Printed);
pragma Inline (Kill_Elaboration_Checks);
pragma Inline (Kill_Range_Checks);
pragma Inline (Known_To_Have_Preelab_Init);
pragma Inline (Last_Aggregate_Assignment);
pragma Inline (Last_Assignment);
pragma Inline (Last_Entity);
pragma Inline (Limited_View);
pragma Inline (Link_Entities);
pragma Inline (Linker_Section_Pragma);
pragma Inline (Lit_Indexes);
pragma Inline (Lit_Strings);
pragma Inline (Low_Bound_Tested);
pragma Inline (Machine_Radix_10);
pragma Inline (Master_Id);
pragma Inline (Materialize_Entity);
pragma Inline (May_Inherit_Delayed_Rep_Aspects);
pragma Inline (Mechanism);
pragma Inline (Minimum_Accessibility);
pragma Inline (Modulus);
pragma Inline (Must_Be_On_Byte_Boundary);
pragma Inline (Must_Have_Preelab_Init);
pragma Inline (Needs_Activation_Record);
pragma Inline (Needs_Debug_Info);
pragma Inline (Needs_No_Actuals);
pragma Inline (Never_Set_In_Source);
pragma Inline (Next_Index);
pragma Inline (Next_Inlined_Subprogram);
pragma Inline (Next_Literal);
pragma Inline (Next_Stored_Discriminant);
pragma Inline (No_Dynamic_Predicate_On_Actual);
pragma Inline (No_Pool_Assigned);
pragma Inline (No_Predicate_On_Actual);
pragma Inline (No_Reordering);
pragma Inline (No_Return);
pragma Inline (No_Strict_Aliasing);
pragma Inline (No_Tagged_Streams_Pragma);
pragma Inline (Non_Binary_Modulus);
pragma Inline (Non_Limited_View);
pragma Inline (Nonzero_Is_True);
pragma Inline (Normalized_First_Bit);
pragma Inline (Normalized_Position);
pragma Inline (Normalized_Position_Max);
pragma Inline (OK_To_Rename);
pragma Inline (Optimize_Alignment_Space);
pragma Inline (Optimize_Alignment_Time);
pragma Inline (Original_Access_Type);
pragma Inline (Original_Array_Type);
pragma Inline (Original_Protected_Subprogram);
pragma Inline (Original_Record_Component);
pragma Inline (Overlays_Constant);
pragma Inline (Overridden_Operation);
pragma Inline (Package_Instantiation);
pragma Inline (Packed_Array_Impl_Type);
pragma Inline (Parameter_Mode);
pragma Inline (Parent_Subtype);
pragma Inline (Part_Of_Constituents);
pragma Inline (Part_Of_References);
pragma Inline (Partial_View_Has_Unknown_Discr);
pragma Inline (Pending_Access_Types);
pragma Inline (Postconditions_Proc);
pragma Inline (Predicated_Parent);
pragma Inline (Predicates_Ignored);
pragma Inline (Prev_Entity);
pragma Inline (Prival);
pragma Inline (Prival_Link);
pragma Inline (Private_Dependents);
pragma Inline (Protected_Body_Subprogram);
pragma Inline (Protected_Formal);
pragma Inline (Protected_Subprogram);
pragma Inline (Protection_Object);
pragma Inline (Reachable);
pragma Inline (Receiving_Entry);
pragma Inline (Referenced);
pragma Inline (Referenced_As_LHS);
pragma Inline (Referenced_As_Out_Parameter);
pragma Inline (Refinement_Constituents);
pragma Inline (Register_Exception_Call);
pragma Inline (Related_Array_Object);
pragma Inline (Related_Expression);
pragma Inline (Related_Instance);
pragma Inline (Related_Type);
pragma Inline (Relative_Deadline_Variable);
pragma Inline (Remove_Entity);
pragma Inline (Renamed_Entity);
pragma Inline (Renamed_In_Spec);
pragma Inline (Renamed_Object);
pragma Inline (Renaming_Map);
pragma Inline (Requires_Overriding);
pragma Inline (Return_Applies_To);
pragma Inline (Return_Present);
pragma Inline (Returns_By_Ref);
pragma Inline (Reverse_Bit_Order);
pragma Inline (Reverse_Storage_Order);
pragma Inline (Rewritten_For_C);
pragma Inline (RM_Size);
pragma Inline (Scalar_Range);
pragma Inline (Scale_Value);
pragma Inline (Scope_Depth_Value);
pragma Inline (Sec_Stack_Needed_For_Return);
pragma Inline (Shared_Var_Procs_Instance);
pragma Inline (Size_Check_Code);
pragma Inline (Size_Depends_On_Discriminant);
pragma Inline (Size_Known_At_Compile_Time);
pragma Inline (Small_Value);
pragma Inline (SPARK_Aux_Pragma);
pragma Inline (SPARK_Aux_Pragma_Inherited);
pragma Inline (SPARK_Pragma);
pragma Inline (SPARK_Pragma_Inherited);
pragma Inline (Spec_Entity);
pragma Inline (SSO_Set_High_By_Default);
pragma Inline (SSO_Set_Low_By_Default);
pragma Inline (Static_Discrete_Predicate);
pragma Inline (Static_Elaboration_Desired);
pragma Inline (Static_Initialization);
pragma Inline (Static_Real_Or_String_Predicate);
pragma Inline (Status_Flag_Or_Transient_Decl);
pragma Inline (Storage_Size_Variable);
pragma Inline (Stored_Constraint);
pragma Inline (Stores_Attribute_Old_Prefix);
pragma Inline (Strict_Alignment);
pragma Inline (String_Literal_Length);
pragma Inline (String_Literal_Low_Bound);
pragma Inline (Subprograms_For_Type);
pragma Inline (Subps_Index);
pragma Inline (Suppress_Elaboration_Warnings);
pragma Inline (Suppress_Initialization);
pragma Inline (Suppress_Style_Checks);
pragma Inline (Suppress_Value_Tracking_On_Call);
pragma Inline (Task_Body_Procedure);
pragma Inline (Thunk_Entity);
pragma Inline (Treat_As_Volatile);
pragma Inline (Underlying_Full_View);
pragma Inline (Underlying_Record_View);
pragma Inline (Universal_Aliasing);
pragma Inline (Unlink_Next_Entity);
pragma Inline (Unset_Reference);
pragma Inline (Used_As_Generic_Actual);
pragma Inline (Uses_Lock_Free);
pragma Inline (Uses_Sec_Stack);
pragma Inline (Validated_Object);
pragma Inline (Warnings_Off);
pragma Inline (Warnings_Off_Used);
pragma Inline (Warnings_Off_Used_Unmodified);
pragma Inline (Warnings_Off_Used_Unreferenced);
pragma Inline (Was_Hidden);
pragma Inline (Wrapped_Entity);
-- END XEINFO INLINES
-- The following Inline pragmas are *not* read by XEINFO when building the
-- C version of this interface automatically (so the C version will end up
-- making out of line calls). The pragma scan in XEINFO will be terminated
-- on encountering the END XEINFO INLINES line. We inline things here which
-- are small, but not of the canonical attribute access/set format that can
-- be handled by XEINFO.
pragma Inline (Address_Clause);
pragma Inline (Alignment_Clause);
pragma Inline (Base_Type);
pragma Inline (Float_Rep);
pragma Inline (Has_Foreign_Convention);
pragma Inline (Has_Non_Limited_View);
pragma Inline (Is_Base_Type);
pragma Inline (Is_Boolean_Type);
pragma Inline (Is_Constant_Object);
pragma Inline (Is_Controlled);
pragma Inline (Is_Discriminal);
pragma Inline (Is_Entity_Name);
pragma Inline (Is_Finalizer);
pragma Inline (Is_Null_State);
pragma Inline (Is_Package_Or_Generic_Package);
pragma Inline (Is_Packed_Array);
pragma Inline (Is_Prival);
pragma Inline (Is_Protected_Component);
pragma Inline (Is_Protected_Record_Type);
pragma Inline (Is_String_Type);
pragma Inline (Is_Task_Record_Type);
pragma Inline (Is_Volatile);
pragma Inline (Is_Wrapper_Package);
pragma Inline (Scope_Depth);
pragma Inline (Scope_Depth_Set);
pragma Inline (Size_Clause);
pragma Inline (Stream_Size_Clause);
pragma Inline (Type_High_Bound);
pragma Inline (Type_Low_Bound);
pragma Inline (Known_Alignment);
pragma Inline (Known_Component_Bit_Offset);
pragma Inline (Known_Component_Size);
pragma Inline (Known_Esize);
pragma Inline (Known_Normalized_First_Bit);
pragma Inline (Known_Normalized_Position);
pragma Inline (Known_Normalized_Position_Max);
pragma Inline (Known_RM_Size);
pragma Inline (Known_Static_Component_Bit_Offset);
pragma Inline (Known_Static_Component_Size);
pragma Inline (Known_Static_Esize);
pragma Inline (Known_Static_Normalized_First_Bit);
pragma Inline (Known_Static_Normalized_Position);
pragma Inline (Known_Static_Normalized_Position_Max);
pragma Inline (Known_Static_RM_Size);
pragma Inline (Unknown_Alignment);
pragma Inline (Unknown_Component_Bit_Offset);
pragma Inline (Unknown_Component_Size);
pragma Inline (Unknown_Esize);
pragma Inline (Unknown_Normalized_First_Bit);
pragma Inline (Unknown_Normalized_Position);
pragma Inline (Unknown_Normalized_Position_Max);
pragma Inline (Unknown_RM_Size);
-----------------------------------
-- Inline Pragmas for procedures --
-----------------------------------
-- The following inline pragmas are *not* referenced by the XEINFO utility
-- program in preparing the corresponding C header, and therefore do *not*
-- need to meet the requirements documented in the section on XEINFO.
pragma Inline (Set_Abstract_States);
pragma Inline (Set_Accept_Address);
pragma Inline (Set_Access_Disp_Table);
pragma Inline (Set_Access_Disp_Table_Elab_Flag);
pragma Inline (Set_Access_Subprogram_Wrapper);
pragma Inline (Set_Activation_Record_Component);
pragma Inline (Set_Actual_Subtype);
pragma Inline (Set_Address_Taken);
pragma Inline (Set_Alias);
pragma Inline (Set_Alignment);
pragma Inline (Set_Anonymous_Designated_Type);
pragma Inline (Set_Anonymous_Masters);
pragma Inline (Set_Anonymous_Object);
pragma Inline (Set_Associated_Entity);
pragma Inline (Set_Associated_Formal_Package);
pragma Inline (Set_Associated_Node_For_Itype);
pragma Inline (Set_Associated_Storage_Pool);
pragma Inline (Set_Barrier_Function);
pragma Inline (Set_BIP_Initialization_Call);
pragma Inline (Set_Block_Node);
pragma Inline (Set_Body_Entity);
pragma Inline (Set_Body_Needed_For_Inlining);
pragma Inline (Set_Body_Needed_For_SAL);
pragma Inline (Set_Body_References);
pragma Inline (Set_C_Pass_By_Copy);
pragma Inline (Set_Can_Never_Be_Null);
pragma Inline (Set_Can_Use_Internal_Rep);
pragma Inline (Set_Checks_May_Be_Suppressed);
pragma Inline (Set_Class_Wide_Clone);
pragma Inline (Set_Class_Wide_Type);
pragma Inline (Set_Cloned_Subtype);
pragma Inline (Set_Component_Bit_Offset);
pragma Inline (Set_Component_Clause);
pragma Inline (Set_Component_Size);
pragma Inline (Set_Component_Type);
pragma Inline (Set_Contains_Ignored_Ghost_Code);
pragma Inline (Set_Contract);
pragma Inline (Set_Contract_Wrapper);
pragma Inline (Set_Corresponding_Concurrent_Type);
pragma Inline (Set_Corresponding_Discriminant);
pragma Inline (Set_Corresponding_Equality);
pragma Inline (Set_Corresponding_Function);
pragma Inline (Set_Corresponding_Procedure);
pragma Inline (Set_Corresponding_Protected_Entry);
pragma Inline (Set_Corresponding_Record_Component);
pragma Inline (Set_Corresponding_Record_Type);
pragma Inline (Set_Corresponding_Remote_Type);
pragma Inline (Set_CR_Discriminant);
pragma Inline (Set_Current_Use_Clause);
pragma Inline (Set_Current_Value);
pragma Inline (Set_Debug_Info_Off);
pragma Inline (Set_Debug_Renaming_Link);
pragma Inline (Set_Default_Aspect_Component_Value);
pragma Inline (Set_Default_Aspect_Value);
pragma Inline (Set_Default_Expr_Function);
pragma Inline (Set_Default_Expressions_Processed);
pragma Inline (Set_Default_Value);
pragma Inline (Set_Delay_Cleanups);
pragma Inline (Set_Delay_Subprogram_Descriptors);
pragma Inline (Set_Delta_Value);
pragma Inline (Set_Dependent_Instances);
pragma Inline (Set_Depends_On_Private);
pragma Inline (Set_Derived_Type_Link);
pragma Inline (Set_Digits_Value);
pragma Inline (Set_Direct_Primitive_Operations);
pragma Inline (Set_Directly_Designated_Type);
pragma Inline (Set_Disable_Controlled);
pragma Inline (Set_Discard_Names);
pragma Inline (Set_Discriminal);
pragma Inline (Set_Discriminal_Link);
pragma Inline (Set_Discriminant_Checking_Func);
pragma Inline (Set_Discriminant_Constraint);
pragma Inline (Set_Discriminant_Default_Value);
pragma Inline (Set_Discriminant_Number);
pragma Inline (Set_Dispatch_Table_Wrappers);
pragma Inline (Set_DT_Entry_Count);
pragma Inline (Set_DT_Offset_To_Top_Func);
pragma Inline (Set_DT_Position);
pragma Inline (Set_DTC_Entity);
pragma Inline (Set_Elaborate_Body_Desirable);
pragma Inline (Set_Elaboration_Entity);
pragma Inline (Set_Elaboration_Entity_Required);
pragma Inline (Set_Encapsulating_State);
pragma Inline (Set_Enclosing_Scope);
pragma Inline (Set_Entry_Accepted);
pragma Inline (Set_Entry_Bodies_Array);
pragma Inline (Set_Entry_Cancel_Parameter);
pragma Inline (Set_Entry_Component);
pragma Inline (Set_Entry_Formal);
pragma Inline (Set_Entry_Max_Queue_Lengths_Array);
pragma Inline (Set_Entry_Parameters_Type);
pragma Inline (Set_Enum_Pos_To_Rep);
pragma Inline (Set_Enumeration_Pos);
pragma Inline (Set_Enumeration_Rep);
pragma Inline (Set_Enumeration_Rep_Expr);
pragma Inline (Set_Equivalent_Type);
pragma Inline (Set_Esize);
pragma Inline (Set_Extra_Accessibility);
pragma Inline (Set_Extra_Accessibility_Of_Result);
pragma Inline (Set_Extra_Constrained);
pragma Inline (Set_Extra_Formal);
pragma Inline (Set_Extra_Formals);
pragma Inline (Set_Finalize_Storage_Only);
pragma Inline (Set_Finalization_Master);
pragma Inline (Set_Finalizer);
pragma Inline (Set_First_Entity);
pragma Inline (Set_First_Exit_Statement);
pragma Inline (Set_First_Index);
pragma Inline (Set_First_Literal);
pragma Inline (Set_First_Private_Entity);
pragma Inline (Set_First_Rep_Item);
pragma Inline (Set_Float_Rep);
pragma Inline (Set_Freeze_Node);
pragma Inline (Set_From_Limited_With);
pragma Inline (Set_Full_View);
pragma Inline (Set_Generic_Homonym);
pragma Inline (Set_Generic_Renamings);
pragma Inline (Set_Handler_Records);
pragma Inline (Set_Has_Aliased_Components);
pragma Inline (Set_Has_Alignment_Clause);
pragma Inline (Set_Has_All_Calls_Remote);
pragma Inline (Set_Has_Atomic_Components);
pragma Inline (Set_Has_Biased_Representation);
pragma Inline (Set_Has_Completion);
pragma Inline (Set_Has_Completion_In_Body);
pragma Inline (Set_Has_Complex_Representation);
pragma Inline (Set_Has_Component_Size_Clause);
pragma Inline (Set_Has_Constrained_Partial_View);
pragma Inline (Set_Has_Contiguous_Rep);
pragma Inline (Set_Has_Controlled_Component);
pragma Inline (Set_Has_Controlling_Result);
pragma Inline (Set_Has_Convention_Pragma);
pragma Inline (Set_Has_Default_Aspect);
pragma Inline (Set_Has_Delayed_Aspects);
pragma Inline (Set_Has_Delayed_Freeze);
pragma Inline (Set_Has_Delayed_Rep_Aspects);
pragma Inline (Set_Has_Discriminants);
pragma Inline (Set_Has_Dispatch_Table);
pragma Inline (Set_Has_Dynamic_Predicate_Aspect);
pragma Inline (Set_Has_Enumeration_Rep_Clause);
pragma Inline (Set_Has_Exit);
pragma Inline (Set_Has_Expanded_Contract);
pragma Inline (Set_Has_Forward_Instantiation);
pragma Inline (Set_Has_Fully_Qualified_Name);
pragma Inline (Set_Has_Gigi_Rep_Item);
pragma Inline (Set_Has_Homonym);
pragma Inline (Set_Has_Implicit_Dereference);
pragma Inline (Set_Has_Independent_Components);
pragma Inline (Set_Has_Inheritable_Invariants);
pragma Inline (Set_Has_Inherited_DIC);
pragma Inline (Set_Has_Inherited_Invariants);
pragma Inline (Set_Has_Initial_Value);
pragma Inline (Set_Has_Loop_Entry_Attributes);
pragma Inline (Set_Has_Machine_Radix_Clause);
pragma Inline (Set_Has_Master_Entity);
pragma Inline (Set_Has_Missing_Return);
pragma Inline (Set_Has_Nested_Block_With_Handler);
pragma Inline (Set_Has_Nested_Subprogram);
pragma Inline (Set_Has_Non_Standard_Rep);
pragma Inline (Set_Has_Object_Size_Clause);
pragma Inline (Set_Has_Out_Or_In_Out_Parameter);
pragma Inline (Set_Has_Own_DIC);
pragma Inline (Set_Has_Own_Invariants);
pragma Inline (Set_Has_Partial_Visible_Refinement);
pragma Inline (Set_Has_Per_Object_Constraint);
pragma Inline (Set_Has_Pragma_Controlled);
pragma Inline (Set_Has_Pragma_Elaborate_Body);
pragma Inline (Set_Has_Pragma_Inline);
pragma Inline (Set_Has_Pragma_Inline_Always);
pragma Inline (Set_Has_Pragma_No_Inline);
pragma Inline (Set_Has_Pragma_Ordered);
pragma Inline (Set_Has_Pragma_Pack);
pragma Inline (Set_Has_Pragma_Preelab_Init);
pragma Inline (Set_Has_Pragma_Pure);
pragma Inline (Set_Has_Pragma_Pure_Function);
pragma Inline (Set_Has_Pragma_Thread_Local_Storage);
pragma Inline (Set_Has_Pragma_Unmodified);
pragma Inline (Set_Has_Pragma_Unreferenced);
pragma Inline (Set_Has_Pragma_Unreferenced_Objects);
pragma Inline (Set_Has_Predicates);
pragma Inline (Set_Has_Primitive_Operations);
pragma Inline (Set_Has_Private_Ancestor);
pragma Inline (Set_Has_Private_Declaration);
pragma Inline (Set_Has_Private_Extension);
pragma Inline (Set_Has_Protected);
pragma Inline (Set_Has_Qualified_Name);
pragma Inline (Set_Has_RACW);
pragma Inline (Set_Has_Record_Rep_Clause);
pragma Inline (Set_Has_Recursive_Call);
pragma Inline (Set_Has_Shift_Operator);
pragma Inline (Set_Has_Size_Clause);
pragma Inline (Set_Has_Small_Clause);
pragma Inline (Set_Has_Specified_Layout);
pragma Inline (Set_Has_Specified_Stream_Input);
pragma Inline (Set_Has_Specified_Stream_Output);
pragma Inline (Set_Has_Specified_Stream_Read);
pragma Inline (Set_Has_Specified_Stream_Write);
pragma Inline (Set_Has_Static_Discriminants);
pragma Inline (Set_Has_Static_Predicate);
pragma Inline (Set_Has_Static_Predicate_Aspect);
pragma Inline (Set_Has_Storage_Size_Clause);
pragma Inline (Set_Has_Stream_Size_Clause);
pragma Inline (Set_Has_Task);
pragma Inline (Set_Has_Timing_Event);
pragma Inline (Set_Has_Thunks);
pragma Inline (Set_Has_Unchecked_Union);
pragma Inline (Set_Has_Unknown_Discriminants);
pragma Inline (Set_Has_Visible_Refinement);
pragma Inline (Set_Has_Volatile_Components);
pragma Inline (Set_Has_Xref_Entry);
pragma Inline (Set_Has_Yield_Aspect);
pragma Inline (Set_Hiding_Loop_Variable);
pragma Inline (Set_Hidden_In_Formal_Instance);
pragma Inline (Set_Homonym);
pragma Inline (Set_Ignore_SPARK_Mode_Pragmas);
pragma Inline (Set_Import_Pragma);
pragma Inline (Set_Incomplete_Actuals);
pragma Inline (Set_In_Package_Body);
pragma Inline (Set_In_Private_Part);
pragma Inline (Set_In_Use);
pragma Inline (Set_Initialization_Statements);
pragma Inline (Set_Inner_Instances);
pragma Inline (Set_Interface_Alias);
pragma Inline (Set_Interface_Name);
pragma Inline (Set_Interfaces);
pragma Inline (Set_Is_Abstract_Subprogram);
pragma Inline (Set_Is_Abstract_Type);
pragma Inline (Set_Is_Access_Constant);
pragma Inline (Set_Is_Activation_Record);
pragma Inline (Set_Is_Actual_Subtype);
pragma Inline (Set_Is_Ada_2005_Only);
pragma Inline (Set_Is_Ada_2012_Only);
pragma Inline (Set_Is_Aliased);
pragma Inline (Set_Is_Asynchronous);
pragma Inline (Set_Is_Atomic);
pragma Inline (Set_Is_Bit_Packed_Array);
pragma Inline (Set_Is_Called);
pragma Inline (Set_Is_Character_Type);
pragma Inline (Set_Is_Checked_Ghost_Entity);
pragma Inline (Set_Is_Child_Unit);
pragma Inline (Set_Is_Class_Wide_Clone);
pragma Inline (Set_Is_Class_Wide_Equivalent_Type);
pragma Inline (Set_Is_Compilation_Unit);
pragma Inline (Set_Is_Completely_Hidden);
pragma Inline (Set_Is_Concurrent_Record_Type);
pragma Inline (Set_Is_Constr_Subt_For_U_Nominal);
pragma Inline (Set_Is_Constr_Subt_For_UN_Aliased);
pragma Inline (Set_Is_Constrained);
pragma Inline (Set_Is_Constructor);
pragma Inline (Set_Is_Controlled_Active);
pragma Inline (Set_Is_Controlling_Formal);
pragma Inline (Set_Is_CPP_Class);
pragma Inline (Set_Is_CUDA_Kernel);
pragma Inline (Set_Is_Descendant_Of_Address);
pragma Inline (Set_Is_DIC_Procedure);
pragma Inline (Set_Is_Discrim_SO_Function);
pragma Inline (Set_Is_Discriminant_Check_Function);
pragma Inline (Set_Is_Dispatch_Table_Entity);
pragma Inline (Set_Is_Dispatching_Operation);
pragma Inline (Set_Is_Elaboration_Checks_OK_Id);
pragma Inline (Set_Is_Elaboration_Warnings_OK_Id);
pragma Inline (Set_Is_Eliminated);
pragma Inline (Set_Is_Entry_Formal);
pragma Inline (Set_Is_Entry_Wrapper);
pragma Inline (Set_Is_Exception_Handler);
pragma Inline (Set_Is_Exported);
pragma Inline (Set_Is_Finalized_Transient);
pragma Inline (Set_Is_First_Subtype);
pragma Inline (Set_Is_Formal_Subprogram);
pragma Inline (Set_Is_Frozen);
pragma Inline (Set_Is_Generic_Actual_Subprogram);
pragma Inline (Set_Is_Generic_Actual_Type);
pragma Inline (Set_Is_Generic_Instance);
pragma Inline (Set_Is_Generic_Type);
pragma Inline (Set_Is_Hidden);
pragma Inline (Set_Is_Hidden_Non_Overridden_Subpgm);
pragma Inline (Set_Is_Hidden_Open_Scope);
pragma Inline (Set_Is_Ignored_Ghost_Entity);
pragma Inline (Set_Is_Ignored_Transient);
pragma Inline (Set_Is_Immediately_Visible);
pragma Inline (Set_Is_Implementation_Defined);
pragma Inline (Set_Is_Imported);
pragma Inline (Set_Is_Independent);
pragma Inline (Set_Is_Initial_Condition_Procedure);
pragma Inline (Set_Is_Inlined);
pragma Inline (Set_Is_Inlined_Always);
pragma Inline (Set_Is_Instantiated);
pragma Inline (Set_Is_Interface);
pragma Inline (Set_Is_Internal);
pragma Inline (Set_Is_Interrupt_Handler);
pragma Inline (Set_Is_Intrinsic_Subprogram);
pragma Inline (Set_Is_Invariant_Procedure);
pragma Inline (Set_Is_Itype);
pragma Inline (Set_Is_Known_Non_Null);
pragma Inline (Set_Is_Known_Null);
pragma Inline (Set_Is_Known_Valid);
pragma Inline (Set_Is_Limited_Composite);
pragma Inline (Set_Is_Limited_Interface);
pragma Inline (Set_Is_Limited_Record);
pragma Inline (Set_Is_Local_Anonymous_Access);
pragma Inline (Set_Is_Loop_Parameter);
pragma Inline (Set_Is_Machine_Code_Subprogram);
pragma Inline (Set_Is_Non_Static_Subtype);
pragma Inline (Set_Is_Null_Init_Proc);
pragma Inline (Set_Is_Obsolescent);
pragma Inline (Set_Is_Only_Out_Parameter);
pragma Inline (Set_Is_Package_Body_Entity);
pragma Inline (Set_Is_Packed);
pragma Inline (Set_Is_Packed_Array_Impl_Type);
pragma Inline (Set_Is_Param_Block_Component_Type);
pragma Inline (Set_Is_Partial_Invariant_Procedure);
pragma Inline (Set_Is_Potentially_Use_Visible);
pragma Inline (Set_Is_Predicate_Function);
pragma Inline (Set_Is_Predicate_Function_M);
pragma Inline (Set_Is_Preelaborated);
pragma Inline (Set_Is_Primitive);
pragma Inline (Set_Is_Primitive_Wrapper);
pragma Inline (Set_Is_Private_Composite);
pragma Inline (Set_Is_Private_Descendant);
pragma Inline (Set_Is_Private_Primitive);
pragma Inline (Set_Is_Public);
pragma Inline (Set_Is_Pure);
pragma Inline (Set_Is_Pure_Unit_Access_Type);
pragma Inline (Set_Is_RACW_Stub_Type);
pragma Inline (Set_Is_Raised);
pragma Inline (Set_Is_Remote_Call_Interface);
pragma Inline (Set_Is_Remote_Types);
pragma Inline (Set_Is_Renaming_Of_Object);
pragma Inline (Set_Is_Return_Object);
pragma Inline (Set_Is_Safe_To_Reevaluate);
pragma Inline (Set_Is_Shared_Passive);
pragma Inline (Set_Is_Static_Type);
pragma Inline (Set_Is_Statically_Allocated);
pragma Inline (Set_Is_Tag);
pragma Inline (Set_Is_Tagged_Type);
pragma Inline (Set_Is_Thunk);
pragma Inline (Set_Is_Trivial_Subprogram);
pragma Inline (Set_Is_True_Constant);
pragma Inline (Set_Is_Unchecked_Union);
pragma Inline (Set_Is_Underlying_Full_View);
pragma Inline (Set_Is_Underlying_Record_View);
pragma Inline (Set_Is_Unimplemented);
pragma Inline (Set_Is_Unsigned_Type);
pragma Inline (Set_Is_Uplevel_Referenced_Entity);
pragma Inline (Set_Is_Valued_Procedure);
pragma Inline (Set_Is_Visible_Formal);
pragma Inline (Set_Is_Visible_Lib_Unit);
pragma Inline (Set_Is_Volatile);
pragma Inline (Set_Is_Volatile_Full_Access);
pragma Inline (Set_Itype_Printed);
pragma Inline (Set_Kill_Elaboration_Checks);
pragma Inline (Set_Kill_Range_Checks);
pragma Inline (Set_Known_To_Have_Preelab_Init);
pragma Inline (Set_Last_Aggregate_Assignment);
pragma Inline (Set_Last_Assignment);
pragma Inline (Set_Last_Entity);
pragma Inline (Set_Limited_View);
pragma Inline (Set_Linker_Section_Pragma);
pragma Inline (Set_Lit_Indexes);
pragma Inline (Set_Lit_Strings);
pragma Inline (Set_Low_Bound_Tested);
pragma Inline (Set_Machine_Radix_10);
pragma Inline (Set_Master_Id);
pragma Inline (Set_Materialize_Entity);
pragma Inline (Set_May_Inherit_Delayed_Rep_Aspects);
pragma Inline (Set_Mechanism);
pragma Inline (Set_Minimum_Accessibility);
pragma Inline (Set_Modulus);
pragma Inline (Set_Must_Be_On_Byte_Boundary);
pragma Inline (Set_Must_Have_Preelab_Init);
pragma Inline (Set_Needs_Activation_Record);
pragma Inline (Set_Needs_Debug_Info);
pragma Inline (Set_Needs_No_Actuals);
pragma Inline (Set_Never_Set_In_Source);
pragma Inline (Set_Next_Inlined_Subprogram);
pragma Inline (Set_No_Dynamic_Predicate_On_Actual);
pragma Inline (Set_No_Pool_Assigned);
pragma Inline (Set_No_Predicate_On_Actual);
pragma Inline (Set_No_Reordering);
pragma Inline (Set_No_Return);
pragma Inline (Set_No_Strict_Aliasing);
pragma Inline (Set_No_Tagged_Streams_Pragma);
pragma Inline (Set_Non_Binary_Modulus);
pragma Inline (Set_Non_Limited_View);
pragma Inline (Set_Nonzero_Is_True);
pragma Inline (Set_Normalized_First_Bit);
pragma Inline (Set_Normalized_Position);
pragma Inline (Set_Normalized_Position_Max);
pragma Inline (Set_OK_To_Rename);
pragma Inline (Set_Optimize_Alignment_Space);
pragma Inline (Set_Optimize_Alignment_Time);
pragma Inline (Set_Original_Access_Type);
pragma Inline (Set_Original_Array_Type);
pragma Inline (Set_Original_Protected_Subprogram);
pragma Inline (Set_Original_Record_Component);
pragma Inline (Set_Overlays_Constant);
pragma Inline (Set_Overridden_Operation);
pragma Inline (Set_Package_Instantiation);
pragma Inline (Set_Packed_Array_Impl_Type);
pragma Inline (Set_Parent_Subtype);
pragma Inline (Set_Part_Of_Constituents);
pragma Inline (Set_Part_Of_References);
pragma Inline (Set_Partial_View_Has_Unknown_Discr);
pragma Inline (Set_Pending_Access_Types);
pragma Inline (Set_Postconditions_Proc);
pragma Inline (Set_Predicated_Parent);
pragma Inline (Set_Predicates_Ignored);
pragma Inline (Set_Prev_Entity);
pragma Inline (Set_Prival);
pragma Inline (Set_Prival_Link);
pragma Inline (Set_Private_Dependents);
pragma Inline (Set_Protected_Body_Subprogram);
pragma Inline (Set_Protected_Formal);
pragma Inline (Set_Protected_Subprogram);
pragma Inline (Set_Protection_Object);
pragma Inline (Set_Reachable);
pragma Inline (Set_Receiving_Entry);
pragma Inline (Set_Referenced);
pragma Inline (Set_Referenced_As_LHS);
pragma Inline (Set_Referenced_As_Out_Parameter);
pragma Inline (Set_Refinement_Constituents);
pragma Inline (Set_Register_Exception_Call);
pragma Inline (Set_Related_Array_Object);
pragma Inline (Set_Related_Expression);
pragma Inline (Set_Related_Instance);
pragma Inline (Set_Related_Type);
pragma Inline (Set_Relative_Deadline_Variable);
pragma Inline (Set_Renamed_Entity);
pragma Inline (Set_Renamed_In_Spec);
pragma Inline (Set_Renamed_Object);
pragma Inline (Set_Renaming_Map);
pragma Inline (Set_Requires_Overriding);
pragma Inline (Set_Return_Applies_To);
pragma Inline (Set_Return_Present);
pragma Inline (Set_Returns_By_Ref);
pragma Inline (Set_Reverse_Bit_Order);
pragma Inline (Set_Reverse_Storage_Order);
pragma Inline (Set_Rewritten_For_C);
pragma Inline (Set_RM_Size);
pragma Inline (Set_Scalar_Range);
pragma Inline (Set_Scale_Value);
pragma Inline (Set_Scope_Depth_Value);
pragma Inline (Set_Sec_Stack_Needed_For_Return);
pragma Inline (Set_Shared_Var_Procs_Instance);
pragma Inline (Set_Size_Check_Code);
pragma Inline (Set_Size_Depends_On_Discriminant);
pragma Inline (Set_Size_Known_At_Compile_Time);
pragma Inline (Set_Small_Value);
pragma Inline (Set_SPARK_Aux_Pragma);
pragma Inline (Set_SPARK_Aux_Pragma_Inherited);
pragma Inline (Set_SPARK_Pragma);
pragma Inline (Set_SPARK_Pragma_Inherited);
pragma Inline (Set_Spec_Entity);
pragma Inline (Set_SSO_Set_High_By_Default);
pragma Inline (Set_SSO_Set_Low_By_Default);
pragma Inline (Set_Static_Discrete_Predicate);
pragma Inline (Set_Static_Elaboration_Desired);
pragma Inline (Set_Static_Initialization);
pragma Inline (Set_Static_Real_Or_String_Predicate);
pragma Inline (Set_Status_Flag_Or_Transient_Decl);
pragma Inline (Set_Storage_Size_Variable);
pragma Inline (Set_Stored_Constraint);
pragma Inline (Set_Stores_Attribute_Old_Prefix);
pragma Inline (Set_Strict_Alignment);
pragma Inline (Set_String_Literal_Length);
pragma Inline (Set_String_Literal_Low_Bound);
pragma Inline (Set_Subprograms_For_Type);
pragma Inline (Set_Subps_Index);
pragma Inline (Set_Suppress_Elaboration_Warnings);
pragma Inline (Set_Suppress_Initialization);
pragma Inline (Set_Suppress_Style_Checks);
pragma Inline (Set_Suppress_Value_Tracking_On_Call);
pragma Inline (Set_Task_Body_Procedure);
pragma Inline (Set_Thunk_Entity);
pragma Inline (Set_Treat_As_Volatile);
pragma Inline (Set_Underlying_Full_View);
pragma Inline (Set_Underlying_Record_View);
pragma Inline (Set_Universal_Aliasing);
pragma Inline (Set_Unset_Reference);
pragma Inline (Set_Used_As_Generic_Actual);
pragma Inline (Set_Uses_Lock_Free);
pragma Inline (Set_Uses_Sec_Stack);
pragma Inline (Set_Validated_Object);
pragma Inline (Set_Warnings_Off);
pragma Inline (Set_Warnings_Off_Used);
pragma Inline (Set_Warnings_Off_Used_Unmodified);
pragma Inline (Set_Warnings_Off_Used_Unreferenced);
pragma Inline (Set_Was_Hidden);
pragma Inline (Set_Wrapped_Entity);
pragma Inline (Init_Alignment);
pragma Inline (Init_Component_Bit_Offset);
pragma Inline (Init_Component_Size);
pragma Inline (Init_Digits_Value);
pragma Inline (Init_Esize);
pragma Inline (Init_Normalized_First_Bit);
pragma Inline (Init_Normalized_Position);
pragma Inline (Init_Normalized_Position_Max);
pragma Inline (Init_RM_Size);
end Einfo;
|
orka/src/orka/interface/orka-inputs-joysticks-sequences.ads | onox/orka | 52 | 5681 | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2019 onox <<EMAIL>>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
package Orka.Inputs.Joysticks.Sequences is
subtype Sequence_Button_Index is Positive range 1 .. 16;
type Button_Index_Array is array (Sequence_Button_Index range <>) of Button_Index;
type Sequence (<>) is tagged private;
function Create_Sequence
(Buttons : Button_Index_Array;
Max_Time : Duration) return Sequence
with Pre => Buttons'Length >= 2;
-- Return a sequence for the given button indices, which must be
-- pressed one after another within a certain duration
function Detect_Activation
(Object : in out Sequence;
Joystick : Joystick_Input'Class) return Boolean;
-- Return True if the buttons in the sequence have been pressed,
-- False otherwise
private
type Sequence (Button_Count : Positive) is tagged record
Buttons : Button_Index_Array (1 .. Button_Count);
Index : Sequence_Button_Index;
Max_Time : Duration;
Start_Press : Time;
end record;
end Orka.Inputs.Joysticks.Sequences;
|
programs/oeis/001/A001847.asm | neoneye/loda | 22 | 163269 | ; A001847: Crystal ball sequence for 5-dimensional cubic lattice.
; 1,11,61,231,681,1683,3653,7183,13073,22363,36365,56695,85305,124515,177045,246047,335137,448427,590557,766727,982729,1244979,1560549,1937199,2383409,2908411,3522221,4235671,5060441,6009091,7095093,8332863,9737793,11326283,13115773,15124775,17372905,19880915,22670725,25765455,29189457,32968347,37129037,41699767,46710137,52191139,58175189,64696159,71789409,79491819,87841821,96879431,106646281,117185651,128542501,140763503,153897073,167993403,183104493,199284183,216588185,235074115,254801525,275831935,298228865,322057867,347386557,374284647,402823977,433078547,465124549,499040399,534906769,572806619,612825229,655050231,699571641,746481891,795875861,847850911,902506913,959946283,1020274013,1083597703,1150027593,1219676595,1292660325,1369097135,1449108145,1532817275,1620351277,1711839767,1807415257,1907213187,2011371957,2120032959,2233340609,2351442379,2474488829,2602633639
mov $1,1
lpb $0
mov $2,$0
sub $0,1
seq $2,8413 ; Coordination sequence for 5-dimensional cubic lattice.
add $1,$2
lpe
mov $0,$1
|
oeis/028/A028012.asm | neoneye/loda-programs | 11 | 89583 | ; A028012: Expansion of 1/((1-2x)(1-7x)(1-10x)(1-11x)).
; Submitted by <NAME>
; 1,30,587,9504,138369,1883826,24504439,308525268,3791612957,45742587462,543912376371,6393243539592,74447130731065,860268600608538,9877405744657583,112802621156970876,1282386938486825493
mov $1,1
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,16325 ; Expansion of 1/((1-2x)(1-10x)(1-11x)).
mul $1,7
add $1,$0
lpe
mov $0,$1
|
makeKeywordFromAlbum.scpt | regenschein71/ApertureExport | 1 | 4152 | -- Take the project of the first image in the selection, get the project for image
-- Find all folders that begin with "keyword-" in that project, then go through all albums in this folder.
-- For each image in every album, set the name of the album as keyword with the words in the
-- parent folder as parent keywords
-- (which is "SubLocation" in Aperture")
--
-- Example?
--
-- ProjectX
-- |- Folder "keyword-Actions"
-- |-- Album "Swimming"
-- |-- Album "Dancing"
--
-- When selecting any picture in the project, the script will apply the keyword "Actions->Swimming" to
-- all images in the "Swimming" folder and "Actions->Dancing" to all images in the "Dancing" folder.
tell application "Aperture"
copy selection to theSelection
set theImage to first item of theSelection
set theProject to get value of other tag "MasterProject" of theImage
set keywordFolders to every subfolder of theProject whose name begins with "Keyword-"
end tell
set progress total steps to (count of keywordFolders)
set progress description to "Adding keywords to images"
set progress completed steps to 0
set numProcessed to 0
repeat with keywordFolder in keywordFolders
tell application "Aperture"
set theAlbums to every album of keywordFolder
get properties of keywordFolder
set foldername to (name of keywordFolder)
set parentKeywords to my getParentKeywords(foldername)
repeat with theAlbum in theAlbums
set albumName to name of theAlbum
log "Processing images in album " & albumName
set theVersions to every image version in theAlbum
repeat with theVersion in theVersions
log (name of theVersion) & ": " & albumName & ", " & parentKeywords
tell theVersion
make new keyword with properties {name:albumName, parents:parentKeywords}
end tell
end repeat
end repeat
end tell
set numProcessed to numProcessed + 1
set progress completed steps to numProcessed
end repeat
on getParentKeywords(foldername)
set theList to my theSplit(foldername, "-")
if (count of theList) > 1 then
return theJoin(reverse of (items 2 through (count of theList) of theList), " ")
end if
return {}
end getParentKeywords
-----------------------------------------------------------------------
-- Split a string into a list
on theSplit(theString, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
set theArray to every text item of theString
-- restore the old setting
set AppleScript's text item delimiters to oldDelimiters
-- return the result
return theArray
end theSplit
-----------------------------------------------------------------------
-- Join a list to a single string using given delimiter
on theJoin(theList, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
set theString to theList as string
-- restore the old setting
set AppleScript's text item delimiters to oldDelimiters
-- return the result
return theString
end theJoin
|
src/presets/100map_menu.asm | idlechild/sm_practice_hack | 15 | 81153 | <reponame>idlechild/sm_practice_hack<filename>src/presets/100map_menu.asm
PresetsMenu100map:
dw #presets_goto_100map_varia
dw #presets_goto_100map_speed_booster
dw #presets_goto_100map_grapple
dw #presets_goto_100map_xray
dw #presets_goto_100map_phantoon
dw #presets_goto_100map_gravity
dw #presets_goto_100map_forgotten_highway
dw #presets_goto_100map_space_jump
dw #presets_goto_100map_maridia_cleanup
dw #presets_goto_100map_screw_attack
dw #presets_goto_100map_lower_norfair
dw #presets_goto_100map_cleanup_1
dw #presets_goto_100map_greenpink_brin_cleanup
dw #presets_goto_100map_blue_brinstar_cleanup
dw #presets_goto_100map_tourian
dw #$0000
%cm_header("MAP COMPLETION PRESETS")
presets_goto_100map_varia:
%cm_submenu("Varia", #presets_submenu_100map_varia)
presets_goto_100map_speed_booster:
%cm_submenu("Speed Booster", #presets_submenu_100map_speed_booster)
presets_goto_100map_grapple:
%cm_submenu("Grapple", #presets_submenu_100map_grapple)
presets_goto_100map_xray:
%cm_submenu("X-Ray", #presets_submenu_100map_xray)
presets_goto_100map_phantoon:
%cm_submenu("Phantoon", #presets_submenu_100map_phantoon)
presets_goto_100map_gravity:
%cm_submenu("Gravity", #presets_submenu_100map_gravity)
presets_goto_100map_forgotten_highway:
%cm_submenu("Forgotten Highway", #presets_submenu_100map_forgotten_highway)
presets_goto_100map_space_jump:
%cm_submenu("Space Jump", #presets_submenu_100map_space_jump)
presets_goto_100map_maridia_cleanup:
%cm_submenu("Maridia Cleanup", #presets_submenu_100map_maridia_cleanup)
presets_goto_100map_screw_attack:
%cm_submenu("Screw Attack", #presets_submenu_100map_screw_attack)
presets_goto_100map_lower_norfair:
%cm_submenu("Lower Norfair", #presets_submenu_100map_lower_norfair)
presets_goto_100map_cleanup_1:
%cm_submenu("Cleanup 1", #presets_submenu_100map_cleanup_1)
presets_goto_100map_greenpink_brin_cleanup:
%cm_submenu("Green-Pink Brin Cleanup", #presets_submenu_100map_greenpink_brin_cleanup)
presets_goto_100map_blue_brinstar_cleanup:
%cm_submenu("Blue Brinstar Cleanup", #presets_submenu_100map_blue_brinstar_cleanup)
presets_goto_100map_tourian:
%cm_submenu("Tourian", #presets_submenu_100map_tourian)
presets_submenu_100map_varia:
dw #presets_100map_varia_landing_site
dw #presets_100map_varia_morph
dw #presets_100map_varia_pit_room
dw #presets_100map_varia_bombs
dw #presets_100map_varia_alcatraz
dw #presets_100map_varia_early_supers
dw #presets_100map_varia_brinstar_reserve
dw #presets_100map_varia_reverse_mockball
dw #presets_100map_varia_green_hill_zone
dw #presets_100map_varia_red_tower_down
dw #presets_100map_varia_kraid_entrance
dw #presets_100map_varia_kraid_kihunter_room
dw #presets_100map_varia_kihunter_room_2
dw #presets_100map_varia_kraid
dw #$0000
%cm_header("VARIA")
presets_submenu_100map_speed_booster:
dw #presets_100map_speed_booster_kraid_dboost_room_out
dw #presets_100map_speed_booster_leaving_kraid_refill
dw #presets_100map_speed_booster_kihunter_room_leaving
dw #presets_100map_speed_booster_mouthball
dw #presets_100map_speed_booster_precathedral
dw #presets_100map_speed_booster_cathedral
dw #presets_100map_speed_booster_bubble_mountain
dw #presets_100map_speed_booster_bubble_mountain_climb
dw #presets_100map_speed_booster_bat_cave
dw #presets_100map_speed_booster_speed_hallway_in
dw #presets_100map_speed_booster_speed_booster_2
dw #$0000
%cm_header("SPEED BOOSTER")
presets_submenu_100map_grapple:
dw #presets_100map_grapple_single_chamber
dw #presets_100map_grapple_double_chamber
dw #presets_100map_grapple_double_chamber_out
dw #presets_100map_grapple_river_styx
dw #presets_100map_grapple_volcano_room
dw #presets_100map_grapple_reverse_magdollite_room
dw #presets_100map_grapple_purple_shaft
dw #presets_100map_grapple_bubble_mountain_corner
dw #presets_100map_grapple_crocomire
dw #presets_100map_grapple_leaving_croc_spikesuit
dw #presets_100map_grapple_crocomire_shaft
dw #presets_100map_grapple_cosine_missile_room
dw #presets_100map_grapple_indiana_jones_room
dw #presets_100map_grapple_grapple_beam
dw #$0000
%cm_header("GRAPPLE")
presets_submenu_100map_xray:
dw #presets_100map_xray_grapple_playground_1
dw #presets_100map_xray_grapple_playground_2
dw #presets_100map_xray_grapple_playground_final
dw #presets_100map_xray_crocomire_farm_room
dw #presets_100map_xray_crocomire_cac_shaft
dw #presets_100map_xray_crocomire_escape
dw #presets_100map_xray_business_center
dw #presets_100map_xray_below_spazer
dw #presets_100map_xray_red_tower_climb
dw #presets_100map_xray_xray_hall_in_spikesuit
dw #presets_100map_xray_xray_hall_out
dw #$0000
%cm_header("X-RAY")
presets_submenu_100map_phantoon:
dw #presets_100map_phantoon_red_tower_up
dw #presets_100map_phantoon_hellway
dw #presets_100map_phantoon_alpha_pbs
dw #presets_100map_phantoon_caterpillar_room_up
dw #presets_100map_phantoon_beta_pbs
dw #presets_100map_phantoon_crateria_kihunters_room
dw #presets_100map_phantoon_ws_shaft_down_no_save
dw #presets_100map_phantoon_basement
dw #presets_100map_phantoon_basement_speedball
dw #presets_100map_phantoon_phantoon_2
dw #$0000
%cm_header("PHANTOON")
presets_submenu_100map_gravity:
dw #presets_100map_gravity_right_supers
dw #presets_100map_gravity_main_shaft_climb
dw #presets_100map_gravity_attic
dw #presets_100map_gravity_robots_of_pain
dw #presets_100map_gravity_west_ocean
dw #presets_100map_gravity_puddles
dw #presets_100map_gravity_bowling_area
dw #$0000
%cm_header("GRAVITY")
presets_submenu_100map_forgotten_highway:
dw #presets_100map_forgotten_highway_leaving_gravity
dw #presets_100map_forgotten_highway_moat_revisit
dw #presets_100map_forgotten_highway_west_ocean_final
dw #presets_100map_forgotten_highway_sponge_bath
dw #presets_100map_forgotten_highway_electric_death_room
dw #presets_100map_forgotten_highway_wrecked_ship_etank
dw #presets_100map_forgotten_highway_east_ocean
dw #presets_100map_forgotten_highway_kago_room
dw #presets_100map_forgotten_highway_crab_maze
dw #presets_100map_forgotten_highway_maridia_elevator
dw #presets_100map_forgotten_highway_pancakes_from_hell
dw #presets_100map_forgotten_highway_plasma_spark_room_1
dw #presets_100map_forgotten_highway_west_sand_hall
dw #presets_100map_forgotten_highway_crab_ggg
dw #$0000
%cm_header("FORGOTTEN HIGHWAY")
presets_submenu_100map_space_jump:
dw #presets_100map_space_jump_main_street
dw #presets_100map_space_jump_mt_everest_1
dw #presets_100map_space_jump_fish_tank_right
dw #presets_100map_space_jump_mamma_turtle
dw #presets_100map_space_jump_fish_tank_left
dw #presets_100map_space_jump_everest_post_fish_tank
dw #presets_100map_space_jump_everest_post_crab_supers
dw #presets_100map_space_jump_beach
dw #presets_100map_space_jump_swiss_cheese_room
dw #presets_100map_space_jump_swiss_cheese_revisit
dw #presets_100map_space_jump_beach_revisit
dw #presets_100map_space_jump_crab_shaft_down
dw #presets_100map_space_jump_aqueduct_post_save
dw #presets_100map_space_jump_prebotwoon
dw #presets_100map_space_jump_botwoon
dw #presets_100map_space_jump_over_under_spark
dw #presets_100map_space_jump_under_over_spark
dw #presets_100map_space_jump_colosseum
dw #presets_100map_space_jump_precious_room
dw #presets_100map_space_jump_draygon
dw #$0000
%cm_header("SPACE JUMP")
presets_submenu_100map_maridia_cleanup:
dw #presets_100map_maridia_cleanup_reverse_halfie
dw #presets_100map_maridia_cleanup_botwoon_hallway_revisit_1
dw #presets_100map_maridia_cleanup_right_sand_pit
dw #presets_100map_maridia_cleanup_east_sand_hall
dw #presets_100map_maridia_cleanup_pants_room
dw #presets_100map_maridia_cleanup_spring_ball_room
dw #presets_100map_maridia_cleanup_pants_room_corner
dw #presets_100map_maridia_cleanup_plasma_spark_room_2
dw #presets_100map_maridia_cleanup_kassiuz_room
dw #presets_100map_maridia_cleanup_plasma_room
dw #presets_100map_maridia_cleanup_kassiuz_room_down
dw #presets_100map_maridia_cleanup_plasma_spark_room_final
dw #presets_100map_maridia_cleanup_west_cac_alley
dw #presets_100map_maridia_cleanup_east_cac_alley
dw #presets_100map_maridia_cleanup_botwoon_hallway_revisit_2
dw #presets_100map_maridia_cleanup_aqueduct_final
dw #presets_100map_maridia_cleanup_left_sand_pit
dw #presets_100map_maridia_cleanup_west_sand_hall_revisit
dw #presets_100map_maridia_cleanup_crab_hole
dw #presets_100map_maridia_cleanup_kpdr_exit
dw #$0000
%cm_header("MARIDIA CLEANUP")
presets_submenu_100map_screw_attack:
dw #presets_100map_screw_attack_business_center_2
dw #presets_100map_screw_attack_ice_beam_snake_room
dw #presets_100map_screw_attack_ice_beam_foosball
dw #presets_100map_screw_attack_ice_beam_boyon_room
dw #presets_100map_screw_attack_crumble_tower
dw #presets_100map_screw_attack_crocomire_speedway
dw #presets_100map_screw_attack_kronic_boost_room
dw #presets_100map_screw_attack_lava_dive_room
dw #presets_100map_screw_attack_lower_norfair_main_hall
dw #presets_100map_screw_attack_blue_fireball
dw #presets_100map_screw_attack_acid_chozo
dw #presets_100map_screw_attack_golden_torizo
dw #presets_100map_screw_attack_screw_attack_2
dw #$0000
%cm_header("SCREW ATTACK")
presets_submenu_100map_lower_norfair:
dw #presets_100map_lower_norfair_fast_ripper_room
dw #presets_100map_lower_norfair_worst_room_in_the_game
dw #presets_100map_lower_norfair_mickey_mouse
dw #presets_100map_lower_norfair_amphitheatre
dw #presets_100map_lower_norfair_kihunter_stairs_down
dw #presets_100map_lower_norfair_wasteland
dw #presets_100map_lower_norfair_metal_pirates
dw #presets_100map_lower_norfair_ridley
dw #presets_100map_lower_norfair_leaving_ridley
dw #presets_100map_lower_norfair_wasteland_revisit
dw #presets_100map_lower_norfair_kihunter_stairs_up
dw #presets_100map_lower_norfair_kihunter_stairs_up_2
dw #presets_100map_lower_norfair_fireflea_room
dw #presets_100map_lower_norfair_hotarubi_missile_room
dw #presets_100map_lower_norfair_three_musketeers_room
dw #$0000
%cm_header("LOWER NORFAIR")
presets_submenu_100map_cleanup_1:
dw #presets_100map_cleanup_1_single_chamber_revisit
dw #presets_100map_cleanup_1_bubble_mountain_dboost
dw #presets_100map_cleanup_1_norfair_reserve_front
dw #presets_100map_cleanup_1_norfair_reserve_back
dw #presets_100map_cleanup_1_bubble_mountain_final
dw #presets_100map_cleanup_1_business_center_final
dw #presets_100map_cleanup_1_tube
dw #presets_100map_cleanup_1_tube_climb
dw #presets_100map_cleanup_1_fish_tank_final
dw #presets_100map_cleanup_1_mt_everest_final
dw #presets_100map_cleanup_1_sephy_fish_room
dw #presets_100map_cleanup_1_red_tower_elevator
dw #presets_100map_cleanup_1_crateria_kihunters_2
dw #presets_100map_cleanup_1_landing_site_revisit
dw #presets_100map_cleanup_1_crateria_pbs
dw #presets_100map_cleanup_1_gauntlet_etank
dw #presets_100map_cleanup_1_quickdrops
dw #$0000
%cm_header("CLEANUP 1")
presets_submenu_100map_greenpink_brin_cleanup:
dw #presets_100map_greenpink_brin_cleanup_green_brinstar_elevator
dw #presets_100map_greenpink_brin_cleanup_brinstar_map_entrance
dw #presets_100map_greenpink_brin_cleanup_green_brin_fireflea_room
dw #presets_100map_greenpink_brin_cleanup_etecoons_etank_skip
dw #presets_100map_greenpink_brin_cleanup_etecoons_dboosts
dw #presets_100map_greenpink_brin_cleanup_etecoons_climb
dw #presets_100map_greenpink_brin_cleanup_dachora_moonfall
dw #presets_100map_greenpink_brin_cleanup_big_pink_climb
dw #presets_100map_greenpink_brin_cleanup_spo_spo_kihunters_room
dw #presets_100map_greenpink_brin_cleanup_spore_spawn
dw #presets_100map_greenpink_brin_cleanup_spo_spo_moonfall
dw #presets_100map_greenpink_brin_cleanup_spo_spo_farm_room
dw #presets_100map_greenpink_brin_cleanup_wave_gate_room
dw #presets_100map_greenpink_brin_cleanup_mission_impossible_room
dw #presets_100map_greenpink_brin_cleanup_green_hill_zone_final
dw #$0000
%cm_header("GREEN-PINK BRIN CLEANUP")
presets_submenu_100map_blue_brinstar_cleanup:
dw #presets_100map_blue_brinstar_cleanup_blue_brinstar_hoppers
dw #presets_100map_blue_brinstar_cleanup_blue_brinstar_etank_room
dw #presets_100map_blue_brinstar_cleanup_john_cena_bridge
dw #presets_100map_blue_brinstar_cleanup_blue_brinstar_screwfall
dw #presets_100map_blue_brinstar_cleanup_pit_room_final
dw #presets_100map_blue_brinstar_cleanup_climb_supers
dw #presets_100map_blue_brinstar_cleanup_parlor_again
dw #presets_100map_blue_brinstar_cleanup_crateria_map_entry
dw #presets_100map_blue_brinstar_cleanup_crateria_map_exit
dw #presets_100map_blue_brinstar_cleanup_230_missiles
dw #presets_100map_blue_brinstar_cleanup_230_mockball
dw #presets_100map_blue_brinstar_cleanup_parlor_not_final_climb
dw #presets_100map_blue_brinstar_cleanup_terminator_final
dw #$0000
%cm_header("BLUE BRINSTAR CLEANUP")
presets_submenu_100map_tourian:
dw #presets_100map_tourian_tourian_elevator
dw #presets_100map_tourian_metroids_1
dw #presets_100map_tourian_metroids_2
dw #presets_100map_tourian_metroids_3
dw #presets_100map_tourian_metroids_4
dw #presets_100map_tourian_baby_skip
dw #presets_100map_tourian_dusty_shaft_revisit
dw #presets_100map_tourian_zeb_skip
dw #presets_100map_tourian_escape_room_3
dw #presets_100map_tourian_escape_room_4
dw #presets_100map_tourian_escape_parlor
dw #presets_100map_tourian_landing_site_final
dw #$0000
%cm_header("TOURIAN")
; Varia
presets_100map_varia_landing_site:
%cm_preset("Landing Site", #preset_100map_varia_landing_site)
presets_100map_varia_morph:
%cm_preset("Morph", #preset_100map_varia_morph)
presets_100map_varia_pit_room:
%cm_preset("Pit Room", #preset_100map_varia_pit_room)
presets_100map_varia_bombs:
%cm_preset("Bombs", #preset_100map_varia_bombs)
presets_100map_varia_alcatraz:
%cm_preset("Alcatraz", #preset_100map_varia_alcatraz)
presets_100map_varia_early_supers:
%cm_preset("Early Supers", #preset_100map_varia_early_supers)
presets_100map_varia_brinstar_reserve:
%cm_preset("Brinstar Reserve", #preset_100map_varia_brinstar_reserve)
presets_100map_varia_reverse_mockball:
%cm_preset("Reverse Mockball", #preset_100map_varia_reverse_mockball)
presets_100map_varia_green_hill_zone:
%cm_preset("Green Hill Zone", #preset_100map_varia_green_hill_zone)
presets_100map_varia_red_tower_down:
%cm_preset("Red Tower Down", #preset_100map_varia_red_tower_down)
presets_100map_varia_kraid_entrance:
%cm_preset("Kraid Entrance", #preset_100map_varia_kraid_entrance)
presets_100map_varia_kraid_kihunter_room:
%cm_preset("Kraid Kihunter Room", #preset_100map_varia_kraid_kihunter_room)
presets_100map_varia_kihunter_room_2:
%cm_preset("Kihunter Room 2", #preset_100map_varia_kihunter_room_2)
presets_100map_varia_kraid:
%cm_preset("Kraid", #preset_100map_varia_kraid)
; Speed Booster
presets_100map_speed_booster_kraid_dboost_room_out:
%cm_preset("Kraid D-Boost Room Out", #preset_100map_speed_booster_kraid_dboost_room_out)
presets_100map_speed_booster_leaving_kraid_refill:
%cm_preset("Leaving Kraid Refill", #preset_100map_speed_booster_leaving_kraid_refill)
presets_100map_speed_booster_kihunter_room_leaving:
%cm_preset("Kihunter Room Leaving", #preset_100map_speed_booster_kihunter_room_leaving)
presets_100map_speed_booster_mouthball:
%cm_preset("Mouthball", #preset_100map_speed_booster_mouthball)
presets_100map_speed_booster_precathedral:
%cm_preset("Pre-Cathedral", #preset_100map_speed_booster_precathedral)
presets_100map_speed_booster_cathedral:
%cm_preset("Cathedral", #preset_100map_speed_booster_cathedral)
presets_100map_speed_booster_bubble_mountain:
%cm_preset("Bubble Mountain", #preset_100map_speed_booster_bubble_mountain)
presets_100map_speed_booster_bubble_mountain_climb:
%cm_preset("Bubble Mountain Climb", #preset_100map_speed_booster_bubble_mountain_climb)
presets_100map_speed_booster_bat_cave:
%cm_preset("Bat Cave", #preset_100map_speed_booster_bat_cave)
presets_100map_speed_booster_speed_hallway_in:
%cm_preset("Speed Hallway In", #preset_100map_speed_booster_speed_hallway_in)
presets_100map_speed_booster_speed_booster_2:
%cm_preset("Speed Booster", #preset_100map_speed_booster_speed_booster_2)
; Grapple
presets_100map_grapple_single_chamber:
%cm_preset("Single Chamber", #preset_100map_grapple_single_chamber)
presets_100map_grapple_double_chamber:
%cm_preset("Double Chamber", #preset_100map_grapple_double_chamber)
presets_100map_grapple_double_chamber_out:
%cm_preset("Double Chamber Out", #preset_100map_grapple_double_chamber_out)
presets_100map_grapple_river_styx:
%cm_preset("River Styx", #preset_100map_grapple_river_styx)
presets_100map_grapple_volcano_room:
%cm_preset("Volcano Room", #preset_100map_grapple_volcano_room)
presets_100map_grapple_reverse_magdollite_room:
%cm_preset("Reverse Magdollite Room", #preset_100map_grapple_reverse_magdollite_room)
presets_100map_grapple_purple_shaft:
%cm_preset("Purple Shaft", #preset_100map_grapple_purple_shaft)
presets_100map_grapple_bubble_mountain_corner:
%cm_preset("Bubble Mountain Corner", #preset_100map_grapple_bubble_mountain_corner)
presets_100map_grapple_crocomire:
%cm_preset("Crocomire", #preset_100map_grapple_crocomire)
presets_100map_grapple_leaving_croc_spikesuit:
%cm_preset("Leaving Croc (Spikesuit)", #preset_100map_grapple_leaving_croc_spikesuit)
presets_100map_grapple_crocomire_shaft:
%cm_preset("Crocomire Shaft", #preset_100map_grapple_crocomire_shaft)
presets_100map_grapple_cosine_missile_room:
%cm_preset("Cosine Missile Room", #preset_100map_grapple_cosine_missile_room)
presets_100map_grapple_indiana_jones_room:
%cm_preset("Indiana Jones Room", #preset_100map_grapple_indiana_jones_room)
presets_100map_grapple_grapple_beam:
%cm_preset("Grapple Beam", #preset_100map_grapple_grapple_beam)
; X-Ray
presets_100map_xray_grapple_playground_1:
%cm_preset("Grapple Playground 1", #preset_100map_xray_grapple_playground_1)
presets_100map_xray_grapple_playground_2:
%cm_preset("Grapple Playground 2", #preset_100map_xray_grapple_playground_2)
presets_100map_xray_grapple_playground_final:
%cm_preset("Grapple Playground Final", #preset_100map_xray_grapple_playground_final)
presets_100map_xray_crocomire_farm_room:
%cm_preset("Crocomire Farm Room", #preset_100map_xray_crocomire_farm_room)
presets_100map_xray_crocomire_cac_shaft:
%cm_preset("Crocomire Cac Shaft", #preset_100map_xray_crocomire_cac_shaft)
presets_100map_xray_crocomire_escape:
%cm_preset("Crocomire Escape", #preset_100map_xray_crocomire_escape)
presets_100map_xray_business_center:
%cm_preset("Business Center", #preset_100map_xray_business_center)
presets_100map_xray_below_spazer:
%cm_preset("Below Spazer", #preset_100map_xray_below_spazer)
presets_100map_xray_red_tower_climb:
%cm_preset("Red Tower Climb", #preset_100map_xray_red_tower_climb)
presets_100map_xray_xray_hall_in_spikesuit:
%cm_preset("X-Ray Hall In (Spikesuit)", #preset_100map_xray_xray_hall_in_spikesuit)
presets_100map_xray_xray_hall_out:
%cm_preset("X-Ray Hall Out", #preset_100map_xray_xray_hall_out)
; Phantoon
presets_100map_phantoon_red_tower_up:
%cm_preset("Red Tower Up", #preset_100map_phantoon_red_tower_up)
presets_100map_phantoon_hellway:
%cm_preset("Hellway", #preset_100map_phantoon_hellway)
presets_100map_phantoon_alpha_pbs:
%cm_preset("Alpha PBs", #preset_100map_phantoon_alpha_pbs)
presets_100map_phantoon_caterpillar_room_up:
%cm_preset("Caterpillar Room Up", #preset_100map_phantoon_caterpillar_room_up)
presets_100map_phantoon_beta_pbs:
%cm_preset("Beta PBs", #preset_100map_phantoon_beta_pbs)
presets_100map_phantoon_crateria_kihunters_room:
%cm_preset("Crateria Kihunters Room", #preset_100map_phantoon_crateria_kihunters_room)
presets_100map_phantoon_ws_shaft_down_no_save:
%cm_preset("WS Shaft Down (No Save)", #preset_100map_phantoon_ws_shaft_down_no_save)
presets_100map_phantoon_basement:
%cm_preset("Basement", #preset_100map_phantoon_basement)
presets_100map_phantoon_basement_speedball:
%cm_preset("Basement Speedball", #preset_100map_phantoon_basement_speedball)
presets_100map_phantoon_phantoon_2:
%cm_preset("Phantoon", #preset_100map_phantoon_phantoon_2)
; Gravity
presets_100map_gravity_right_supers:
%cm_preset("Right Supers", #preset_100map_gravity_right_supers)
presets_100map_gravity_main_shaft_climb:
%cm_preset("Main Shaft Climb", #preset_100map_gravity_main_shaft_climb)
presets_100map_gravity_attic:
%cm_preset("Attic", #preset_100map_gravity_attic)
presets_100map_gravity_robots_of_pain:
%cm_preset("Robots of Pain", #preset_100map_gravity_robots_of_pain)
presets_100map_gravity_west_ocean:
%cm_preset("West Ocean", #preset_100map_gravity_west_ocean)
presets_100map_gravity_puddles:
%cm_preset("Puddles", #preset_100map_gravity_puddles)
presets_100map_gravity_bowling_area:
%cm_preset("Bowling Area", #preset_100map_gravity_bowling_area)
; Forgotten Highway
presets_100map_forgotten_highway_leaving_gravity:
%cm_preset("Leaving Gravity", #preset_100map_forgotten_highway_leaving_gravity)
presets_100map_forgotten_highway_moat_revisit:
%cm_preset("Moat Revisit", #preset_100map_forgotten_highway_moat_revisit)
presets_100map_forgotten_highway_west_ocean_final:
%cm_preset("West Ocean Final", #preset_100map_forgotten_highway_west_ocean_final)
presets_100map_forgotten_highway_sponge_bath:
%cm_preset("Sponge Bath", #preset_100map_forgotten_highway_sponge_bath)
presets_100map_forgotten_highway_electric_death_room:
%cm_preset("Electric Death Room", #preset_100map_forgotten_highway_electric_death_room)
presets_100map_forgotten_highway_wrecked_ship_etank:
%cm_preset("Wrecked Ship E-Tank", #preset_100map_forgotten_highway_wrecked_ship_etank)
presets_100map_forgotten_highway_east_ocean:
%cm_preset("East Ocean", #preset_100map_forgotten_highway_east_ocean)
presets_100map_forgotten_highway_kago_room:
%cm_preset("Kago Room", #preset_100map_forgotten_highway_kago_room)
presets_100map_forgotten_highway_crab_maze:
%cm_preset("Crab Maze", #preset_100map_forgotten_highway_crab_maze)
presets_100map_forgotten_highway_maridia_elevator:
%cm_preset("Maridia Elevator", #preset_100map_forgotten_highway_maridia_elevator)
presets_100map_forgotten_highway_pancakes_from_hell:
%cm_preset("Pancakes from Hell", #preset_100map_forgotten_highway_pancakes_from_hell)
presets_100map_forgotten_highway_plasma_spark_room_1:
%cm_preset("Plasma Spark Room 1", #preset_100map_forgotten_highway_plasma_spark_room_1)
presets_100map_forgotten_highway_west_sand_hall:
%cm_preset("West Sand Hall", #preset_100map_forgotten_highway_west_sand_hall)
presets_100map_forgotten_highway_crab_ggg:
%cm_preset("Crab GGG", #preset_100map_forgotten_highway_crab_ggg)
; Space Jump
presets_100map_space_jump_main_street:
%cm_preset("Main Street", #preset_100map_space_jump_main_street)
presets_100map_space_jump_mt_everest_1:
%cm_preset("Mt Everest 1", #preset_100map_space_jump_mt_everest_1)
presets_100map_space_jump_fish_tank_right:
%cm_preset("Fish Tank Right", #preset_100map_space_jump_fish_tank_right)
presets_100map_space_jump_mamma_turtle:
%cm_preset("Mamma Turtle", #preset_100map_space_jump_mamma_turtle)
presets_100map_space_jump_fish_tank_left:
%cm_preset("Fish Tank Left", #preset_100map_space_jump_fish_tank_left)
presets_100map_space_jump_everest_post_fish_tank:
%cm_preset("Everest Post Fish Tank", #preset_100map_space_jump_everest_post_fish_tank)
presets_100map_space_jump_everest_post_crab_supers:
%cm_preset("Everest Post Crab Supers", #preset_100map_space_jump_everest_post_crab_supers)
presets_100map_space_jump_beach:
%cm_preset("Beach", #preset_100map_space_jump_beach)
presets_100map_space_jump_swiss_cheese_room:
%cm_preset("Swiss Cheese Room", #preset_100map_space_jump_swiss_cheese_room)
presets_100map_space_jump_swiss_cheese_revisit:
%cm_preset("Swiss Cheese Revisit", #preset_100map_space_jump_swiss_cheese_revisit)
presets_100map_space_jump_beach_revisit:
%cm_preset("Beach Revisit", #preset_100map_space_jump_beach_revisit)
presets_100map_space_jump_crab_shaft_down:
%cm_preset("Crab Shaft Down", #preset_100map_space_jump_crab_shaft_down)
presets_100map_space_jump_aqueduct_post_save:
%cm_preset("Aqueduct (Post Save)", #preset_100map_space_jump_aqueduct_post_save)
presets_100map_space_jump_prebotwoon:
%cm_preset("Pre-Botwoon", #preset_100map_space_jump_prebotwoon)
presets_100map_space_jump_botwoon:
%cm_preset("Botwoon", #preset_100map_space_jump_botwoon)
presets_100map_space_jump_over_under_spark:
%cm_preset("Over Under Spark", #preset_100map_space_jump_over_under_spark)
presets_100map_space_jump_under_over_spark:
%cm_preset("Under Over Spark", #preset_100map_space_jump_under_over_spark)
presets_100map_space_jump_colosseum:
%cm_preset("Colosseum", #preset_100map_space_jump_colosseum)
presets_100map_space_jump_precious_room:
%cm_preset("Precious Room", #preset_100map_space_jump_precious_room)
presets_100map_space_jump_draygon:
%cm_preset("Draygon", #preset_100map_space_jump_draygon)
; Maridia Cleanup
presets_100map_maridia_cleanup_reverse_halfie:
%cm_preset("Reverse Halfie", #preset_100map_maridia_cleanup_reverse_halfie)
presets_100map_maridia_cleanup_botwoon_hallway_revisit_1:
%cm_preset("Botwoon Hallway Revisit 1", #preset_100map_maridia_cleanup_botwoon_hallway_revisit_1)
presets_100map_maridia_cleanup_right_sand_pit:
%cm_preset("Right Sand Pit", #preset_100map_maridia_cleanup_right_sand_pit)
presets_100map_maridia_cleanup_east_sand_hall:
%cm_preset("East Sand Hall", #preset_100map_maridia_cleanup_east_sand_hall)
presets_100map_maridia_cleanup_pants_room:
%cm_preset("Pants Room", #preset_100map_maridia_cleanup_pants_room)
presets_100map_maridia_cleanup_spring_ball_room:
%cm_preset("Spring Ball Room", #preset_100map_maridia_cleanup_spring_ball_room)
presets_100map_maridia_cleanup_pants_room_corner:
%cm_preset("Pants Room Corner", #preset_100map_maridia_cleanup_pants_room_corner)
presets_100map_maridia_cleanup_plasma_spark_room_2:
%cm_preset("Plasma Spark Room 2", #preset_100map_maridia_cleanup_plasma_spark_room_2)
presets_100map_maridia_cleanup_kassiuz_room:
%cm_preset("Kassiuz Room", #preset_100map_maridia_cleanup_kassiuz_room)
presets_100map_maridia_cleanup_plasma_room:
%cm_preset("Plasma Room", #preset_100map_maridia_cleanup_plasma_room)
presets_100map_maridia_cleanup_kassiuz_room_down:
%cm_preset("Kassiuz Room Down", #preset_100map_maridia_cleanup_kassiuz_room_down)
presets_100map_maridia_cleanup_plasma_spark_room_final:
%cm_preset("Plasma Spark Room Final", #preset_100map_maridia_cleanup_plasma_spark_room_final)
presets_100map_maridia_cleanup_west_cac_alley:
%cm_preset("West Cac Alley", #preset_100map_maridia_cleanup_west_cac_alley)
presets_100map_maridia_cleanup_east_cac_alley:
%cm_preset("East Cac Alley", #preset_100map_maridia_cleanup_east_cac_alley)
presets_100map_maridia_cleanup_botwoon_hallway_revisit_2:
%cm_preset("Botwoon Hallway Revisit 2", #preset_100map_maridia_cleanup_botwoon_hallway_revisit_2)
presets_100map_maridia_cleanup_aqueduct_final:
%cm_preset("Aqueduct Final", #preset_100map_maridia_cleanup_aqueduct_final)
presets_100map_maridia_cleanup_left_sand_pit:
%cm_preset("Left Sand Pit", #preset_100map_maridia_cleanup_left_sand_pit)
presets_100map_maridia_cleanup_west_sand_hall_revisit:
%cm_preset("West Sand Hall Revisit", #preset_100map_maridia_cleanup_west_sand_hall_revisit)
presets_100map_maridia_cleanup_crab_hole:
%cm_preset("Crab Hole", #preset_100map_maridia_cleanup_crab_hole)
presets_100map_maridia_cleanup_kpdr_exit:
%cm_preset("KPDR Exit", #preset_100map_maridia_cleanup_kpdr_exit)
; Screw Attack
presets_100map_screw_attack_business_center_2:
%cm_preset("Business Center", #preset_100map_screw_attack_business_center_2)
presets_100map_screw_attack_ice_beam_snake_room:
%cm_preset("Ice Beam Snake Room", #preset_100map_screw_attack_ice_beam_snake_room)
presets_100map_screw_attack_ice_beam_foosball:
%cm_preset("Ice Beam Foosball", #preset_100map_screw_attack_ice_beam_foosball)
presets_100map_screw_attack_ice_beam_boyon_room:
%cm_preset("Ice Beam Boyon Room", #preset_100map_screw_attack_ice_beam_boyon_room)
presets_100map_screw_attack_crumble_tower:
%cm_preset("Crumble Tower", #preset_100map_screw_attack_crumble_tower)
presets_100map_screw_attack_crocomire_speedway:
%cm_preset("Crocomire Speedway", #preset_100map_screw_attack_crocomire_speedway)
presets_100map_screw_attack_kronic_boost_room:
%cm_preset("Kronic Boost Room", #preset_100map_screw_attack_kronic_boost_room)
presets_100map_screw_attack_lava_dive_room:
%cm_preset("Lava Dive Room", #preset_100map_screw_attack_lava_dive_room)
presets_100map_screw_attack_lower_norfair_main_hall:
%cm_preset("Lower Norfair Main Hall", #preset_100map_screw_attack_lower_norfair_main_hall)
presets_100map_screw_attack_blue_fireball:
%cm_preset("Blue Fireball", #preset_100map_screw_attack_blue_fireball)
presets_100map_screw_attack_acid_chozo:
%cm_preset("Acid Chozo", #preset_100map_screw_attack_acid_chozo)
presets_100map_screw_attack_golden_torizo:
%cm_preset("Golden Torizo", #preset_100map_screw_attack_golden_torizo)
presets_100map_screw_attack_screw_attack_2:
%cm_preset("Screw Attack", #preset_100map_screw_attack_screw_attack_2)
; Lower Norfair
presets_100map_lower_norfair_fast_ripper_room:
%cm_preset("Fast Ripper Room", #preset_100map_lower_norfair_fast_ripper_room)
presets_100map_lower_norfair_worst_room_in_the_game:
%cm_preset("Worst Room in the Game", #preset_100map_lower_norfair_worst_room_in_the_game)
presets_100map_lower_norfair_mickey_mouse:
%cm_preset("Mickey Mouse", #preset_100map_lower_norfair_mickey_mouse)
presets_100map_lower_norfair_amphitheatre:
%cm_preset("Amphitheatre", #preset_100map_lower_norfair_amphitheatre)
presets_100map_lower_norfair_kihunter_stairs_down:
%cm_preset("Kihunter Stairs Down", #preset_100map_lower_norfair_kihunter_stairs_down)
presets_100map_lower_norfair_wasteland:
%cm_preset("Wasteland", #preset_100map_lower_norfair_wasteland)
presets_100map_lower_norfair_metal_pirates:
%cm_preset("Metal Pirates", #preset_100map_lower_norfair_metal_pirates)
presets_100map_lower_norfair_ridley:
%cm_preset("Ridley", #preset_100map_lower_norfair_ridley)
presets_100map_lower_norfair_leaving_ridley:
%cm_preset("Leaving Ridley", #preset_100map_lower_norfair_leaving_ridley)
presets_100map_lower_norfair_wasteland_revisit:
%cm_preset("Wasteland Revisit", #preset_100map_lower_norfair_wasteland_revisit)
presets_100map_lower_norfair_kihunter_stairs_up:
%cm_preset("Kihunter Stairs Up", #preset_100map_lower_norfair_kihunter_stairs_up)
presets_100map_lower_norfair_kihunter_stairs_up_2:
%cm_preset("Kihunter Stairs Up 2", #preset_100map_lower_norfair_kihunter_stairs_up_2)
presets_100map_lower_norfair_fireflea_room:
%cm_preset("Fireflea Room", #preset_100map_lower_norfair_fireflea_room)
presets_100map_lower_norfair_hotarubi_missile_room:
%cm_preset("Hotarubi Missile Room", #preset_100map_lower_norfair_hotarubi_missile_room)
presets_100map_lower_norfair_three_musketeers_room:
%cm_preset("Three Musketeers Room", #preset_100map_lower_norfair_three_musketeers_room)
; Cleanup 1
presets_100map_cleanup_1_single_chamber_revisit:
%cm_preset("Single Chamber Revisit", #preset_100map_cleanup_1_single_chamber_revisit)
presets_100map_cleanup_1_bubble_mountain_dboost:
%cm_preset("Bubble Mountain D-Boost", #preset_100map_cleanup_1_bubble_mountain_dboost)
presets_100map_cleanup_1_norfair_reserve_front:
%cm_preset("Norfair Reserve Front", #preset_100map_cleanup_1_norfair_reserve_front)
presets_100map_cleanup_1_norfair_reserve_back:
%cm_preset("Norfair Reserve Back", #preset_100map_cleanup_1_norfair_reserve_back)
presets_100map_cleanup_1_bubble_mountain_final:
%cm_preset("Bubble Mountain Final", #preset_100map_cleanup_1_bubble_mountain_final)
presets_100map_cleanup_1_business_center_final:
%cm_preset("Business Center Final", #preset_100map_cleanup_1_business_center_final)
presets_100map_cleanup_1_tube:
%cm_preset("Tube", #preset_100map_cleanup_1_tube)
presets_100map_cleanup_1_tube_climb:
%cm_preset("Tube Climb", #preset_100map_cleanup_1_tube_climb)
presets_100map_cleanup_1_fish_tank_final:
%cm_preset("Fish Tank Final", #preset_100map_cleanup_1_fish_tank_final)
presets_100map_cleanup_1_mt_everest_final:
%cm_preset("Mt Everest Final", #preset_100map_cleanup_1_mt_everest_final)
presets_100map_cleanup_1_sephy_fish_room:
%cm_preset("Sephy Fish Room", #preset_100map_cleanup_1_sephy_fish_room)
presets_100map_cleanup_1_red_tower_elevator:
%cm_preset("Red Tower Elevator", #preset_100map_cleanup_1_red_tower_elevator)
presets_100map_cleanup_1_crateria_kihunters_2:
%cm_preset("Crateria Kihunters 2", #preset_100map_cleanup_1_crateria_kihunters_2)
presets_100map_cleanup_1_landing_site_revisit:
%cm_preset("Landing Site Revisit", #preset_100map_cleanup_1_landing_site_revisit)
presets_100map_cleanup_1_crateria_pbs:
%cm_preset("Crateria PBs", #preset_100map_cleanup_1_crateria_pbs)
presets_100map_cleanup_1_gauntlet_etank:
%cm_preset("Gauntlet E-Tank", #preset_100map_cleanup_1_gauntlet_etank)
presets_100map_cleanup_1_quickdrops:
%cm_preset("Quickdrops", #preset_100map_cleanup_1_quickdrops)
; Green-Pink Brin Cleanup
presets_100map_greenpink_brin_cleanup_green_brinstar_elevator:
%cm_preset("Green Brinstar Elevator", #preset_100map_greenpink_brin_cleanup_green_brinstar_elevator)
presets_100map_greenpink_brin_cleanup_brinstar_map_entrance:
%cm_preset("Brinstar Map Entrance", #preset_100map_greenpink_brin_cleanup_brinstar_map_entrance)
presets_100map_greenpink_brin_cleanup_green_brin_fireflea_room:
%cm_preset("Green Brin Fireflea Room", #preset_100map_greenpink_brin_cleanup_green_brin_fireflea_room)
presets_100map_greenpink_brin_cleanup_etecoons_etank_skip:
%cm_preset("Etecoons E-Tank Skip", #preset_100map_greenpink_brin_cleanup_etecoons_etank_skip)
presets_100map_greenpink_brin_cleanup_etecoons_dboosts:
%cm_preset("Etecoons D-Boosts", #preset_100map_greenpink_brin_cleanup_etecoons_dboosts)
presets_100map_greenpink_brin_cleanup_etecoons_climb:
%cm_preset("Etecoons Climb", #preset_100map_greenpink_brin_cleanup_etecoons_climb)
presets_100map_greenpink_brin_cleanup_dachora_moonfall:
%cm_preset("Dachora Moonfall", #preset_100map_greenpink_brin_cleanup_dachora_moonfall)
presets_100map_greenpink_brin_cleanup_big_pink_climb:
%cm_preset("Big Pink Climb", #preset_100map_greenpink_brin_cleanup_big_pink_climb)
presets_100map_greenpink_brin_cleanup_spo_spo_kihunters_room:
%cm_preset("Spo Spo Kihunters Room", #preset_100map_greenpink_brin_cleanup_spo_spo_kihunters_room)
presets_100map_greenpink_brin_cleanup_spore_spawn:
%cm_preset("Spore Spawn", #preset_100map_greenpink_brin_cleanup_spore_spawn)
presets_100map_greenpink_brin_cleanup_spo_spo_moonfall:
%cm_preset("Spo Spo Moonfall", #preset_100map_greenpink_brin_cleanup_spo_spo_moonfall)
presets_100map_greenpink_brin_cleanup_spo_spo_farm_room:
%cm_preset("Spo Spo Farm Room", #preset_100map_greenpink_brin_cleanup_spo_spo_farm_room)
presets_100map_greenpink_brin_cleanup_wave_gate_room:
%cm_preset("Wave Gate Room", #preset_100map_greenpink_brin_cleanup_wave_gate_room)
presets_100map_greenpink_brin_cleanup_mission_impossible_room:
%cm_preset("Mission Impossible Room", #preset_100map_greenpink_brin_cleanup_mission_impossible_room)
presets_100map_greenpink_brin_cleanup_green_hill_zone_final:
%cm_preset("Green Hill Zone Final", #preset_100map_greenpink_brin_cleanup_green_hill_zone_final)
; Blue Brinstar Cleanup
presets_100map_blue_brinstar_cleanup_blue_brinstar_hoppers:
%cm_preset("Blue Brinstar Hoppers", #preset_100map_blue_brinstar_cleanup_blue_brinstar_hoppers)
presets_100map_blue_brinstar_cleanup_blue_brinstar_etank_room:
%cm_preset("Blue Brinstar E-Tank Room", #preset_100map_blue_brinstar_cleanup_blue_brinstar_etank_room)
presets_100map_blue_brinstar_cleanup_john_cena_bridge:
%cm_preset("John Cena Bridge", #preset_100map_blue_brinstar_cleanup_john_cena_bridge)
presets_100map_blue_brinstar_cleanup_blue_brinstar_screwfall:
%cm_preset("Blue Brinstar Screwfall", #preset_100map_blue_brinstar_cleanup_blue_brinstar_screwfall)
presets_100map_blue_brinstar_cleanup_pit_room_final:
%cm_preset("Pit Room Final", #preset_100map_blue_brinstar_cleanup_pit_room_final)
presets_100map_blue_brinstar_cleanup_climb_supers:
%cm_preset("Climb Supers", #preset_100map_blue_brinstar_cleanup_climb_supers)
presets_100map_blue_brinstar_cleanup_parlor_again:
%cm_preset("Parlor Again", #preset_100map_blue_brinstar_cleanup_parlor_again)
presets_100map_blue_brinstar_cleanup_crateria_map_entry:
%cm_preset("Crateria Map Entry", #preset_100map_blue_brinstar_cleanup_crateria_map_entry)
presets_100map_blue_brinstar_cleanup_crateria_map_exit:
%cm_preset("Crateria Map Exit", #preset_100map_blue_brinstar_cleanup_crateria_map_exit)
presets_100map_blue_brinstar_cleanup_230_missiles:
%cm_preset("230 Missiles", #preset_100map_blue_brinstar_cleanup_230_missiles)
presets_100map_blue_brinstar_cleanup_230_mockball:
%cm_preset("230 Mockball", #preset_100map_blue_brinstar_cleanup_230_mockball)
presets_100map_blue_brinstar_cleanup_parlor_not_final_climb:
%cm_preset("Parlor (not) Final Climb", #preset_100map_blue_brinstar_cleanup_parlor_not_final_climb)
presets_100map_blue_brinstar_cleanup_terminator_final:
%cm_preset("Terminator Final", #preset_100map_blue_brinstar_cleanup_terminator_final)
; Tourian
presets_100map_tourian_tourian_elevator:
%cm_preset("Tourian Elevator", #preset_100map_tourian_tourian_elevator)
presets_100map_tourian_metroids_1:
%cm_preset("Metroids 1", #preset_100map_tourian_metroids_1)
presets_100map_tourian_metroids_2:
%cm_preset("Metroids 2", #preset_100map_tourian_metroids_2)
presets_100map_tourian_metroids_3:
%cm_preset("Metroids 3", #preset_100map_tourian_metroids_3)
presets_100map_tourian_metroids_4:
%cm_preset("Metroids 4", #preset_100map_tourian_metroids_4)
presets_100map_tourian_baby_skip:
%cm_preset("Baby Skip", #preset_100map_tourian_baby_skip)
presets_100map_tourian_dusty_shaft_revisit:
%cm_preset("Dusty Shaft Revisit", #preset_100map_tourian_dusty_shaft_revisit)
presets_100map_tourian_zeb_skip:
%cm_preset("Zeb Skip", #preset_100map_tourian_zeb_skip)
presets_100map_tourian_escape_room_3:
%cm_preset("Escape Room 3", #preset_100map_tourian_escape_room_3)
presets_100map_tourian_escape_room_4:
%cm_preset("Escape Room 4", #preset_100map_tourian_escape_room_4)
presets_100map_tourian_escape_parlor:
%cm_preset("Escape Parlor", #preset_100map_tourian_escape_parlor)
presets_100map_tourian_landing_site_final:
%cm_preset("Landing Site Final", #preset_100map_tourian_landing_site_final)
|
appStore.als | sergioduartte/logica-projeto | 0 | 1403 | <filename>appStore.als
module appStore
-- Model Signatures
sig AppStore {
usuarios: set Usuario,
aplicativos: set Aplicativo
}
sig Usuario {
conta: lone Conta
}
sig Conta {
dispositivos: some Dispositivo,
aplicativosConta: set Aplicativo
}
sig Dispositivo {
versoesDeAplicativosInstalados: set Versao
}
abstract sig Aplicativo {
versoes: some Versao
}
sig AplicativoPago extends Aplicativo {}
sig AplicativoGratuito extends Aplicativo {}
sig Versao {}
-- Model Facts
fact appStore {
-- Garantir que so exista uma AppStore.
one AppStore
-- Todo usuario que tem uma conta precisa pertencer a AppStore.
Conta.~conta in AppStore.usuarios
-- Se o usuario esta na AppStore, implica dizer que ele tem uma conta.
all u:Usuario | (u in AppStore.usuarios) => (one u.conta)
}
fact usuarioConta {
-- Toda conta so pode pertencer a um usuario.
all c:Conta | one c.~conta
}
fact contaDispositivo {
-- Todo dispositivo tem que pertencer a exatamente uma conta.
all d:Dispositivo | one d.~dispositivos
}
fact aplicativoVersao {
-- Cada versao so pode pertencer a um aplicativo.
all v:Versao | one v.~versoes
}
fact contaDispositivoVersoes {
-- O conjunto dos aplicativos instalados nos dispositivos esta contido no
-- conjunto dos aplicativos da conta, isso por causa que alguns aplicativos
-- contidos na conta ja podem ter sido desinstalados.
all c:Conta | c.dispositivos.versoesDeAplicativosInstalados.~versoes in c.aplicativosConta
}
-- Model Asserts
assert usuarioConta {
-- Todo usuario so pode ter uma conta.
all u:Usuario | lone u.conta
-- Toda conta so pode pertencer a um usuario.
all c:Conta | one c.~conta
}
assert contaDispositivo {
-- Toda conta tem que ter pelo menos um dispositivo.
all c:Conta | some c.dispositivos
-- Todo dispositivo so pode pertencer a uma conta.
all d:Dispositivo | one d.~dispositivos
}
check usuarioConta for 10
check contaDispositivo for 10
pred show[] {}
run show for 2
|
sweet16vm_code.asm | BruceMcF/Sweeter16 | 10 | 81421 | <reponame>BruceMcF/Sweeter16
; Test Sweet16 VM, to be executed from Monitor so end with BK
; Different versions will set their main entry to SWEETVM
; Test Arithmatic
JSR SWEETVM
!byte $10,$00,$00 ; SET R0 $00 $00
!byte $11,$01,$00 ; SET R1 $01 $00
!byte $12,$02,$00 ; SET R2 $02 $00
!byte $A1 ; ADD R1
!byte $33 ; ST R3
!byte $B2 ; SUB R2 (should be -1)
!byte $34 ; ST R4
!byte $08,(L2-L1) ; BM1 (L2-L1)
L1: !byte $15,$00,$00 ; SET R5 $00 $00 (shouldn't)
!byte $0A ; BK
L2: !byte $15,$10,$04 ; SET R5 $10 $04 (should)
!byte $00 ; RTN
BRK
; Test Stack
JSR SWEETVM
!byte $10,$00,$00 ; SET R0 $0000
!byte $11,$08,$00 ; SET R1 $0008 (Count)
!byte $12,$00,$C0 ; SET R2 $C000 (A stack)
L3: !byte $E0 ; ICR R0
!byte $72 ; STD @R2
!byte $D1 ; CPR R1
!byte $07,(L3-L4) ; BNZ (L3-L4)
L4: !byte $00 ; RTN
BRK
; Copy (do Test Stack first, don't clear RAM)
JSR SWEETVM
!byte $13,$00,$C0 ; Source of copy, target in R2, count in R1
L5: !byte $63 ; LDD @R3
!byte $72 ; STD @R2
!byte $F1 ; DCR R1
!byte $07,(L5-L6) ; BNZ (L5-L6)
L6: !byte $00 ; RTN
BRK
; Test Byte ops (do Test Stack and Test Copy first)
JSR SWEETVM
; ; R2 points past last write
!byte $11,$08,$00 ; SET R1 $0008 (Count)
!byte $1A,$00,$00 ; SET R10 $0000
L7: !byte $2A ; LD R10 # Zero accumulator
!byte $B1 ; SUB R1 # Subtract count
!byte $52 ; ST @R2
!byte $F1 ; DCR R1
!byte $07,(L7-L8) ; BNZ (L7-L8)
L8: !byte $22 ; LD R2
!byte $34 ; ST R4
!byte $11,$08,$00 ; SET R1 $08 $00 (Count)
L9: !byte $84 ; POP @R4
!byte $A0 ; ADD R0 # R0+R0 => R0*2
!byte $52 ; ST @R2
!byte $F1 ; DCR R1
!byte $07,(L9-L10) ; BNZ (L9-L10)
L10: !byte $00 ; RTN
BRK
; Test branch ops (only BNZ well tested above)
JSR SWEETVM
; Don't forget to set up stack to use BS/RT!
!byte $1C,<L16,>L16 ; SET R12 L16
!byte $01,(L14-L11) ; BR 1 # over BK
L11: !byte $0A ; BK
L12: !byte $B0 ; SUB R0 # Reset ACC to 0
!byte $06,1 ; BZ 1
!byte $0A ; BK
!byte $04,1 ; BP 1
!byte $0A ; BK
!byte $F0 ; DCR R0
!byte $07,1 ; BNZ 1
!byte $0A ; BK
!byte $05,1 ; BN 1
!byte $0A ; BK
!byte $08,1 ; BM1 1
!byte $0A ; BK
!byte $F0 ; DCR R0
!byte $09,1 ; BNM1 1
!byte $0A ; BK
!byte $A0 ; ADD R0 # R0*2->R0 should carry
!byte $03,1 ; BC 1
!byte $0A ; BK
!byte $31 ; ST R1
!byte $02,1 ; BNC 1 # Store clears carry
!byte $0A ; BK
!byte $0B ; RS
!byte $0A ; BK
L14: !byte $0C,(L12-L15) ; BS (L12-L15)
L15: !byte $00 ; RTN
BRK ; # END HERE IF ALL CLEAR!!!
L16: ; Set up stack here.
|
oeis/090/A090316.asm | neoneye/loda-programs | 11 | 7023 | ; A090316: a(n) = 24*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 24.
; Submitted by <NAME>
; 2,24,578,13896,334082,8031864,193098818,4642403496,111610782722,2683301188824,64510839314498,1550943444736776,37287153512997122,896442627756667704,21551910219673022018,518142287899909196136,12456966819817493729282,299485345963519758698904,7200105269944291702502978,173102011824626520618770376,4161648389060980786552992002,100052663349288165397890578424,2405425568771976950335926874178,57830266313876734973460135558696,1390331817101813616313379180282882,33425793876757403526494560462347864
mov $3,2
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
mul $2,12
add $3,$2
lpe
mov $0,$3
|
src/main/antlr4/PrutScript.g4 | valvy/prutscript | 0 | 669 | grammar PrutScript;
/*@header {
package nl.hvanderheijden.prutscript.antlr4;
}*/
prutScript : (block endExpr+|expression endExpr+|endExpr+)+ EOF;
expression :
LPAREN expression RPAREN #ParenthesizedExpr
|expression EXPONENT expression #ExponentialExpr
| expression operatorToken=(MULTIPLY | DIVIDE) expression #MultiplicativeExpr
| expression operatorToken=(ADD | SUBTRACT) expression #AdditiveExpr
| NUMBER #NumberExpr
| String #StringExpr
| identifier=Identifier #variable
| identifier=Identifier expression+ #methodExpr
| identifier=Identifier '=' (expression|block) #assignExpr
;
LINE_COMMENT : '#' ~[\r\n]* -> skip;
endExpr: (';'| '\r'?'\n');
block:
identity=Identifier Identifier* endExpr* '{' endExpr* ((expression|block) endExpr+)* '}'
;
Identifier
: Letter LetterOrDigit*
;
fragment Letter
: [a-zA-Z$_] // these are the "java letters" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
;
fragment LetterOrDigit
: [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
| '.'
;
NUMBER : INT ('.' INT)?;
INT : ('0'..'9')+;
EXPONENT : '^';
MULTIPLY : '*';
DIVIDE : '/';
SUBTRACT : '-';
ADD : '+';
LPAREN : '(';
RPAREN : ')';
String
: '"' (~ ["\\])* '"'
;
COMMENT
: '/*' .*? '*/' -> skip
;
//WS : [ \t\r\n] -> channel(HIDDEN);
WS: (' ' | '\t') -> skip;
NL: '\r'? '\n' -> skip; |
scripts/Overrides/Show Overrides, Position Bottom Left.applescript | samschloegel/qlab-scripts | 8 | 4459 | <filename>scripts/Overrides/Show Overrides, Position Bottom Left.applescript
-- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts
-- Built for QLab 4. v211121-01
tell application "Finder"
set desktopX to item 3 of (get bounds of window of desktop)
set desktopY to item 4 of (get bounds of window of desktop)
end tell
tell application id "com.figure53.QLab.4"
if overrides visibility of overrides is false then
set overrides visibility of overrides to true
end if
set workspaceWindowProps to (get properties of front window)
set workspaceBounds to (get bounds of front window)
end tell
tell application "System Events"
if (exists of window "Override Controls" of process "QLab") = true then
set theORWindowSize to size of window "Override Controls" of process "QLab"
set theORWidth to item 1 of theORWindowSize
set theORHeight to item 2 of theORWindowSize
set position of window "Override Controls" of process "QLab" to {(desktopX - theORWidth), (desktopY - theORHeight)}
end if
end tell
tell application id "com.figure53.QLab.4"
set workspaceBounds to {0, 0, (desktopX - theORWidth), desktopY}
set bounds of window id (uniqueID of workspaceWindowProps) to workspaceBounds
end tell |
src/Selective/Examples/TestSelectiveReceive-calc.agda | Zalastax/singly-typed-actors | 1 | 8335 | module Selective.Examples.TestSelectiveReceive-calc where
open import Selective.ActorMonad
open import Prelude
open import Debug
open import Data.Nat.Show using (show)
UniqueTag = ℕ
TagField = ValueType UniqueTag
ℕ-ReplyMessage : MessageType
ℕ-ReplyMessage = ValueType UniqueTag ∷ [ ValueType ℕ ]ˡ
ℕ-Reply : InboxShape
ℕ-Reply = [ ℕ-ReplyMessage ]ˡ
ℕ×ℕ→ℕ-Message : MessageType
ℕ×ℕ→ℕ-Message = ValueType UniqueTag ∷ ReferenceType ℕ-Reply ∷ ValueType ℕ ∷ [ ValueType ℕ ]ˡ
Calculate : InboxShape
Calculate = [ ℕ×ℕ→ℕ-Message ]ˡ
Calculator : InboxShape
Calculator = ℕ×ℕ→ℕ-Message ∷ [ ℕ×ℕ→ℕ-Message ]ˡ
calculator-actor : ∀ {i} → ∞ActorM (↑ i) Calculator (Lift (lsuc lzero) ⊤) [] (λ _ → [])
calculator-actor .force = receive ∞>>= λ {
(Msg Z (tag ∷ _ ∷ n ∷ m ∷ [])) .force →
Z ![t: Z ] (lift tag ∷ [ lift (n + m) ]ᵃ) ∞>> (do
strengthen []
calculator-actor)
; (Msg (S Z) (tag ∷ _ ∷ n ∷ m ∷ [])) .force →
(Z ![t: Z ] (lift tag ∷ ([ lift (n * m) ]ᵃ))) ∞>> (do
(strengthen [])
calculator-actor)
; (Msg (S (S ())) _)
}
TestBox : InboxShape
TestBox = ℕ-Reply
accept-tagged-ℕ : UniqueTag → MessageFilter TestBox
accept-tagged-ℕ tag (Msg Z (tag' ∷ _)) = ⌊ tag ≟ tag' ⌋
accept-tagged-ℕ tag (Msg (S ()) _)
calculator-test-actor : ∀{i} → ∞ActorM i TestBox (Lift (lsuc lzero) ℕ) [] (λ _ → [])
calculator-test-actor = do
spawn∞ calculator-actor
self
(S Z ![t: Z ] ((lift 0) ∷ (([ Z ]>: ⊆-refl) ∷ lift 32 ∷ [ lift 10 ]ᵃ)))
(strengthen (⊆-suc ⊆-refl))
sm: Msg Z (_ ∷ n ∷ []) [ _ ] ← (selective-receive (accept-tagged-ℕ 0))
where
sm: Msg (S ()) _ [ _ ]
self
(S Z ![t: S Z ] ((lift 0) ∷ (([ Z ]>: ⊆-refl) ∷ lift 32 ∷ [ lift 10 ]ᵃ)))
strengthen (⊆-suc ⊆-refl)
sm: Msg Z (_ ∷ m ∷ []) [ _ ] ← (selective-receive (accept-tagged-ℕ 0))
where
sm: Msg (S ()) _ [ _ ]
strengthen []
return m
|
LAB 5/DEF.asm | smellycattt/Microprocessor-Programming | 1 | 163135 | .MODEL TINY
.DATA
ATTRIBUTE DB 04H
BEGINROW DW 00
BEGINCOL DW 00
ENDROW DW 150
ENDCOL DW 250
ORIGINAL DB ?
COLGAP DW 20
ROWGAP DW 10
RECTC DB 6 ;NUMBER OF RECTANGLES
.CODE
.STARTUP
MOV AH,0FH ;GETTING THE DISPLAY MODE
INT 10H
MOV ORIGINAL,AL ;PRESERVING THE ORIGINAL VALUE OF AL
MOV AL,12H ;SETTING THE DISPLAY MODE TO GRAPHICAL MODE
MOV AH,00
INT 10H
X4: MOV DX,BEGINROW
X2: MOV CX,BEGINCOL
X1: MOV AL,ATTRIBUTE ;PIXEL COLOR
MOV AH,0CH ;FILLING A PIXEL
INT 10H
INC CX
CMP CX,ENDCOL
JNZ X1
INC DX
CMP DX,ENDROW
JNZ X2
DEC RECTC
JZ X3
;MODIFICATION FOR THE NEXT RECTANGLE
MOV AX, ROWGAP ;REDUCING THE RECTANGLE SIZE
ADD BEGINROW,AX
SUB ENDROW,AX
MOV AX, COLGAP ;REDUCING THE RECTANGLE SIZE
ADD BEGINCOL,AX
SUB ENDCOL,AX
CMP ATTRIBUTE, 04H
JZ CHANGEATTR
JMP CHANGEATTR2
CHANGEATTR: MOV ATTRIBUTE, 02H
JMP FINAL
CHANGEATTR2: MOV ATTRIBUTE, 04H
FINAL: JMP X4
X3: MOV AH,07H ;TERMINATING THE PROGRAM
INT 21H
CMP AL,'E'
JNZ X3
MOV AL,ORIGINAL ;RESTORING THE ORIGINAL DISPALY MODE
MOV AH,0
INT 10H
.EXIT
END
|
test/Succeed/RewritingRuleInWhereBlock.agda | alhassy/agda | 3 | 12473 | <gh_stars>1-10
{-# OPTIONS --rewriting #-}
open import Common.Prelude
open import Common.Equality
{-# BUILTIN REWRITE _≡_ #-}
postulate
f g : Nat → Nat
f-zero : f zero ≡ g zero
f-suc : ∀ n → f n ≡ g n → f (suc n) ≡ g (suc n)
r : (n : Nat) → f n ≡ g n
r zero = f-zero
r (suc n) = f-suc n refl
where
rn : f n ≡ g n
rn = r n
{-# REWRITE rn #-}
|
test/Succeed/Issue2223-function.agda | shlevy/agda | 1,989 | 4791 | <reponame>shlevy/agda
-- Andreas, 2016-10-09, issue #2223
-- The level constraint solver needs to combine constraints
-- from different contexts and modules.
-- The parameter refinement broke this test case.
-- {-# OPTIONS -v tc.with.top:25 #-}
-- {-# OPTIONS -v tc.conv.nat:40 #-}
-- {-# OPTIONS -v tc.constr.add:45 #-}
open import Common.Level
module _ (a ℓ : Level) where
module Function where
mutual
X : Level
X = _ -- Agda 2.5.1.1 solves this level meta
X<=a : Set (X ⊔ a) → Set a
X<=a A = A
test : Set₁
test with (lsuc ℓ)
... | _ = Set
where
a<=X : Set (X ⊔ a) → Set X
a<=X A = A
-- Should solve all metas.
|
Ada/inc/Problem_62.ads | Tim-Tom/project-euler | 0 | 22397 | package Problem_62 is
procedure Solve;
end Problem_62;
|
coverage/PENDING_SUBMIT/amdvlk/0616-COVERAGE-instruction-simplify-4051-4151/work/variant/1_spirv_asm/shader.frag.asm | asuonpaa/ShaderTests | 0 | 15446 | <reponame>asuonpaa/ShaderTests
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 90
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %13 %77
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 320
OpName %4 "main"
OpName %9 "ipos"
OpName %13 "gl_FragCoord"
OpName %19 "a"
OpName %46 "v"
OpName %50 "tex"
OpName %77 "_GLF_color"
OpName %85 "indexable"
OpDecorate %13 BuiltIn FragCoord
OpDecorate %50 RelaxedPrecision
OpDecorate %50 DescriptorSet 0
OpDecorate %50 Binding 0
OpDecorate %51 RelaxedPrecision
OpDecorate %54 RelaxedPrecision
OpDecorate %77 Location 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeInt 32 1
%7 = OpTypeVector %6 2
%8 = OpTypePointer Function %7
%10 = OpTypeFloat 32
%11 = OpTypeVector %10 4
%12 = OpTypePointer Input %11
%13 = OpVariable %12 Input
%14 = OpTypeVector %10 2
%18 = OpTypePointer Function %6
%20 = OpTypeInt 32 0
%21 = OpConstant %20 0
%24 = OpConstant %6 5
%26 = OpConstant %20 1
%32 = OpConstant %6 10
%42 = OpConstant %6 3
%43 = OpTypeBool
%45 = OpTypePointer Function %11
%47 = OpTypeImage %10 2D 0 0 0 1 Unknown
%48 = OpTypeSampledImage %47
%49 = OpTypePointer UniformConstant %48
%50 = OpVariable %49 UniformConstant
%52 = OpConstant %10 1
%53 = OpConstantComposite %14 %52 %52
%60 = OpTypePointer Function %10
%63 = OpConstant %10 2
%65 = OpConstant %6 4
%69 = OpConstant %6 0
%76 = OpTypePointer Output %11
%77 = OpVariable %76 Output
%78 = OpConstant %20 4
%79 = OpTypeArray %11 %78
%80 = OpConstant %10 0
%81 = OpConstantComposite %11 %52 %80 %80 %52
%82 = OpConstantComposite %79 %81 %81 %81 %81
%84 = OpTypePointer Function %79
%89 = OpConstantComposite %11 %80 %80 %80 %80
%4 = OpFunction %2 None %3
%5 = OpLabel
%9 = OpVariable %8 Function
%19 = OpVariable %18 Function
%46 = OpVariable %45 Function
%85 = OpVariable %84 Function
%15 = OpLoad %11 %13
%16 = OpVectorShuffle %14 %15 %15 0 1
%17 = OpConvertFToS %7 %16
OpStore %9 %17
%22 = OpAccessChain %18 %9 %21
%23 = OpLoad %6 %22
%25 = OpBitwiseAnd %6 %23 %24
%27 = OpAccessChain %18 %9 %26
%28 = OpLoad %6 %27
%29 = OpBitwiseAnd %6 %28 %24
%30 = OpAccessChain %18 %9 %21
%31 = OpLoad %6 %30
%33 = OpBitwiseAnd %6 %31 %32
%34 = OpBitwiseOr %6 %29 %33
%35 = OpIAdd %6 %25 %34
OpStore %19 %35
OpBranch %36
%36 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%41 = OpLoad %6 %19
%44 = OpSGreaterThan %43 %41 %42
OpBranchConditional %44 %37 %38
%37 = OpLabel
%51 = OpLoad %48 %50
%54 = OpImageSampleImplicitLod %11 %51 %53
OpStore %46 %54
OpBranch %55
%55 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%61 = OpAccessChain %60 %46 %21
%62 = OpLoad %10 %61
%64 = OpFOrdGreaterThan %43 %62 %63
OpBranchConditional %64 %56 %57
%56 = OpLabel
OpBranch %58
%58 = OpLabel
OpBranch %55
%57 = OpLabel
%66 = OpLoad %6 %19
%67 = OpISub %6 %66 %65
OpStore %19 %67
OpBranch %39
%39 = OpLabel
OpBranch %36
%38 = OpLabel
%68 = OpLoad %6 %19
%70 = OpSGreaterThanEqual %43 %68 %69
%71 = OpLoad %6 %19
%72 = OpSLessThan %43 %71 %65
%73 = OpLogicalAnd %43 %70 %72
OpSelectionMerge %75 None
OpBranchConditional %73 %74 %88
%74 = OpLabel
%83 = OpLoad %6 %19
OpStore %85 %82
%86 = OpAccessChain %45 %85 %83
%87 = OpLoad %11 %86
OpStore %77 %87
OpBranch %75
%88 = OpLabel
OpStore %77 %89
OpBranch %75
%75 = OpLabel
OpReturn
OpFunctionEnd
|
examples/5.dpd-with file and dynamic values.applescript | doekman/ASPashua | 1 | 78 | use script "ASPashua"
use scripting additions
-- This script demonstrates form validation and re-displays the entered
-- data, so the user doesn't have to re-enter the data.
on validate_data(entered_data)
if email of entered_data does not contain "@" then
return "Please enter a valid email address."
end if
try
set age_int to (age of entered_data) as integer
if age_int < 21 then
return "Sorry, you are too young. Ask a grown up to fill out this form."
end if
on error err_msg number err_nr
return "Please enter a valid age"
end try
if agree of entered_data is not "1" then
return "You need to agree with our policy."
end if
return ""
end validate_data
-- Get the path to the current folder, and create an alias for the mentioned file
set script_path to (path to me as text) & "::"
set config_file_name to "5.dpd-with file and dynamic values.pashua"
set config_file to alias (script_path & config_file_name)
try
set entered_data to display pashua dialog config_file
set error_message to validate_data(entered_data)
repeat until error_message = ""
set dyn_val to entered_data & {message:"Error encountered:" & return & "* " & error_message}
set entered_data to display pashua dialog config_file dynamic values dyn_val
set error_message to validate_data(entered_data)
end repeat
display notification "With your consent, you will be spammed at " & email of entered_data & "." with title "Hello " & |name| of entered_data
on error number -128
display notification "You did not complete the form, and thus will not share in the advantages of our generous offers." with title "Hello anonymous"
end try |
oeis/186/A186300.asm | neoneye/loda-programs | 11 | 14315 | ; A186300: (A007521(n)+1)/2.
; Submitted by <NAME>
; 3,7,15,19,27,31,51,55,75,79,87,91,99,115,135,139,147,159,175,187,195,199,211,231,255,271,279,307,327,331,339,351,355,367,379,387,399,411,415,427,439,471,499,507,511,531,535,547,555,559,591,607
mov $1,4
mov $2,$0
pow $2,2
lpb $2
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,8
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
sub $0,4
div $0,2
add $0,3
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1462.asm | ljhsiun2/medusa | 9 | 86187 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0xb4b0, %r10
nop
nop
nop
nop
inc %r9
movb (%r10), %r8b
nop
nop
nop
nop
nop
dec %rbx
lea addresses_WT_ht+0x1badc, %r11
and $25, %rdi
movb (%r11), %dl
nop
nop
nop
xor %r8, %r8
lea addresses_WT_ht+0x10fe0, %r9
nop
add %r11, %r11
movb (%r9), %dl
nop
nop
nop
dec %r11
lea addresses_normal_ht+0x181e0, %r10
nop
nop
cmp $55955, %rdi
movl $0x61626364, (%r10)
nop
nop
nop
add %r9, %r9
lea addresses_A_ht+0xc0a0, %r9
nop
nop
nop
nop
xor $25763, %rdi
mov (%r9), %dx
nop
nop
nop
nop
xor $58371, %r9
lea addresses_D_ht+0x15240, %r11
nop
nop
nop
dec %rdx
and $0xffffffffffffffc0, %r11
movntdqa (%r11), %xmm5
vpextrq $1, %xmm5, %r9
nop
nop
nop
nop
dec %r9
lea addresses_WT_ht+0x12350, %rsi
lea addresses_A_ht+0x1ad00, %rdi
clflush (%rdi)
xor $989, %rdx
mov $78, %rcx
rep movsl
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0x129e0, %rcx
xor $23290, %rbx
mov $0x6162636465666768, %r11
movq %r11, %xmm7
vmovups %ymm7, (%rcx)
nop
dec %rcx
lea addresses_WC_ht+0xd9e0, %rdi
nop
nop
nop
nop
cmp %r10, %r10
movw $0x6162, (%rdi)
and %rcx, %rcx
lea addresses_WC_ht+0x159a8, %rsi
lea addresses_A_ht+0x1bfe0, %rdi
nop
nop
nop
nop
sub %r9, %r9
mov $122, %rcx
rep movsb
and $39871, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rax
push %rbp
push %rdx
// Faulty Load
lea addresses_PSE+0x15de0, %rax
nop
nop
add %r13, %r13
mov (%rax), %r15
lea oracles, %rdx
and $0xff, %r15
shlq $12, %r15
mov (%rdx,%r15,1), %r15
pop %rdx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 4}, 'dst': {'same': True, 'type': 'addresses_A_ht', 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 9}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
data/maps/objects/Route8.asm | opiter09/ASM-Machina | 1 | 170095 | <gh_stars>1-10
Route8_Object:
db $2c ; border block
def_warps
warp 1, 9, 0, ROUTE_8_GATE
warp 1, 10, 1, ROUTE_8_GATE
warp 8, 9, 2, ROUTE_8_GATE
warp 8, 10, 3, ROUTE_8_GATE
warp 13, 3, 0, UNDERGROUND_PATH_ROUTE_8
def_signs
sign 17, 3, 10 ; Route8Text10
def_objects
object SPRITE_SUPER_NERD, 8, 5, STAY, RIGHT, 1, OPP_SUPER_NERD, 3
object SPRITE_GAMBLER, 13, 9, STAY, UP, 2, OPP_GAMBLER, 5
object SPRITE_SUPER_NERD, 42, 6, STAY, UP, 3, OPP_SUPER_NERD, 4
object SPRITE_COOLTRAINER_F, 26, 3, STAY, LEFT, 4, OPP_LASS, 13
object SPRITE_SUPER_NERD, 26, 4, STAY, RIGHT, 5, OPP_SUPER_NERD, 5
object SPRITE_COOLTRAINER_F, 26, 5, STAY, LEFT, 6, OPP_LASS, 14
object SPRITE_COOLTRAINER_F, 26, 6, STAY, RIGHT, 7, OPP_LASS, 15
object SPRITE_GAMBLER, 46, 13, STAY, DOWN, 8, OPP_GAMBLER, 7
object SPRITE_COOLTRAINER_F, 51, 12, STAY, LEFT, 9, OPP_LASS, 16
def_warps_to ROUTE_8
|
programs/oeis/123/A123094.asm | neoneye/loda | 22 | 179646 | ; A123094: Sum of first n 12th powers.
; 0,1,4097,535538,17312754,261453379,2438235715,16279522916,84998999652,367428536133,1367428536133,4505856912854,13421957361110,36720042483591,93413954858887,223160292749512,504635269460168,1087257506689929,2244088888116105,4457403807182266,8553403807182266,15909231318568907,28764233949618123,50678858381638444,87199205817695020,146803850593085645,242232807254767821,392327442551766942,624545707640979358,978360490846448399,1509801490846448399,2297464274634998160,3450385779241845136,5118275294194830097,7504695977887931153,10883916485944571778,15622297824266188674,22205249830106223955,31270987738601219411,43652545394177644532,60429761394177644532,82993251694543830613,113122721181183512149,153082351978446088550,205736442755223677286,274688966310155317911,364451267983710552727,480642751092659130968,630230094190746866264,821811325571313280665,1065951950571313280665,1375581294946934696266,1766458301433184889162,2257717205689911043803,2872504831866419443419,3638722697276819834044,4589888711082233889980,5766135004985673557981,7215360356995274749917,8994557775234807466798,11171340111234807466798,13825689085532393625119,17051955847930293446175,20961144176409121325856,25683510659278766539552,31371519722384479430177,38203195175631905830433,46385914080264762974994,56160693200671704900370,67807023123449016312931,81648310324449016312931,98057993065089827447172,117466403026855170253188,140368451073345428964709,167332222489266213475685,199008574513344582616310,236141836986540084004086,279581725508503667652007,330296585665744704947623,389388096697418858329064,458107573433418858329064,537874016510291368192425,630294072780591266380201,737184080519252390790362,860594387536528526361818,1002836144672700645502443,1166510792418288158440939,1354542474619785831059020,1570213630441466834521676,1817204034006728974825197,2099633570487728974825197,2422109057901333757490878,2789775445556215999297214,3208371743035586672832815,3684292057849840049307951,4224652145512477012198576,4837361902842244375970992,5531204263837682376266033,6315920987572482409652529,7202305859288611690311330
mov $1,2
lpb $0
mov $2,$0
sub $0,1
pow $2,12
add $1,$2
lpe
sub $1,2
mov $0,$1
|
arch/ARM/RP/svd/rp2040/rp_svd-xosc.ads | morbos/Ada_Drivers_Library | 2 | 23747 | <filename>arch/ARM/RP/svd/rp2040/rp_svd-xosc.ads
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
--
-- SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from rp2040.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
-- Controls the crystal oscillator
package RP_SVD.XOSC is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Frequency range. This resets to 0xAA0 and cannot be changed.
type CTRL_FREQ_RANGE_Field is
(-- Reset value for the field
Ctrl_Freq_Range_Field_Reset,
Val_1_15Mhz,
Reserved_1,
Reserved_2,
Reserved_3)
with Size => 12;
for CTRL_FREQ_RANGE_Field use
(Ctrl_Freq_Range_Field_Reset => 0,
Val_1_15Mhz => 2720,
Reserved_1 => 2721,
Reserved_2 => 2722,
Reserved_3 => 2723);
-- On power-up this field is initialised to DISABLE and the chip runs from
-- the ROSC.\n If the chip has subsequently been programmed to run from the
-- XOSC then setting this field to DISABLE may lock-up the chip. If this is
-- a concern then run the clk_ref from the ROSC and enable the clk_sys
-- RESUS feature.\n The 12-bit code is intended to give some protection
-- against accidental writes. An invalid setting will enable the
-- oscillator.
type CTRL_ENABLE_Field is
(-- Reset value for the field
Ctrl_Enable_Field_Reset,
Disable,
Enable)
with Size => 12;
for CTRL_ENABLE_Field use
(Ctrl_Enable_Field_Reset => 0,
Disable => 3358,
Enable => 4011);
-- Crystal Oscillator Control
type CTRL_Register is record
-- Frequency range. This resets to 0xAA0 and cannot be changed.
FREQ_RANGE : CTRL_FREQ_RANGE_Field := Ctrl_Freq_Range_Field_Reset;
-- On power-up this field is initialised to DISABLE and the chip runs
-- from the ROSC.\n If the chip has subsequently been programmed to run
-- from the XOSC then setting this field to DISABLE may lock-up the
-- chip. If this is a concern then run the clk_ref from the ROSC and
-- enable the clk_sys RESUS feature.\n The 12-bit code is intended to
-- give some protection against accidental writes. An invalid setting
-- will enable the oscillator.
ENABLE : CTRL_ENABLE_Field := Ctrl_Enable_Field_Reset;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CTRL_Register use record
FREQ_RANGE at 0 range 0 .. 11;
ENABLE at 0 range 12 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- The current frequency range setting, always reads 0
type STATUS_FREQ_RANGE_Field is
(Val_1_15Mhz,
Reserved_1,
Reserved_2,
Reserved_3)
with Size => 2;
for STATUS_FREQ_RANGE_Field use
(Val_1_15Mhz => 0,
Reserved_1 => 1,
Reserved_2 => 2,
Reserved_3 => 3);
-- Crystal Oscillator Status
type STATUS_Register is record
-- Read-only. The current frequency range setting, always reads 0
FREQ_RANGE : STATUS_FREQ_RANGE_Field := RP_SVD.XOSC.Val_1_15Mhz;
-- unspecified
Reserved_2_11 : HAL.UInt10 := 16#0#;
-- Read-only. Oscillator is enabled but not necessarily running and
-- stable, resets to 0
ENABLED : Boolean := False;
-- unspecified
Reserved_13_23 : HAL.UInt11 := 16#0#;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. An invalid value has been written to CTRL_ENABLE or
-- CTRL_FREQ_RANGE or DORMANT
BADWRITE : Boolean := False;
-- unspecified
Reserved_25_30 : HAL.UInt6 := 16#0#;
-- Read-only. Oscillator is running and stable
STABLE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STATUS_Register use record
FREQ_RANGE at 0 range 0 .. 1;
Reserved_2_11 at 0 range 2 .. 11;
ENABLED at 0 range 12 .. 12;
Reserved_13_23 at 0 range 13 .. 23;
BADWRITE at 0 range 24 .. 24;
Reserved_25_30 at 0 range 25 .. 30;
STABLE at 0 range 31 .. 31;
end record;
subtype STARTUP_DELAY_Field is HAL.UInt14;
-- Controls the startup delay
type STARTUP_Register is record
-- in multiples of 256*xtal_period
DELAY_k : STARTUP_DELAY_Field := 16#0#;
-- unspecified
Reserved_14_19 : HAL.UInt6 := 16#0#;
-- Multiplies the startup_delay by 4. This is of little value to the
-- user given that the delay can be programmed directly
X4 : Boolean := False;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STARTUP_Register use record
DELAY_k at 0 range 0 .. 13;
Reserved_14_19 at 0 range 14 .. 19;
X4 at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype COUNT_COUNT_Field is HAL.UInt8;
-- A down counter running at the xosc frequency which counts to zero and
-- stops.\n To start the counter write a non-zero value.\n Can be used for
-- short software pauses when setting up time sensitive hardware.
type COUNT_Register is record
COUNT : COUNT_COUNT_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for COUNT_Register use record
COUNT at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Controls the crystal oscillator
type XOSC_Peripheral is record
-- Crystal Oscillator Control
CTRL : aliased CTRL_Register;
-- Crystal Oscillator Status
STATUS : aliased STATUS_Register;
-- Crystal Oscillator pause control\n This is used to save power by
-- pausing the XOSC\n On power-up this field is initialised to WAKE\n An
-- invalid write will also select WAKE\n WARNING: stop the PLLs before
-- selecting dormant mode\n WARNING: setup the irq before selecting
-- dormant mode
DORMANT : aliased HAL.UInt32;
-- Controls the startup delay
STARTUP : aliased STARTUP_Register;
-- A down counter running at the xosc frequency which counts to zero and
-- stops.\n To start the counter write a non-zero value.\n Can be used
-- for short software pauses when setting up time sensitive hardware.
COUNT : aliased COUNT_Register;
end record
with Volatile;
for XOSC_Peripheral use record
CTRL at 16#0# range 0 .. 31;
STATUS at 16#4# range 0 .. 31;
DORMANT at 16#8# range 0 .. 31;
STARTUP at 16#C# range 0 .. 31;
COUNT at 16#1C# range 0 .. 31;
end record;
-- Controls the crystal oscillator
XOSC_Periph : aliased XOSC_Peripheral
with Import, Address => XOSC_Base;
end RP_SVD.XOSC;
|
bbbvv/Files Only/Generic File Processing Droplet.applescript | bbelyeu/applescripts | 12 | 3631 | <reponame>bbelyeu/applescripts<filename>bbbvv/Files Only/Generic File Processing Droplet.applescript<gh_stars>10-100
property type_list : {} -- eg: {"PICT", "JPEG", "TIFF", "GIFf"}
property extension_list : {} -- eg: {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}
property typeIDs_list : {} -- eg: {"public.jpeg", "public.tiff", "public.png"}
-- This droplet processes files dropped onto the applet
on open these_items
repeat with i from 1 to the count of these_items
set this_item to item i of these_items
set the item_info to info for this_item
try
set this_extension to the name extension of item_info
on error
set this_extension to ""
end try
try
set this_filetype to the file type of item_info
on error
set this_filetype to ""
end try
try
set this_typeID to the type identifier of item_info
on error
set this_typeID to ""
end try
if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
process_item(this_item)
end if
end repeat
end open
-- this sub-routine processes files
on process_item(this_item)
-- NOTE that the variable this_item is a file reference in alias format
-- FILE PROCESSING STATEMENTS GOES HERE
end process_item |
Cubical/Codata/M/AsLimit/helper.agda | dan-iel-lee/cubical | 0 | 2811 | {-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-}
module Cubical.Codata.M.AsLimit.helper where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv using (_≃_)
open import Cubical.Foundations.Function using (_∘_)
open import Cubical.Data.Unit
open import Cubical.Data.Prod
open import Cubical.Data.Nat as ℕ using (ℕ ; suc ; _+_ )
open import Cubical.Data.Sigma hiding (_×_)
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Path
open import Cubical.Functions.Embedding
open import Cubical.Functions.FunExtEquiv
open Iso
-- General
iso→fun-Injection :
∀ {ℓ} {A B C : Type ℓ} (isom : Iso A B)
→ ∀ {f g : C -> A}
→ (x : C) → (Iso.fun isom (f x) ≡ Iso.fun isom (g x)) ≡ (f x ≡ g x)
iso→fun-Injection {A = A} {B} {C} isom {f = f} {g} =
isEmbedding→Injection {A = A} {B} {C} (Iso.fun isom) (iso→isEmbedding {A = A} {B} isom) {f = f} {g = g}
abstract
iso→Pi-fun-Injection :
∀ {ℓ} {A B C : Type ℓ} (isom : Iso A B)
→ ∀ {f g : C -> A}
→ Iso (∀ x → (fun isom) (f x) ≡ (fun isom) (g x)) (∀ x → f x ≡ g x)
iso→Pi-fun-Injection {A = A} {B} {C} isom {f = f} {g} =
pathToIso (cong (λ k → ∀ x → k x) (funExt (iso→fun-Injection isom {f = f} {g = g})))
iso→fun-Injection-Iso :
∀ {ℓ} {A B C : Type ℓ} (isom : Iso A B)
→ ∀ {f g : C -> A}
→ Iso (fun isom ∘ f ≡ fun isom ∘ g) (f ≡ g)
iso→fun-Injection-Iso {A = A} {B} {C} isom {f = f} {g} =
(fun isom) ∘ f ≡ (fun isom) ∘ g
Iso⟨ invIso funExtIso ⟩
(∀ x → (fun isom) (f x) ≡ (fun isom) (g x))
Iso⟨ iso→Pi-fun-Injection isom ⟩
(∀ x → f x ≡ g x)
Iso⟨ funExtIso ⟩
f ≡ g ∎Iso
iso→fun-Injection-Path :
∀ {ℓ} {A B C : Type ℓ} (isom : Iso A B)
→ ∀ {f g : C -> A}
→ (fun isom ∘ f ≡ fun isom ∘ g) ≡ (f ≡ g)
iso→fun-Injection-Path {A = A} {B} {C} isom {f = f} {g} =
isoToPath (iso→fun-Injection-Iso isom)
iso→inv-Injection-Path :
∀ {ℓ} {A B C : Type ℓ} (isom : Iso A B) →
∀ {f g : C -> B} →
-----------------------
((inv isom) ∘ f ≡ (inv isom) ∘ g) ≡ (f ≡ g)
iso→inv-Injection-Path {A = A} {B} {C} isom {f = f} {g} = iso→fun-Injection-Path (invIso isom)
iso→fun-Injection-Iso-x :
∀ {ℓ} {A B : Type ℓ}
→ (isom : Iso A B)
→ ∀ {x y : A}
→ Iso ((fun isom) x ≡ (fun isom) y) (x ≡ y)
iso→fun-Injection-Iso-x isom {x} {y} =
let tempx = λ {(lift tt) → x}
tempy = λ {(lift tt) → y} in
fun isom x ≡ fun isom y
Iso⟨ iso (λ x₁ t → x₁)
(λ x₁ → x₁ (lift tt))
(λ x → refl)
(λ x → refl) ⟩
(∀ (t : Lift Unit) -> (((fun isom) ∘ tempx) t ≡ ((fun isom) ∘ tempy) t))
Iso⟨ iso→Pi-fun-Injection isom ⟩
(∀ (t : Lift Unit) -> tempx t ≡ tempy t)
Iso⟨ iso (λ x₁ → x₁ (lift tt))
(λ x₁ t → x₁)
(λ x → refl)
(λ x → refl) ⟩
x ≡ y ∎Iso
iso→inv-Injection-Iso-x :
∀ {ℓ} {A B : Type ℓ}
→ (isom : Iso A B)
→ ∀ {x y : B}
→ Iso ((inv isom) x ≡ (inv isom) y) (x ≡ y)
iso→inv-Injection-Iso-x {A = A} {B = B} isom =
iso→fun-Injection-Iso-x {A = B} {B = A} (invIso isom)
iso→fun-Injection-Path-x :
∀ {ℓ} {A B : Type ℓ}
→ (isom : Iso A B)
→ ∀ {x y : A}
→ ((fun isom) x ≡ (fun isom) y) ≡ (x ≡ y)
iso→fun-Injection-Path-x isom {x} {y} =
isoToPath (iso→fun-Injection-Iso-x isom)
iso→inv-Injection-Path-x :
∀ {ℓ} {A B : Type ℓ}
→ (isom : Iso A B)
→ ∀ {x y : B}
→ ((inv isom) x ≡ (inv isom) y) ≡ (x ≡ y)
iso→inv-Injection-Path-x isom =
isoToPath (iso→inv-Injection-Iso-x isom)
|
source/parser_fsm.adb | jquorning/CELLE | 0 | 6996 | --
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
with Ada.Strings.Unbounded;
with Types;
with Symbols;
with Errors;
with Rules;
with Rule_Lists;
package body Parser_FSM is
package Unbounded renames Ada.Strings.Unbounded;
subtype Ustring is Unbounded.Unbounded_String;
subtype Session_Type is Sessions.Session_Type;
subtype Scanner_Record is Parser_Data.Scanner_Record;
subtype Symbol_Record is Symbols.Symbol_Record;
subtype Rule_Symbol_Access is Rules.Rule_Symbol_Access;
subtype Dot_Type is Rules.Dot_Type;
subtype Index_Number is Rules.Index_Number;
Null_Ustring : constant Ustring :=
Unbounded.Null_Unbounded_String;
function To_String (Item : Ustring) return String
renames Unbounded.To_String;
function To_Ustring (Item : String) return Ustring
renames Unbounded.To_Unbounded_String;
function Length (Item : Ustring) return Natural
renames Unbounded.Length;
use Parser_Data;
procedure Do_State_Waiting_For_Decl_Or_Rule (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Precedence_Mark_1 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Precedence_Mark_2 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Decl_Keyword (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Destructor_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Decl_Arg (Session : in Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Arrow (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_LHS_Alias_1 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_LHS_Alias_2 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_LHS_Alias_3 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_RHS_Alias_1 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_RHS_Alias_2 (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_In_RHS (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Datatype_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Precedence_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Fallback_Id (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Token_Name (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Wildcard_Id (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Class_Id (Scanner : in out Scanner_Record;
Token : in String);
procedure Do_State_Waiting_For_Class_Token (Scanner : in out Scanner_Record;
Token : in String);
--
--
--
use Errors;
procedure Do_State (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
C : Character renames Token (Token'First);
begin
case Scanner.State is
when DUMMY =>
null;
when WAITING_FOR_DECL_OR_RULE =>
Do_State_Waiting_For_Decl_Or_Rule (Session, Scanner, Token);
when PRECEDENCE_MARK_1 =>
Do_State_Precedence_Mark_1 (Scanner, Token);
when PRECEDENCE_MARK_2 =>
Do_State_Precedence_Mark_2 (Scanner, Token);
when WAITING_FOR_ARROW =>
Do_State_Waiting_For_Arrow (Scanner, Token);
when LHS_ALIAS_1 =>
Do_State_LHS_Alias_1 (Scanner, Token);
when LHS_ALIAS_2 =>
Do_State_LHS_Alias_2 (Scanner, Token);
when LHS_ALIAS_3 =>
Do_State_LHS_Alias_3 (Scanner, Token);
when IN_RHS =>
Do_State_In_RHS (Session, Scanner, Token);
when RHS_ALIAS_1 =>
Do_State_RHS_Alias_1 (Scanner, Token);
when RHS_ALIAS_2 =>
Do_State_RHS_Alias_2 (Scanner, Token);
when WAITING_FOR_DECL_KEYWORD =>
Do_State_Waiting_For_Decl_Keyword (Session, Scanner, Token);
when WAITING_FOR_DESTRUCTOR_SYMBOL =>
Do_State_Waiting_For_Destructor_Symbol (Session, Scanner, Token);
when WAITING_FOR_DATATYPE_SYMBOL =>
Do_State_Waiting_For_Datatype_Symbol (Session, Scanner, Token);
when WAITING_FOR_PRECEDENCE_SYMBOL =>
Do_State_Waiting_For_Precedence_Symbol (Session, Scanner, Token);
when WAITING_FOR_DECL_ARG =>
Do_State_Waiting_For_Decl_Arg (Session, Scanner, Token);
when WAITING_FOR_FALLBACK_ID =>
Do_State_Waiting_For_Fallback_Id (Session, Scanner, Token);
when WAITING_FOR_TOKEN_NAME =>
Do_State_Waiting_For_Token_Name (Scanner, Token);
when WAITING_FOR_WILDCARD_ID =>
Do_State_Waiting_For_Wildcard_Id (Session, Scanner, Token);
when WAITING_FOR_CLASS_ID =>
Do_State_Waiting_For_Class_Id (Scanner, Token);
when WAITING_FOR_CLASS_TOKEN =>
Do_State_Waiting_For_Class_Token (Scanner, Token);
when RESYNC_AFTER_RULE_ERROR =>
-- // if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
-- // break;
null;
when RESYNC_AFTER_DECL_ERROR =>
case C is
when '.' =>
Scanner.State := WAITING_FOR_DECL_OR_RULE;
when '%' =>
Scanner.State := WAITING_FOR_DECL_KEYWORD;
when others =>
null;
end case;
end case;
end Do_State;
procedure Initialize_FSM (Session : in out Session_Type;
Scanner : in out Scanner_Record)
is
pragma Unreferenced (Session);
use Rule_Lists.Lists;
begin
Scanner.Previous_Rule := No_Element;
Scanner.Prec_Counter := 0;
Scanner.Rule := Empty_List;
Scanner.State := WAITING_FOR_DECL_OR_RULE;
end Initialize_FSM;
procedure Do_State_Waiting_For_Decl_Or_Rule (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
pragma Unreferenced (Session);
use Rules;
use Rule_Lists.Lists;
Cur : Character renames Token (Token'First);
begin
if Cur = '%' then
Scanner.State := WAITING_FOR_DECL_KEYWORD;
elsif Cur in 'a' .. 'z' then
Scanner.LHS.Clear;
Scanner.LHS.Append (Symbols.Create (Token));
Scanner.RHS.Clear;
Scanner.LHS_Alias.Clear;
Scanner.State := WAITING_FOR_ARROW;
elsif Cur = '{' then
if Scanner.Previous_Rule = No_Element then
Parser_Error (E001, Scanner.Token_Lineno);
elsif Rules."/=" (Element (Scanner.Previous_Rule).Code, Null_Code) then
Parser_Error (E002, Scanner.Token_Lineno);
elsif Token = "{NEVER-REDUCE" then
Element (Scanner.Previous_Rule).Never_Reduce := True;
else
Element (Scanner.Previous_Rule).Line := Scanner.Token_Lineno;
Element (Scanner.Previous_Rule).Code :=
Ustring'(To_Ustring (Token (Token'First + 1 .. Token'Last)));
Element (Scanner.Previous_Rule).No_Code := False;
end if;
elsif Cur = '[' then
Scanner.State := PRECEDENCE_MARK_1;
else
Parser_Error (E003, Scanner.Token_Lineno, Token);
end if;
end Do_State_Waiting_For_Decl_Or_Rule;
procedure Do_State_Precedence_Mark_1 (Scanner : in out Scanner_Record;
Token : in String)
is
use Rules;
use Rule_Lists.Lists;
begin
if Token (Token'First) not in 'A' .. 'Z' then
Parser_Error (E004, Scanner.Token_Lineno);
elsif Scanner.Previous_Rule = No_Element then
Parser_Error (E005, Scanner.Token_Lineno, Token);
elsif Element (Scanner.Previous_Rule).Prec_Symbol /= null then
Parser_Error (E006, Scanner.Token_Lineno);
else
Element (Scanner.Previous_Rule).Prec_Symbol :=
Rule_Symbol_Access (Symbols.Create (Token));
end if;
Scanner.State := PRECEDENCE_MARK_2;
end Do_State_Precedence_Mark_1;
procedure Do_State_Precedence_Mark_2 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if Token (Token'First) /= ']' then
Parser_Error (E007, Scanner.Token_Lineno);
end if;
Scanner.State := WAITING_FOR_DECL_OR_RULE;
end Do_State_Precedence_Mark_2;
procedure Do_State_Waiting_For_Decl_Keyword (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
Cur : Character renames Token (Token'First);
begin
if
Cur in 'a' .. 'z' or
Cur in 'A' .. 'Z'
then
Scanner.Decl_Keyword := To_Ustring (Token);
Scanner.Decl_Arg_Slot := null;
Scanner.Insert_Line_Macro := True;
Scanner.State := WAITING_FOR_DECL_ARG;
if Token = "name" then
Scanner.Decl_Arg_Slot := Session.Names.Name'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "include" then
Scanner.Decl_Arg_Slot := Session.Names.Include'Access;
elsif Token = "code" then
Scanner.Decl_Arg_Slot := Session.Names.Extra_Code'Access;
elsif Token = "token_destructor" then
Scanner.Decl_Arg_Slot := Session.Names.Token_Dest'Access;
elsif Token = "default_destructor" then
Scanner.Decl_Arg_Slot := Session.Names.Var_Dest'Access;
elsif Token = "token_prefix" then
Scanner.Decl_Arg_Slot := Session.Names.Token_Prefix'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "syntax_error" then
Scanner.Decl_Arg_Slot := Session.Names.Error'Access;
elsif Token = "parse_accept" then
Scanner.Decl_Arg_Slot := Session.Names.C_Accept'Access;
elsif Token = "parse_failure" then
Scanner.Decl_Arg_Slot := Session.Names.Failure'Access;
elsif Token = "stack_overflow" then
Scanner.Decl_Arg_Slot := Session.Names.Overflow'Access;
elsif Token = "extra_argument" then
Scanner.Decl_Arg_Slot := Session.Names.ARG2'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "extra_context" then
Scanner.Decl_Arg_Slot := Session.Names.CTX2'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "token_type" then
Scanner.Decl_Arg_Slot := Session.Names.Token_Type'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "default_type" then
Scanner.Decl_Arg_Slot := Session.Names.Var_Type'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "stack_size" then
Scanner.Decl_Arg_Slot := Session.Names.Stack_Size'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "start_symbol" then
Scanner.Decl_Arg_Slot := Session.Names.Start'Access;
Scanner.Insert_Line_Macro := False;
elsif Token = "left" then
Scanner.Prec_Counter := Scanner.Prec_Counter + 1;
Scanner.Decl_Association := Symbols.Left_Association;
Scanner.State := WAITING_FOR_PRECEDENCE_SYMBOL;
elsif Token = "right" then
Scanner.Prec_Counter := Scanner.Prec_Counter + 1;
Scanner.Decl_Association := Symbols.Right_Association;
Scanner.State := WAITING_FOR_PRECEDENCE_SYMBOL;
elsif Token = "nonassoc" then
Scanner.Prec_Counter := Scanner.Prec_Counter + 1;
Scanner.Decl_Association := Symbols.No_Association;
Scanner.State := WAITING_FOR_PRECEDENCE_SYMBOL;
elsif Token = "destructor" then
Scanner.State := WAITING_FOR_DESTRUCTOR_SYMBOL;
elsif Token = "type" then
Scanner.State := WAITING_FOR_DATATYPE_SYMBOL;
elsif Token = "fallback" then
Scanner.Fallback := null;
Scanner.State := WAITING_FOR_FALLBACK_ID;
elsif Token = "token" then
Scanner.State := WAITING_FOR_TOKEN_NAME;
elsif Token = "wildcard" then
Scanner.State := WAITING_FOR_WILDCARD_ID;
elsif Token = "token_class" then
Scanner.State := WAITING_FOR_CLASS_ID;
else
Parser_Error (E203, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
end if;
else
Parser_Error (E204, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
end if;
end Do_State_Waiting_For_Decl_Keyword;
procedure Do_State_Waiting_For_Destructor_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
pragma Unreferenced (Session);
begin
if
Token (Token'First) not in 'a' .. 'z' and
Token (Token'First) not in 'A' .. 'Z'
then
Parser_Error (E205, Scanner.Token_Lineno);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
else
declare
use Symbols;
Symbol : Symbol_Access := Create (Token);
begin
Scanner.Decl_Arg_Slot := new Ustring'(Symbol.Destructor);
Scanner.Decl_Lineno_Slot := Symbol.Dest_Lineno'Access;
Scanner.Insert_Line_Macro := True;
end;
Scanner.State := WAITING_FOR_DECL_ARG;
end if;
end Do_State_Waiting_For_Destructor_Symbol;
procedure Do_State_Waiting_For_Arrow (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if
Token'Length >= 3 and then
Token (Token'First .. Token'First + 2) = "::="
then
Scanner.State := IN_RHS;
elsif Token (Token'First) = '(' then
Scanner.State := LHS_ALIAS_1;
else
declare
use Symbols;
begin
Parser_Error (E008, Scanner.Token_Lineno,
Name_Of (Scanner.LHS.First_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end;
end if;
end Do_State_Waiting_For_Arrow;
procedure Do_State_LHS_Alias_1 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if
Token (Token'First) in 'a' .. 'z' or
Token (Token'First) in 'A' .. 'Z'
then
Scanner.LHS_Alias.Clear;
Scanner.LHS_Alias.Append (To_Alias (Token));
Scanner.State := LHS_ALIAS_2;
else
Parser_Error
(E009, Scanner.Token_Lineno,
Argument_1 => Token,
Argument_2 => Symbols.Name_Of (Scanner.LHS.First_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_LHS_Alias_1;
procedure Do_State_LHS_Alias_2 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if Token (Token'First) = ')' then
Scanner.State := LHS_ALIAS_3;
else
Parser_Error (E010, Scanner.Token_Lineno,
To_String (Scanner.LHS_Alias.First_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_LHS_Alias_2;
procedure Do_State_LHS_Alias_3 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if Token (Token'First .. Token'First + 2) = "::=" then
Scanner.State := IN_RHS;
else
Parser_Error
(E011, Scanner.Token_Lineno,
Argument_1 => Symbols.Name_Of (Scanner.LHS.First_Element),
Argument_2 => To_String (Scanner.LHS_Alias.First_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_LHS_Alias_3;
procedure Do_State_RHS_Alias_1 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if
Token (Token'First) in 'a' .. 'z' or
Token (Token'First) in 'A' .. 'Z'
then
Scanner.Alias.Append (To_Alias (Token));
Scanner.State := RHS_ALIAS_2;
else
Parser_Error
(E012, Scanner.Token_Lineno,
Argument_1 => Token,
Argument_2 => Symbols.Name_Of (Scanner.RHS.Last_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_RHS_Alias_1;
procedure Do_State_RHS_Alias_2 (Scanner : in out Scanner_Record;
Token : in String)
is
begin
if Token (Token'First) = ')' then
Scanner.State := IN_RHS;
else
Parser_Error (E013, Scanner.Token_Lineno,
To_String (Scanner.LHS_Alias.First_Element));
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_RHS_Alias_2;
procedure Do_State_In_RHS (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
pragma Unreferenced (Session);
Cur : Character renames Token (Token'First);
begin
if Cur = '.' then
declare
use Rule_Lists;
use Rules.Alias_Vectors;
Rule : Rule_Access;
begin
Rule := new Rules.Rule_Record;
Rule.Rule_Line := Scanner.Token_Lineno;
for I in Scanner.RHS.First_Index .. Scanner.RHS.Last_Index loop
Rule.RHS.Append
(New_Item => Rules.Rule_Symbol_Access (Scanner.RHS.Element (I)),
Count => 1);
if I in Scanner.Alias.First_Index .. Scanner.Alias.Last_Index then
Rule.RHS_Alias.Append (Scanner.Alias.Element (I));
else
Rule.RHS_Alias.Append (Null_Ustring);
end if;
if Length (Rule.RHS_Alias.Element (Dot_Type (I))) /= 0 then
declare
Symbol : constant Rule_Symbol_Access := Rule.RHS (Dot_Type (I));
begin
Symbol.Content := True;
end;
end if;
end loop;
Rule.LHS := Rule_Symbol_Access (Scanner.LHS.First_Element);
if Scanner.LHS_Alias.Is_Empty then
Rule.LHS_Alias := Null_Ustring;
else
Rule.LHS_Alias := Scanner.LHS_Alias.First_Element;
end if;
Rule.Code := Rules.Null_Code;
Rule.No_Code := True;
Rule.Prec_Symbol := null;
Rule.Index := Index_Number (Scanner.Rule.Length);
declare
use Symbols;
begin
Rule.Next_LHS := Rules.Rule_Access (Symbol_Access (Rule.LHS).Rule);
Symbol_Access (Rule.LHS).Rule := Rule;
end;
Scanner.Rule.Append (Rule);
Scanner.Previous_Rule := Scanner.Rule.Last;
end;
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif
Cur in 'a' .. 'z' or
Cur in 'A' .. 'Z'
then
Scanner.RHS .Append (Symbols.Create (Token));
Scanner.Alias.Append (Null_Ustring);
elsif
(Cur = '|' or Cur = '/') and not
Scanner.RHS.Is_Empty
then
declare
use Symbols;
Symbol : Symbol_Access := Scanner.RHS.Last_Element;
begin
if Symbol.Kind /= Multi_Terminal then
declare
Orig_Symbol : constant Symbol_Access := Symbol;
begin
Symbol := new Symbol_Record;
Symbol.Kind := Multi_Terminal;
Symbol.Sub_Symbol.Append (Orig_Symbol);
Symbol.Name := Orig_Symbol.Name;
Scanner.RHS.Delete_Last;
Scanner.RHS.Append (Symbol);
end;
end if;
Symbol.Sub_Symbol.Append
(Symbols.Create (Token (Token'First + 1 .. Token'Last)));
if
Token (Token'First + 1) in 'a' .. 'z' or
To_String (Symbol.Sub_Symbol.First_Element.Name) (1) in 'a' .. 'z'
then
Parser_Error (E201, Scanner.Token_Lineno);
end if;
end;
elsif Cur = '(' and not Scanner.RHS.Is_Empty then
Scanner.State := RHS_ALIAS_1;
else
Parser_Error (E202, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_RULE_ERROR;
end if;
end Do_State_In_RHS;
procedure Do_State_Waiting_For_Decl_Arg (Session : in Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
Cur : Character renames Token (Token'First);
begin
if
Cur = '{' or
Cur = '"' or
Cur in 'a' .. 'z' or
Cur in 'A' .. 'Z' or
Cur in '0' .. '9'
then
declare
use Unbounded;
use type Types.Line_Number;
N : Integer;
Back : Integer;
New_String : constant String := Token;
Old_String : Ustring;
Buf_String : Ustring;
Z : Ustring;
New_First : Positive := New_String'First;
Old_Length : Natural;
Z_Pos : Natural;
Add_Line_Macro : Boolean;
Line : Ustring;
begin
if
New_String (New_First) = '"' or
New_String (New_First) = '{'
then
New_First := New_First + 1;
end if;
if Scanner.Decl_Arg_Slot = null then
Old_String := To_Ustring ("");
else
Old_String := Scanner.Decl_Arg_Slot.all;
end if;
Old_Length := Length (Old_String);
N := Old_Length + New_First + 20;
Add_Line_Macro :=
-- not Scanner.Gp.No_Linenos_Flag and
not Session.No_Linenos_Flag and
Scanner.Insert_Line_Macro and
(Scanner.Decl_Lineno_Slot = null or
Scanner.Decl_Lineno_Slot.all /= 0);
--
-- Add line macro
--
if Add_Line_Macro then
Z := Scanner.File_Name;
Z_Pos := 1;
Back := 0;
while Z_Pos <= Length (Z) loop
if Element (Z, Z_Pos) = '\' then
Back := Back + 1;
end if;
Z_Pos := Z_Pos + 1;
end loop;
Line := To_Unbounded_String ("#line ");
Append (Line, Types.Line_Number'Image (Scanner.Token_Lineno));
Append (Line, " ");
N := N + Length (Line) + Length (Scanner.File_Name) + Back;
end if;
-- Scanner.Decl_Arg_Slot = (char *) realloc(Scanner.Decl_Arg_Slot, n);
Buf_String := Scanner.Decl_Arg_Slot.all; -- + nOld;
if Add_Line_Macro then
-- if
-- Old_Length /= 0 and
-- Element (Buf_String, -1) /= ASCII.LF
-- then
-- -- *(zBuf++) := ASCII.NL;
-- Append (Buf_String, ASCII.LF);
-- end if;
-- Append line feed to Buf is missing at end
if
(Length (Old_String) /= 0 and Length (Buf_String) /= 0) and then
Element (Buf_String, Length (Buf_String)) /= ASCII.LF
then
Append (Buf_String, ASCII.LF);
end if;
Append (Buf_String, Line);
-- Put_Line ("## XX");
-- Put_Line (To_String (Buf_String));
-- Buf_String := Buf_String; -- + nLine;
-- *(zBuf++) = '"';
Append (Buf_String, '"');
Append (Z, Scanner.File_Name);
while Z_Pos <= Length (Z) loop
if Element (Z, Z_Pos) = '\' then
Append (Buf_String, '\');
end if;
-- *(zBuf++) = *z;
Append (Buf_String, Element (Z, Z_Pos));
Z_Pos := Z_Pos + 1;
end loop;
-- *(zBuf++) := '"';
-- *(zBuf++) := ASCII.NL;
Append (Buf_String, '"');
Append (Buf_String, ASCII.LF);
end if;
if
Scanner.Decl_Lineno_Slot /= null and
Scanner.Decl_Lineno_Slot.all = 0
then
Scanner.Decl_Lineno_Slot.all := Scanner.Token_Lineno;
end if;
Buf_String := To_Unbounded_String (New_String);
-- Buf_String := Buf_String; -- + nNew;
-- *zBuf := 0;
Scanner.State := WAITING_FOR_DECL_OR_RULE;
-- Scanner.Done := True;
end;
else
Parser_Error (E213, Scanner.Token_Lineno,
Argument_1 => To_String (Scanner.Decl_Keyword),
Argument_2 => Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
end if;
end Do_State_Waiting_For_Decl_Arg;
procedure Do_State_Waiting_For_Datatype_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
pragma Unreferenced (Session);
use type Ustring;
begin
if
Token (Token'First) not in 'a' .. 'z' and
Token (Token'First) not in 'A' .. 'Z'
then
Parser_Error (E206, Scanner.Token_Lineno);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
else
declare
use Symbols;
Symbol : Symbol_Access := Find (Token);
begin
if
Symbol /= null and then
Symbol.Data_Type /= Null_Ustring
then
Parser_Error (E207, Scanner.Line, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
else
if Symbol = null then
Symbol := Create (Token);
end if;
Scanner.Decl_Arg_Slot
:= Symbol.Data_Type'Access;
-- Scanner.Decl_Arg_Slot := new Unbounded_String'(Symbol.Data_Type);
-- new chars_ptr'(New_String (To_String (Symbol.Data_Type)));
Scanner.Insert_Line_Macro := False;
Scanner.State := WAITING_FOR_DECL_ARG;
end if;
end;
end if;
end Do_State_Waiting_For_Datatype_Symbol;
procedure Do_State_Waiting_For_Precedence_Symbol (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
pragma Unreferenced (Session);
begin
if Token (Token'First) = '.' then
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif Token (Token'First) in 'A' .. 'Z' then
declare
use Symbols;
Symbol : constant Symbol_Access := Create (Token);
begin
if Symbol.Precedence >= 0 then
Parser_Error (E217, Scanner.Token_Lineno, Token);
else
Symbol.Precedence := Scanner.Prec_Counter;
Symbol.Association := Scanner.Decl_Association;
end if;
end;
else
Parser_Error (E218, Scanner.Token_Lineno, Token);
end if;
end Do_State_Waiting_For_Precedence_Symbol;
procedure Do_State_Waiting_For_Fallback_Id (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
begin
if Token (Token'First) = '.' then
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif Token (Token'First) not in 'A' .. 'Z' then
Parser_Error (E215, Scanner.Token_Lineno, Token);
else
declare
use Symbols;
Symbol : constant Symbol_Access := Create (Token);
begin
if Scanner.Fallback = null then
Scanner.Fallback := Symbol;
elsif Symbol.Fallback /= null then
Parser_Error (E216, Scanner.Token_Lineno, Token);
else
Symbol.Fallback := Scanner.Fallback;
Session.Has_Fallback := True;
-- Scanner.Gp.Has_Fallback := True;
end if;
end;
end if;
end Do_State_Waiting_For_Fallback_Id;
procedure Do_State_Waiting_For_Token_Name (Scanner : in out Scanner_Record;
Token : in String)
is
begin
-- Tokens do not have to be declared before use. But they can be
-- in order to control their assigned integer number. The number for
-- each token is assigned when it is first seen. So by including
--
-- %token ONE TWO THREE
--
-- early in the grammar file, that assigns small consecutive values
-- to each of the tokens ONE TWO and THREE.
if Token (Token'First) = '.' then
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif Token (Token'First) not in 'A' .. 'Z' then
Parser_Error (E214, Scanner.Token_Lineno, Token);
else
declare
use Symbols;
Dummy_Symbol : Symbol_Access;
begin
Dummy_Symbol := Create (Token);
end;
end if;
end Do_State_Waiting_For_Token_Name;
procedure Do_State_Waiting_For_Wildcard_Id (Session : in out Session_Type;
Scanner : in out Scanner_Record;
Token : in String)
is
C : Character renames Token (Token'First);
begin
if C = '.' then
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif C not in 'A' .. 'Z' then
Parser_Error (E211, Scanner.Token_Lineno, Token);
else
declare
use Symbols;
Symbol : constant Symbol_Access := Create (Token);
begin
if Session.Wildcard = null then
Session.Wildcard := Symbol;
else
Parser_Error (E212, Scanner.Token_Lineno, Token);
end if;
end;
end if;
end Do_State_Waiting_For_Wildcard_Id;
procedure Do_State_Waiting_For_Class_Id (Scanner : in out Scanner_Record;
Token : in String)
is
use Symbols;
C : Character renames Token (Token'First);
begin
if C not in 'a' .. 'z' then
Parser_Error (E209, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
elsif Find (Token) /= null then
Parser_Error (E210, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
else
Scanner.Token_Class := Create (Token);
Scanner.Token_Class.Kind := Multi_Terminal;
Scanner.State := WAITING_FOR_CLASS_TOKEN;
end if;
end Do_State_Waiting_For_Class_Id;
procedure Do_State_Waiting_For_Class_Token (Scanner : in out Scanner_Record;
Token : in String)
is
C : Character renames Token (Token'First);
begin
if C = '.' then
Scanner.State := WAITING_FOR_DECL_OR_RULE;
elsif
C in 'A' .. 'Z' or
((C = '|' or C = '/') and
Token (Token'First + 1) in 'A' .. 'Z')
then
declare
use Symbols;
Symbol : constant Symbol_Access := Scanner.Token_Class;
First : Natural := Token'First;
begin
if C not in 'A' .. 'Z' then
First := Token'First + 1;
end if;
Symbol.Sub_Symbol.Append (Create (Token (First .. Token'Last)));
end;
else
Parser_Error (E208, Scanner.Token_Lineno, Token);
Scanner.State := RESYNC_AFTER_DECL_ERROR;
end if;
end Do_State_Waiting_For_Class_Token;
end Parser_FSM;
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2387.asm | ljhsiun2/medusa | 9 | 17916 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x22a3, %r10
nop
nop
nop
and $57754, %r15
mov (%r10), %r12
nop
nop
and $36821, %rcx
lea addresses_UC_ht+0x603b, %rdx
clflush (%rdx)
nop
sub $49587, %rbx
and $0xffffffffffffffc0, %rdx
movntdqa (%rdx), %xmm6
vpextrq $0, %xmm6, %r10
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_WC_ht+0x2803, %rsi
lea addresses_A_ht+0x8d33, %rdi
nop
add %rbx, %rbx
mov $97, %rcx
rep movsb
nop
nop
nop
nop
dec %r10
lea addresses_A_ht+0x1ca83, %rdx
inc %rbx
movb (%rdx), %r12b
nop
nop
nop
nop
nop
and $50334, %rdi
lea addresses_WC_ht+0x1257, %rsi
lea addresses_WC_ht+0xe1eb, %rdi
nop
nop
nop
nop
nop
and $7382, %rbx
mov $106, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_UC_ht+0x19403, %rsi
lea addresses_normal_ht+0x10703, %rdi
nop
nop
xor %r12, %r12
mov $126, %rcx
rep movsl
nop
nop
nop
sub $30385, %rdi
lea addresses_D_ht+0xb283, %rbx
nop
nop
add %rsi, %rsi
mov (%rbx), %cx
nop
nop
nop
nop
inc %rdi
lea addresses_D_ht+0x1cf83, %rsi
nop
nop
xor %r12, %r12
movw $0x6162, (%rsi)
sub %rcx, %rcx
lea addresses_UC_ht+0x12e03, %rbx
nop
nop
nop
nop
inc %r10
mov (%rbx), %esi
cmp $43754, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r8
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_D+0x14d63, %rax
sub $8508, %r13
movl $0x51525354, (%rax)
add %r8, %r8
// Store
lea addresses_WC+0xc8c1, %r9
nop
sub $42107, %r14
movb $0x51, (%r9)
nop
nop
nop
nop
nop
cmp %r14, %r14
// Store
lea addresses_normal+0x3098, %rax
nop
nop
nop
xor %rbp, %rbp
movl $0x51525354, (%rax)
nop
nop
nop
nop
cmp %r8, %r8
// REPMOV
lea addresses_WT+0x1c783, %rsi
lea addresses_PSE+0x3463, %rdi
nop
nop
nop
nop
add $50442, %r9
mov $110, %rcx
rep movsb
nop
nop
nop
nop
dec %r9
// Faulty Load
lea addresses_WC+0x13183, %r8
nop
nop
inc %rbp
movb (%r8), %r9b
lea oracles, %rax
and $0xff, %r9
shlq $12, %r9
mov (%rax,%r9,1), %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 1, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_PSE', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': True, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
wc.asm | oolojed1/CS-350-Project-1 | 0 | 90705 | <filename>wc.asm
_wc: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
printf(1, "%d %d %d %s\n", l, w, c, name);
}
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 57 push %edi
e: 56 push %esi
f: be 01 00 00 00 mov $0x1,%esi
14: 53 push %ebx
15: 51 push %ecx
16: 83 ec 18 sub $0x18,%esp
19: 8b 01 mov (%ecx),%eax
1b: 8b 59 04 mov 0x4(%ecx),%ebx
1e: 89 45 e4 mov %eax,-0x1c(%ebp)
21: 83 c3 04 add $0x4,%ebx
int fd, i;
if(argc <= 1){
24: 83 f8 01 cmp $0x1,%eax
27: 7e 56 jle 7f <main+0x7f>
29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wc(0, "");
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
30: 83 ec 08 sub $0x8,%esp
33: 6a 00 push $0x0
35: ff 33 pushl (%ebx)
37: e8 d5 03 00 00 call 411 <open>
3c: 83 c4 10 add $0x10,%esp
3f: 89 c7 mov %eax,%edi
41: 85 c0 test %eax,%eax
43: 78 26 js 6b <main+0x6b>
printf(1, "wc: cannot open %s\n", argv[i]);
exit();
}
wc(fd, argv[i]);
45: 83 ec 08 sub $0x8,%esp
48: ff 33 pushl (%ebx)
for(i = 1; i < argc; i++){
4a: 83 c6 01 add $0x1,%esi
4d: 83 c3 04 add $0x4,%ebx
wc(fd, argv[i]);
50: 50 push %eax
51: e8 4a 00 00 00 call a0 <wc>
close(fd);
56: 89 3c 24 mov %edi,(%esp)
59: e8 9b 03 00 00 call 3f9 <close>
for(i = 1; i < argc; i++){
5e: 83 c4 10 add $0x10,%esp
61: 39 75 e4 cmp %esi,-0x1c(%ebp)
64: 75 ca jne 30 <main+0x30>
}
exit();
66: e8 66 03 00 00 call 3d1 <exit>
printf(1, "wc: cannot open %s\n", argv[i]);
6b: 50 push %eax
6c: ff 33 pushl (%ebx)
6e: 68 db 08 00 00 push $0x8db
73: 6a 01 push $0x1
75: e8 d6 04 00 00 call 550 <printf>
exit();
7a: e8 52 03 00 00 call 3d1 <exit>
wc(0, "");
7f: 52 push %edx
80: 52 push %edx
81: 68 cd 08 00 00 push $0x8cd
86: 6a 00 push $0x0
88: e8 13 00 00 00 call a0 <wc>
exit();
8d: e8 3f 03 00 00 call 3d1 <exit>
92: 66 90 xchg %ax,%ax
94: 66 90 xchg %ax,%ax
96: 66 90 xchg %ax,%ax
98: 66 90 xchg %ax,%ax
9a: 66 90 xchg %ax,%ax
9c: 66 90 xchg %ax,%ax
9e: 66 90 xchg %ax,%ax
000000a0 <wc>:
{
a0: 55 push %ebp
a1: 89 e5 mov %esp,%ebp
a3: 57 push %edi
a4: 56 push %esi
a5: 53 push %ebx
l = w = c = 0;
a6: 31 db xor %ebx,%ebx
{
a8: 83 ec 1c sub $0x1c,%esp
inword = 0;
ab: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
l = w = c = 0;
b2: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
b9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
while((n = read(fd, buf, sizeof(buf))) > 0){
c0: 83 ec 04 sub $0x4,%esp
c3: 68 00 02 00 00 push $0x200
c8: 68 00 0c 00 00 push $0xc00
cd: ff 75 08 pushl 0x8(%ebp)
d0: e8 14 03 00 00 call 3e9 <read>
d5: 83 c4 10 add $0x10,%esp
d8: 89 c6 mov %eax,%esi
da: 85 c0 test %eax,%eax
dc: 7e 62 jle 140 <wc+0xa0>
for(i=0; i<n; i++){
de: 31 ff xor %edi,%edi
e0: eb 14 jmp f6 <wc+0x56>
e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
inword = 0;
e8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for(i=0; i<n; i++){
ef: 83 c7 01 add $0x1,%edi
f2: 39 fe cmp %edi,%esi
f4: 74 42 je 138 <wc+0x98>
if(buf[i] == '\n')
f6: 0f be 87 00 0c 00 00 movsbl 0xc00(%edi),%eax
l++;
fd: 31 c9 xor %ecx,%ecx
ff: 3c 0a cmp $0xa,%al
101: 0f 94 c1 sete %cl
if(strchr(" \r\t\n\v", buf[i]))
104: 83 ec 08 sub $0x8,%esp
107: 50 push %eax
l++;
108: 01 cb add %ecx,%ebx
if(strchr(" \r\t\n\v", buf[i]))
10a: 68 b8 08 00 00 push $0x8b8
10f: e8 3c 01 00 00 call 250 <strchr>
114: 83 c4 10 add $0x10,%esp
117: 85 c0 test %eax,%eax
119: 75 cd jne e8 <wc+0x48>
else if(!inword){
11b: 8b 55 e4 mov -0x1c(%ebp),%edx
11e: 85 d2 test %edx,%edx
120: 75 cd jne ef <wc+0x4f>
for(i=0; i<n; i++){
122: 83 c7 01 add $0x1,%edi
w++;
125: 83 45 e0 01 addl $0x1,-0x20(%ebp)
inword = 1;
129: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
for(i=0; i<n; i++){
130: 39 fe cmp %edi,%esi
132: 75 c2 jne f6 <wc+0x56>
134: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
138: 01 75 dc add %esi,-0x24(%ebp)
13b: eb 83 jmp c0 <wc+0x20>
13d: 8d 76 00 lea 0x0(%esi),%esi
if(n < 0){
140: 75 24 jne 166 <wc+0xc6>
printf(1, "%d %d %d %s\n", l, w, c, name);
142: 83 ec 08 sub $0x8,%esp
145: ff 75 0c pushl 0xc(%ebp)
148: ff 75 dc pushl -0x24(%ebp)
14b: ff 75 e0 pushl -0x20(%ebp)
14e: 53 push %ebx
14f: 68 ce 08 00 00 push $0x8ce
154: 6a 01 push $0x1
156: e8 f5 03 00 00 call 550 <printf>
}
15b: 83 c4 20 add $0x20,%esp
15e: 8d 65 f4 lea -0xc(%ebp),%esp
161: 5b pop %ebx
162: 5e pop %esi
163: 5f pop %edi
164: 5d pop %ebp
165: c3 ret
printf(1, "wc: read error\n");
166: 50 push %eax
167: 50 push %eax
168: 68 be 08 00 00 push $0x8be
16d: 6a 01 push $0x1
16f: e8 dc 03 00 00 call 550 <printf>
exit();
174: e8 58 02 00 00 call 3d1 <exit>
179: 66 90 xchg %ax,%ax
17b: 66 90 xchg %ax,%ax
17d: 66 90 xchg %ax,%ax
17f: 90 nop
00000180 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
180: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
181: 31 d2 xor %edx,%edx
{
183: 89 e5 mov %esp,%ebp
185: 53 push %ebx
186: 8b 45 08 mov 0x8(%ebp),%eax
189: 8b 5d 0c mov 0xc(%ebp),%ebx
18c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while((*s++ = *t++) != 0)
190: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
194: 88 0c 10 mov %cl,(%eax,%edx,1)
197: 83 c2 01 add $0x1,%edx
19a: 84 c9 test %cl,%cl
19c: 75 f2 jne 190 <strcpy+0x10>
;
return os;
}
19e: 5b pop %ebx
19f: 5d pop %ebp
1a0: c3 ret
1a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1af: 90 nop
000001b0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
1b0: 55 push %ebp
1b1: 89 e5 mov %esp,%ebp
1b3: 56 push %esi
1b4: 53 push %ebx
1b5: 8b 5d 08 mov 0x8(%ebp),%ebx
1b8: 8b 75 0c mov 0xc(%ebp),%esi
while(*p && *p == *q)
1bb: 0f b6 13 movzbl (%ebx),%edx
1be: 0f b6 0e movzbl (%esi),%ecx
1c1: 84 d2 test %dl,%dl
1c3: 74 1e je 1e3 <strcmp+0x33>
1c5: b8 01 00 00 00 mov $0x1,%eax
1ca: 38 ca cmp %cl,%dl
1cc: 74 09 je 1d7 <strcmp+0x27>
1ce: eb 20 jmp 1f0 <strcmp+0x40>
1d0: 83 c0 01 add $0x1,%eax
1d3: 38 ca cmp %cl,%dl
1d5: 75 19 jne 1f0 <strcmp+0x40>
1d7: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
1db: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
1df: 84 d2 test %dl,%dl
1e1: 75 ed jne 1d0 <strcmp+0x20>
1e3: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
1e5: 5b pop %ebx
1e6: 5e pop %esi
return (uchar)*p - (uchar)*q;
1e7: 29 c8 sub %ecx,%eax
}
1e9: 5d pop %ebp
1ea: c3 ret
1eb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1ef: 90 nop
1f0: 0f b6 c2 movzbl %dl,%eax
1f3: 5b pop %ebx
1f4: 5e pop %esi
return (uchar)*p - (uchar)*q;
1f5: 29 c8 sub %ecx,%eax
}
1f7: 5d pop %ebp
1f8: c3 ret
1f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000200 <strlen>:
uint
strlen(char *s)
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
206: 80 39 00 cmpb $0x0,(%ecx)
209: 74 15 je 220 <strlen+0x20>
20b: 31 d2 xor %edx,%edx
20d: 8d 76 00 lea 0x0(%esi),%esi
210: 83 c2 01 add $0x1,%edx
213: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
217: 89 d0 mov %edx,%eax
219: 75 f5 jne 210 <strlen+0x10>
;
return n;
}
21b: 5d pop %ebp
21c: c3 ret
21d: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
220: 31 c0 xor %eax,%eax
}
222: 5d pop %ebp
223: c3 ret
224: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
22b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
22f: 90 nop
00000230 <memset>:
void*
memset(void *dst, int c, uint n)
{
230: 55 push %ebp
231: 89 e5 mov %esp,%ebp
233: 57 push %edi
234: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
237: 8b 4d 10 mov 0x10(%ebp),%ecx
23a: 8b 45 0c mov 0xc(%ebp),%eax
23d: 89 d7 mov %edx,%edi
23f: fc cld
240: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
242: 89 d0 mov %edx,%eax
244: 5f pop %edi
245: 5d pop %ebp
246: c3 ret
247: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
24e: 66 90 xchg %ax,%ax
00000250 <strchr>:
char*
strchr(const char *s, char c)
{
250: 55 push %ebp
251: 89 e5 mov %esp,%ebp
253: 53 push %ebx
254: 8b 45 08 mov 0x8(%ebp),%eax
257: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
25a: 0f b6 18 movzbl (%eax),%ebx
25d: 84 db test %bl,%bl
25f: 74 1d je 27e <strchr+0x2e>
261: 89 d1 mov %edx,%ecx
if(*s == c)
263: 38 d3 cmp %dl,%bl
265: 75 0d jne 274 <strchr+0x24>
267: eb 17 jmp 280 <strchr+0x30>
269: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
270: 38 ca cmp %cl,%dl
272: 74 0c je 280 <strchr+0x30>
for(; *s; s++)
274: 83 c0 01 add $0x1,%eax
277: 0f b6 10 movzbl (%eax),%edx
27a: 84 d2 test %dl,%dl
27c: 75 f2 jne 270 <strchr+0x20>
return (char*)s;
return 0;
27e: 31 c0 xor %eax,%eax
}
280: 5b pop %ebx
281: 5d pop %ebp
282: c3 ret
283: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
28a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000290 <gets>:
char*
gets(char *buf, int max)
{
290: 55 push %ebp
291: 89 e5 mov %esp,%ebp
293: 57 push %edi
294: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
295: 31 f6 xor %esi,%esi
{
297: 53 push %ebx
298: 89 f3 mov %esi,%ebx
29a: 83 ec 1c sub $0x1c,%esp
29d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
2a0: eb 2f jmp 2d1 <gets+0x41>
2a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
2a8: 83 ec 04 sub $0x4,%esp
2ab: 8d 45 e7 lea -0x19(%ebp),%eax
2ae: 6a 01 push $0x1
2b0: 50 push %eax
2b1: 6a 00 push $0x0
2b3: e8 31 01 00 00 call 3e9 <read>
if(cc < 1)
2b8: 83 c4 10 add $0x10,%esp
2bb: 85 c0 test %eax,%eax
2bd: 7e 1c jle 2db <gets+0x4b>
break;
buf[i++] = c;
2bf: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
2c3: 83 c7 01 add $0x1,%edi
2c6: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
2c9: 3c 0a cmp $0xa,%al
2cb: 74 23 je 2f0 <gets+0x60>
2cd: 3c 0d cmp $0xd,%al
2cf: 74 1f je 2f0 <gets+0x60>
for(i=0; i+1 < max; ){
2d1: 83 c3 01 add $0x1,%ebx
2d4: 89 fe mov %edi,%esi
2d6: 3b 5d 0c cmp 0xc(%ebp),%ebx
2d9: 7c cd jl 2a8 <gets+0x18>
2db: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
2dd: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
2e0: c6 03 00 movb $0x0,(%ebx)
}
2e3: 8d 65 f4 lea -0xc(%ebp),%esp
2e6: 5b pop %ebx
2e7: 5e pop %esi
2e8: 5f pop %edi
2e9: 5d pop %ebp
2ea: c3 ret
2eb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2ef: 90 nop
2f0: 8b 75 08 mov 0x8(%ebp),%esi
2f3: 8b 45 08 mov 0x8(%ebp),%eax
2f6: 01 de add %ebx,%esi
2f8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
2fa: c6 03 00 movb $0x0,(%ebx)
}
2fd: 8d 65 f4 lea -0xc(%ebp),%esp
300: 5b pop %ebx
301: 5e pop %esi
302: 5f pop %edi
303: 5d pop %ebp
304: c3 ret
305: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
30c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000310 <stat>:
int
stat(char *n, struct stat *st)
{
310: 55 push %ebp
311: 89 e5 mov %esp,%ebp
313: 56 push %esi
314: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
315: 83 ec 08 sub $0x8,%esp
318: 6a 00 push $0x0
31a: ff 75 08 pushl 0x8(%ebp)
31d: e8 ef 00 00 00 call 411 <open>
if(fd < 0)
322: 83 c4 10 add $0x10,%esp
325: 85 c0 test %eax,%eax
327: 78 27 js 350 <stat+0x40>
return -1;
r = fstat(fd, st);
329: 83 ec 08 sub $0x8,%esp
32c: ff 75 0c pushl 0xc(%ebp)
32f: 89 c3 mov %eax,%ebx
331: 50 push %eax
332: e8 f2 00 00 00 call 429 <fstat>
close(fd);
337: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
33a: 89 c6 mov %eax,%esi
close(fd);
33c: e8 b8 00 00 00 call 3f9 <close>
return r;
341: 83 c4 10 add $0x10,%esp
}
344: 8d 65 f8 lea -0x8(%ebp),%esp
347: 89 f0 mov %esi,%eax
349: 5b pop %ebx
34a: 5e pop %esi
34b: 5d pop %ebp
34c: c3 ret
34d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
350: be ff ff ff ff mov $0xffffffff,%esi
355: eb ed jmp 344 <stat+0x34>
357: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
35e: 66 90 xchg %ax,%ax
00000360 <atoi>:
int
atoi(const char *s)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 53 push %ebx
364: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
367: 0f be 11 movsbl (%ecx),%edx
36a: 8d 42 d0 lea -0x30(%edx),%eax
36d: 3c 09 cmp $0x9,%al
n = 0;
36f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
374: 77 1f ja 395 <atoi+0x35>
376: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
37d: 8d 76 00 lea 0x0(%esi),%esi
n = n*10 + *s++ - '0';
380: 83 c1 01 add $0x1,%ecx
383: 8d 04 80 lea (%eax,%eax,4),%eax
386: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
38a: 0f be 11 movsbl (%ecx),%edx
38d: 8d 5a d0 lea -0x30(%edx),%ebx
390: 80 fb 09 cmp $0x9,%bl
393: 76 eb jbe 380 <atoi+0x20>
return n;
}
395: 5b pop %ebx
396: 5d pop %ebp
397: c3 ret
398: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
39f: 90 nop
000003a0 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
3a0: 55 push %ebp
3a1: 89 e5 mov %esp,%ebp
3a3: 57 push %edi
3a4: 8b 55 10 mov 0x10(%ebp),%edx
3a7: 8b 45 08 mov 0x8(%ebp),%eax
3aa: 56 push %esi
3ab: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
3ae: 85 d2 test %edx,%edx
3b0: 7e 13 jle 3c5 <memmove+0x25>
3b2: 01 c2 add %eax,%edx
dst = vdst;
3b4: 89 c7 mov %eax,%edi
3b6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3bd: 8d 76 00 lea 0x0(%esi),%esi
*dst++ = *src++;
3c0: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
3c1: 39 fa cmp %edi,%edx
3c3: 75 fb jne 3c0 <memmove+0x20>
return vdst;
}
3c5: 5e pop %esi
3c6: 5f pop %edi
3c7: 5d pop %ebp
3c8: c3 ret
000003c9 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
3c9: b8 01 00 00 00 mov $0x1,%eax
3ce: cd 40 int $0x40
3d0: c3 ret
000003d1 <exit>:
SYSCALL(exit)
3d1: b8 02 00 00 00 mov $0x2,%eax
3d6: cd 40 int $0x40
3d8: c3 ret
000003d9 <wait>:
SYSCALL(wait)
3d9: b8 03 00 00 00 mov $0x3,%eax
3de: cd 40 int $0x40
3e0: c3 ret
000003e1 <pipe>:
SYSCALL(pipe)
3e1: b8 04 00 00 00 mov $0x4,%eax
3e6: cd 40 int $0x40
3e8: c3 ret
000003e9 <read>:
SYSCALL(read)
3e9: b8 05 00 00 00 mov $0x5,%eax
3ee: cd 40 int $0x40
3f0: c3 ret
000003f1 <write>:
SYSCALL(write)
3f1: b8 10 00 00 00 mov $0x10,%eax
3f6: cd 40 int $0x40
3f8: c3 ret
000003f9 <close>:
SYSCALL(close)
3f9: b8 15 00 00 00 mov $0x15,%eax
3fe: cd 40 int $0x40
400: c3 ret
00000401 <kill>:
SYSCALL(kill)
401: b8 06 00 00 00 mov $0x6,%eax
406: cd 40 int $0x40
408: c3 ret
00000409 <exec>:
SYSCALL(exec)
409: b8 07 00 00 00 mov $0x7,%eax
40e: cd 40 int $0x40
410: c3 ret
00000411 <open>:
SYSCALL(open)
411: b8 0f 00 00 00 mov $0xf,%eax
416: cd 40 int $0x40
418: c3 ret
00000419 <mknod>:
SYSCALL(mknod)
419: b8 11 00 00 00 mov $0x11,%eax
41e: cd 40 int $0x40
420: c3 ret
00000421 <unlink>:
SYSCALL(unlink)
421: b8 12 00 00 00 mov $0x12,%eax
426: cd 40 int $0x40
428: c3 ret
00000429 <fstat>:
SYSCALL(fstat)
429: b8 08 00 00 00 mov $0x8,%eax
42e: cd 40 int $0x40
430: c3 ret
00000431 <link>:
SYSCALL(link)
431: b8 13 00 00 00 mov $0x13,%eax
436: cd 40 int $0x40
438: c3 ret
00000439 <mkdir>:
SYSCALL(mkdir)
439: b8 14 00 00 00 mov $0x14,%eax
43e: cd 40 int $0x40
440: c3 ret
00000441 <chdir>:
SYSCALL(chdir)
441: b8 09 00 00 00 mov $0x9,%eax
446: cd 40 int $0x40
448: c3 ret
00000449 <dup>:
SYSCALL(dup)
449: b8 0a 00 00 00 mov $0xa,%eax
44e: cd 40 int $0x40
450: c3 ret
00000451 <getpid>:
SYSCALL(getpid)
451: b8 0b 00 00 00 mov $0xb,%eax
456: cd 40 int $0x40
458: c3 ret
00000459 <sbrk>:
SYSCALL(sbrk)
459: b8 0c 00 00 00 mov $0xc,%eax
45e: cd 40 int $0x40
460: c3 ret
00000461 <sleep>:
SYSCALL(sleep)
461: b8 0d 00 00 00 mov $0xd,%eax
466: cd 40 int $0x40
468: c3 ret
00000469 <uptime>:
SYSCALL(uptime)
469: b8 0e 00 00 00 mov $0xe,%eax
46e: cd 40 int $0x40
470: c3 ret
00000471 <shutdown>:
SYSCALL(shutdown)
471: b8 16 00 00 00 mov $0x16,%eax
476: cd 40 int $0x40
478: c3 ret
00000479 <shutdown2>:
479: b8 17 00 00 00 mov $0x17,%eax
47e: cd 40 int $0x40
480: c3 ret
481: 66 90 xchg %ax,%ax
483: 66 90 xchg %ax,%ax
485: 66 90 xchg %ax,%ax
487: 66 90 xchg %ax,%ax
489: 66 90 xchg %ax,%ax
48b: 66 90 xchg %ax,%ax
48d: 66 90 xchg %ax,%ax
48f: 90 nop
00000490 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
490: 55 push %ebp
491: 89 e5 mov %esp,%ebp
493: 57 push %edi
494: 56 push %esi
495: 53 push %ebx
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
496: 89 d3 mov %edx,%ebx
{
498: 83 ec 3c sub $0x3c,%esp
49b: 89 45 bc mov %eax,-0x44(%ebp)
if(sgn && xx < 0){
49e: 85 d2 test %edx,%edx
4a0: 0f 89 92 00 00 00 jns 538 <printint+0xa8>
4a6: f6 45 08 01 testb $0x1,0x8(%ebp)
4aa: 0f 84 88 00 00 00 je 538 <printint+0xa8>
neg = 1;
4b0: c7 45 c0 01 00 00 00 movl $0x1,-0x40(%ebp)
x = -xx;
4b7: f7 db neg %ebx
} else {
x = xx;
}
i = 0;
4b9: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
4c0: 8d 75 d7 lea -0x29(%ebp),%esi
4c3: eb 08 jmp 4cd <printint+0x3d>
4c5: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
4c8: 89 7d c4 mov %edi,-0x3c(%ebp)
}while((x /= base) != 0);
4cb: 89 c3 mov %eax,%ebx
buf[i++] = digits[x % base];
4cd: 89 d8 mov %ebx,%eax
4cf: 31 d2 xor %edx,%edx
4d1: 8b 7d c4 mov -0x3c(%ebp),%edi
4d4: f7 f1 div %ecx
4d6: 83 c7 01 add $0x1,%edi
4d9: 0f b6 92 f8 08 00 00 movzbl 0x8f8(%edx),%edx
4e0: 88 14 3e mov %dl,(%esi,%edi,1)
}while((x /= base) != 0);
4e3: 39 d9 cmp %ebx,%ecx
4e5: 76 e1 jbe 4c8 <printint+0x38>
if(neg)
4e7: 8b 45 c0 mov -0x40(%ebp),%eax
4ea: 85 c0 test %eax,%eax
4ec: 74 0d je 4fb <printint+0x6b>
buf[i++] = '-';
4ee: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
4f3: ba 2d 00 00 00 mov $0x2d,%edx
buf[i++] = digits[x % base];
4f8: 89 7d c4 mov %edi,-0x3c(%ebp)
4fb: 8b 45 c4 mov -0x3c(%ebp),%eax
4fe: 8b 7d bc mov -0x44(%ebp),%edi
501: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
505: eb 0f jmp 516 <printint+0x86>
507: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
50e: 66 90 xchg %ax,%ax
510: 0f b6 13 movzbl (%ebx),%edx
513: 83 eb 01 sub $0x1,%ebx
write(fd, &c, 1);
516: 83 ec 04 sub $0x4,%esp
519: 88 55 d7 mov %dl,-0x29(%ebp)
51c: 6a 01 push $0x1
51e: 56 push %esi
51f: 57 push %edi
520: e8 cc fe ff ff call 3f1 <write>
while(--i >= 0)
525: 83 c4 10 add $0x10,%esp
528: 39 de cmp %ebx,%esi
52a: 75 e4 jne 510 <printint+0x80>
putc(fd, buf[i]);
}
52c: 8d 65 f4 lea -0xc(%ebp),%esp
52f: 5b pop %ebx
530: 5e pop %esi
531: 5f pop %edi
532: 5d pop %ebp
533: c3 ret
534: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
538: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
53f: e9 75 ff ff ff jmp 4b9 <printint+0x29>
544: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
54b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
54f: 90 nop
00000550 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
550: 55 push %ebp
551: 89 e5 mov %esp,%ebp
553: 57 push %edi
554: 56 push %esi
555: 53 push %ebx
556: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
559: 8b 75 0c mov 0xc(%ebp),%esi
55c: 0f b6 1e movzbl (%esi),%ebx
55f: 84 db test %bl,%bl
561: 0f 84 b9 00 00 00 je 620 <printf+0xd0>
ap = (uint*)(void*)&fmt + 1;
567: 8d 45 10 lea 0x10(%ebp),%eax
56a: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
56d: 8d 7d e7 lea -0x19(%ebp),%edi
state = 0;
570: 31 d2 xor %edx,%edx
ap = (uint*)(void*)&fmt + 1;
572: 89 45 d0 mov %eax,-0x30(%ebp)
575: eb 38 jmp 5af <printf+0x5f>
577: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
57e: 66 90 xchg %ax,%ax
580: 89 55 d4 mov %edx,-0x2c(%ebp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
583: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
588: 83 f8 25 cmp $0x25,%eax
58b: 74 17 je 5a4 <printf+0x54>
write(fd, &c, 1);
58d: 83 ec 04 sub $0x4,%esp
590: 88 5d e7 mov %bl,-0x19(%ebp)
593: 6a 01 push $0x1
595: 57 push %edi
596: ff 75 08 pushl 0x8(%ebp)
599: e8 53 fe ff ff call 3f1 <write>
59e: 8b 55 d4 mov -0x2c(%ebp),%edx
} else {
putc(fd, c);
5a1: 83 c4 10 add $0x10,%esp
5a4: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
5a7: 0f b6 5e ff movzbl -0x1(%esi),%ebx
5ab: 84 db test %bl,%bl
5ad: 74 71 je 620 <printf+0xd0>
c = fmt[i] & 0xff;
5af: 0f be cb movsbl %bl,%ecx
5b2: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
5b5: 85 d2 test %edx,%edx
5b7: 74 c7 je 580 <printf+0x30>
}
} else if(state == '%'){
5b9: 83 fa 25 cmp $0x25,%edx
5bc: 75 e6 jne 5a4 <printf+0x54>
if(c == 'd'){
5be: 83 f8 64 cmp $0x64,%eax
5c1: 0f 84 99 00 00 00 je 660 <printf+0x110>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
5c7: 81 e1 f7 00 00 00 and $0xf7,%ecx
5cd: 83 f9 70 cmp $0x70,%ecx
5d0: 74 5e je 630 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
5d2: 83 f8 73 cmp $0x73,%eax
5d5: 0f 84 d5 00 00 00 je 6b0 <printf+0x160>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
5db: 83 f8 63 cmp $0x63,%eax
5de: 0f 84 8c 00 00 00 je 670 <printf+0x120>
putc(fd, *ap);
ap++;
} else if(c == '%'){
5e4: 83 f8 25 cmp $0x25,%eax
5e7: 0f 84 b3 00 00 00 je 6a0 <printf+0x150>
write(fd, &c, 1);
5ed: 83 ec 04 sub $0x4,%esp
5f0: c6 45 e7 25 movb $0x25,-0x19(%ebp)
5f4: 6a 01 push $0x1
5f6: 57 push %edi
5f7: ff 75 08 pushl 0x8(%ebp)
5fa: e8 f2 fd ff ff call 3f1 <write>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
5ff: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
602: 83 c4 0c add $0xc,%esp
605: 6a 01 push $0x1
607: 83 c6 01 add $0x1,%esi
60a: 57 push %edi
60b: ff 75 08 pushl 0x8(%ebp)
60e: e8 de fd ff ff call 3f1 <write>
for(i = 0; fmt[i]; i++){
613: 0f b6 5e ff movzbl -0x1(%esi),%ebx
putc(fd, c);
617: 83 c4 10 add $0x10,%esp
}
state = 0;
61a: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
61c: 84 db test %bl,%bl
61e: 75 8f jne 5af <printf+0x5f>
}
}
}
620: 8d 65 f4 lea -0xc(%ebp),%esp
623: 5b pop %ebx
624: 5e pop %esi
625: 5f pop %edi
626: 5d pop %ebp
627: c3 ret
628: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
62f: 90 nop
printint(fd, *ap, 16, 0);
630: 83 ec 0c sub $0xc,%esp
633: b9 10 00 00 00 mov $0x10,%ecx
638: 6a 00 push $0x0
63a: 8b 5d d0 mov -0x30(%ebp),%ebx
63d: 8b 45 08 mov 0x8(%ebp),%eax
640: 8b 13 mov (%ebx),%edx
642: e8 49 fe ff ff call 490 <printint>
ap++;
647: 89 d8 mov %ebx,%eax
649: 83 c4 10 add $0x10,%esp
state = 0;
64c: 31 d2 xor %edx,%edx
ap++;
64e: 83 c0 04 add $0x4,%eax
651: 89 45 d0 mov %eax,-0x30(%ebp)
654: e9 4b ff ff ff jmp 5a4 <printf+0x54>
659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 10, 1);
660: 83 ec 0c sub $0xc,%esp
663: b9 0a 00 00 00 mov $0xa,%ecx
668: 6a 01 push $0x1
66a: eb ce jmp 63a <printf+0xea>
66c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, *ap);
670: 8b 5d d0 mov -0x30(%ebp),%ebx
write(fd, &c, 1);
673: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
676: 8b 03 mov (%ebx),%eax
write(fd, &c, 1);
678: 6a 01 push $0x1
ap++;
67a: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
67d: 57 push %edi
67e: ff 75 08 pushl 0x8(%ebp)
putc(fd, *ap);
681: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
684: e8 68 fd ff ff call 3f1 <write>
ap++;
689: 89 5d d0 mov %ebx,-0x30(%ebp)
68c: 83 c4 10 add $0x10,%esp
state = 0;
68f: 31 d2 xor %edx,%edx
691: e9 0e ff ff ff jmp 5a4 <printf+0x54>
696: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
69d: 8d 76 00 lea 0x0(%esi),%esi
putc(fd, c);
6a0: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
6a3: 83 ec 04 sub $0x4,%esp
6a6: e9 5a ff ff ff jmp 605 <printf+0xb5>
6ab: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
6af: 90 nop
s = (char*)*ap;
6b0: 8b 45 d0 mov -0x30(%ebp),%eax
6b3: 8b 18 mov (%eax),%ebx
ap++;
6b5: 83 c0 04 add $0x4,%eax
6b8: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
6bb: 85 db test %ebx,%ebx
6bd: 74 17 je 6d6 <printf+0x186>
while(*s != 0){
6bf: 0f b6 03 movzbl (%ebx),%eax
state = 0;
6c2: 31 d2 xor %edx,%edx
while(*s != 0){
6c4: 84 c0 test %al,%al
6c6: 0f 84 d8 fe ff ff je 5a4 <printf+0x54>
6cc: 89 75 d4 mov %esi,-0x2c(%ebp)
6cf: 89 de mov %ebx,%esi
6d1: 8b 5d 08 mov 0x8(%ebp),%ebx
6d4: eb 1a jmp 6f0 <printf+0x1a0>
s = "(null)";
6d6: bb ef 08 00 00 mov $0x8ef,%ebx
while(*s != 0){
6db: 89 75 d4 mov %esi,-0x2c(%ebp)
6de: b8 28 00 00 00 mov $0x28,%eax
6e3: 89 de mov %ebx,%esi
6e5: 8b 5d 08 mov 0x8(%ebp),%ebx
6e8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
6ef: 90 nop
write(fd, &c, 1);
6f0: 83 ec 04 sub $0x4,%esp
s++;
6f3: 83 c6 01 add $0x1,%esi
6f6: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
6f9: 6a 01 push $0x1
6fb: 57 push %edi
6fc: 53 push %ebx
6fd: e8 ef fc ff ff call 3f1 <write>
while(*s != 0){
702: 0f b6 06 movzbl (%esi),%eax
705: 83 c4 10 add $0x10,%esp
708: 84 c0 test %al,%al
70a: 75 e4 jne 6f0 <printf+0x1a0>
70c: 8b 75 d4 mov -0x2c(%ebp),%esi
state = 0;
70f: 31 d2 xor %edx,%edx
711: e9 8e fe ff ff jmp 5a4 <printf+0x54>
716: 66 90 xchg %ax,%ax
718: 66 90 xchg %ax,%ax
71a: 66 90 xchg %ax,%ax
71c: 66 90 xchg %ax,%ax
71e: 66 90 xchg %ax,%ax
00000720 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
720: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
721: a1 e0 0b 00 00 mov 0xbe0,%eax
{
726: 89 e5 mov %esp,%ebp
728: 57 push %edi
729: 56 push %esi
72a: 53 push %ebx
72b: 8b 5d 08 mov 0x8(%ebp),%ebx
72e: 8b 10 mov (%eax),%edx
bp = (Header*)ap - 1;
730: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
733: 39 c8 cmp %ecx,%eax
735: 73 19 jae 750 <free+0x30>
737: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
73e: 66 90 xchg %ax,%ax
740: 39 d1 cmp %edx,%ecx
742: 72 14 jb 758 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
744: 39 d0 cmp %edx,%eax
746: 73 10 jae 758 <free+0x38>
{
748: 89 d0 mov %edx,%eax
74a: 8b 10 mov (%eax),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
74c: 39 c8 cmp %ecx,%eax
74e: 72 f0 jb 740 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
750: 39 d0 cmp %edx,%eax
752: 72 f4 jb 748 <free+0x28>
754: 39 d1 cmp %edx,%ecx
756: 73 f0 jae 748 <free+0x28>
break;
if(bp + bp->s.size == p->s.ptr){
758: 8b 73 fc mov -0x4(%ebx),%esi
75b: 8d 3c f1 lea (%ecx,%esi,8),%edi
75e: 39 fa cmp %edi,%edx
760: 74 1e je 780 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
762: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
765: 8b 50 04 mov 0x4(%eax),%edx
768: 8d 34 d0 lea (%eax,%edx,8),%esi
76b: 39 f1 cmp %esi,%ecx
76d: 74 28 je 797 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
76f: 89 08 mov %ecx,(%eax)
freep = p;
}
771: 5b pop %ebx
freep = p;
772: a3 e0 0b 00 00 mov %eax,0xbe0
}
777: 5e pop %esi
778: 5f pop %edi
779: 5d pop %ebp
77a: c3 ret
77b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
77f: 90 nop
bp->s.size += p->s.ptr->s.size;
780: 03 72 04 add 0x4(%edx),%esi
783: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
786: 8b 10 mov (%eax),%edx
788: 8b 12 mov (%edx),%edx
78a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
78d: 8b 50 04 mov 0x4(%eax),%edx
790: 8d 34 d0 lea (%eax,%edx,8),%esi
793: 39 f1 cmp %esi,%ecx
795: 75 d8 jne 76f <free+0x4f>
p->s.size += bp->s.size;
797: 03 53 fc add -0x4(%ebx),%edx
freep = p;
79a: a3 e0 0b 00 00 mov %eax,0xbe0
p->s.size += bp->s.size;
79f: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7a2: 8b 53 f8 mov -0x8(%ebx),%edx
7a5: 89 10 mov %edx,(%eax)
}
7a7: 5b pop %ebx
7a8: 5e pop %esi
7a9: 5f pop %edi
7aa: 5d pop %ebp
7ab: c3 ret
7ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000007b0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
7b0: 55 push %ebp
7b1: 89 e5 mov %esp,%ebp
7b3: 57 push %edi
7b4: 56 push %esi
7b5: 53 push %ebx
7b6: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
7b9: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
7bc: 8b 3d e0 0b 00 00 mov 0xbe0,%edi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
7c2: 8d 70 07 lea 0x7(%eax),%esi
7c5: c1 ee 03 shr $0x3,%esi
7c8: 83 c6 01 add $0x1,%esi
if((prevp = freep) == 0){
7cb: 85 ff test %edi,%edi
7cd: 0f 84 ad 00 00 00 je 880 <malloc+0xd0>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7d3: 8b 17 mov (%edi),%edx
if(p->s.size >= nunits){
7d5: 8b 4a 04 mov 0x4(%edx),%ecx
7d8: 39 f1 cmp %esi,%ecx
7da: 73 72 jae 84e <malloc+0x9e>
7dc: 81 fe 00 10 00 00 cmp $0x1000,%esi
7e2: bb 00 10 00 00 mov $0x1000,%ebx
7e7: 0f 43 de cmovae %esi,%ebx
p = sbrk(nu * sizeof(Header));
7ea: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax
7f1: 89 45 e4 mov %eax,-0x1c(%ebp)
7f4: eb 1b jmp 811 <malloc+0x61>
7f6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
7fd: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
800: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
802: 8b 48 04 mov 0x4(%eax),%ecx
805: 39 f1 cmp %esi,%ecx
807: 73 4f jae 858 <malloc+0xa8>
809: 8b 3d e0 0b 00 00 mov 0xbe0,%edi
80f: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
811: 39 d7 cmp %edx,%edi
813: 75 eb jne 800 <malloc+0x50>
p = sbrk(nu * sizeof(Header));
815: 83 ec 0c sub $0xc,%esp
818: ff 75 e4 pushl -0x1c(%ebp)
81b: e8 39 fc ff ff call 459 <sbrk>
if(p == (char*)-1)
820: 83 c4 10 add $0x10,%esp
823: 83 f8 ff cmp $0xffffffff,%eax
826: 74 1c je 844 <malloc+0x94>
hp->s.size = nu;
828: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
82b: 83 ec 0c sub $0xc,%esp
82e: 83 c0 08 add $0x8,%eax
831: 50 push %eax
832: e8 e9 fe ff ff call 720 <free>
return freep;
837: 8b 15 e0 0b 00 00 mov 0xbe0,%edx
if((p = morecore(nunits)) == 0)
83d: 83 c4 10 add $0x10,%esp
840: 85 d2 test %edx,%edx
842: 75 bc jne 800 <malloc+0x50>
return 0;
}
}
844: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
847: 31 c0 xor %eax,%eax
}
849: 5b pop %ebx
84a: 5e pop %esi
84b: 5f pop %edi
84c: 5d pop %ebp
84d: c3 ret
if(p->s.size >= nunits){
84e: 89 d0 mov %edx,%eax
850: 89 fa mov %edi,%edx
852: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
858: 39 ce cmp %ecx,%esi
85a: 74 54 je 8b0 <malloc+0x100>
p->s.size -= nunits;
85c: 29 f1 sub %esi,%ecx
85e: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
861: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
864: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
867: 89 15 e0 0b 00 00 mov %edx,0xbe0
}
86d: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
870: 83 c0 08 add $0x8,%eax
}
873: 5b pop %ebx
874: 5e pop %esi
875: 5f pop %edi
876: 5d pop %ebp
877: c3 ret
878: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
87f: 90 nop
base.s.ptr = freep = prevp = &base;
880: c7 05 e0 0b 00 00 e4 movl $0xbe4,0xbe0
887: 0b 00 00
base.s.size = 0;
88a: bf e4 0b 00 00 mov $0xbe4,%edi
base.s.ptr = freep = prevp = &base;
88f: c7 05 e4 0b 00 00 e4 movl $0xbe4,0xbe4
896: 0b 00 00
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
899: 89 fa mov %edi,%edx
base.s.size = 0;
89b: c7 05 e8 0b 00 00 00 movl $0x0,0xbe8
8a2: 00 00 00
if(p->s.size >= nunits){
8a5: e9 32 ff ff ff jmp 7dc <malloc+0x2c>
8aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
prevp->s.ptr = p->s.ptr;
8b0: 8b 08 mov (%eax),%ecx
8b2: 89 0a mov %ecx,(%edx)
8b4: eb b1 jmp 867 <malloc+0xb7>
|
agda/Data/Empty/UniversePolymorphic.agda | oisdk/combinatorics-paper | 6 | 3491 | <reponame>oisdk/combinatorics-paper
{-# OPTIONS --cubical --safe #-}
module Data.Empty.UniversePolymorphic where
open import Prelude hiding (⊥)
import Data.Empty as Monomorphic
data ⊥ {ℓ} : Type ℓ where
Poly⊥⇔Mono⊥ : ∀ {ℓ} → ⊥ {ℓ} ⇔ Monomorphic.⊥
Poly⊥⇔Mono⊥ .fun ()
Poly⊥⇔Mono⊥ .inv ()
Poly⊥⇔Mono⊥ .leftInv ()
Poly⊥⇔Mono⊥ .rightInv ()
|
assets/chrysalis/objects/containers/chest/wooden_chest/wooden_chest.adb | ivanhawkes/Chrysalis | 59 | 27331 | <gh_stars>10-100
<AnimDB FragDef="chrysalis/objects/containers/chest/wooden_chest/fragment_ids.xml" TagDef="chrysalis/objects/containers/chest/wooden_chest/tags.xml">
<FragmentList>
<Closed>
<Fragment BlendOutDuration="0.2" Tags=""/>
</Closed>
<Open>
<Fragment BlendOutDuration="0.2" Tags=""/>
</Open>
<Opening>
<Fragment BlendOutDuration="0.2" Tags="ScopeSlave">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="PlaySound">
<ProceduralParams CryXmlVersion="2" StartTrigger="get_focus" StopTrigger="" AudioParameter="" AudioParameterValue="0" OcclusionType="ignore_state_name" AttachmentJoint="" Radius="0" IsVoice="false" PlayFacial="false" SoundFlags="0"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags=""/>
</Opening>
<Closing>
<Fragment BlendOutDuration="0.2" Tags=""/>
</Closing>
</FragmentList>
</AnimDB>
|
alloy4fun_models/trashltl/models/15/TkJ3o7x9mJmkxeAKi.als | Kaixi26/org.alloytools.alloy | 0 | 2079 | open main
pred idTkJ3o7x9mJmkxeAKi_prop16 {
all f: File | always (eventually f in Protected implies historically f in Protected)
}
pred __repair { idTkJ3o7x9mJmkxeAKi_prop16 }
check __repair { idTkJ3o7x9mJmkxeAKi_prop16 <=> prop16o } |
src/Core/InterruptHandlers/HBlank.asm | stoneface86/GameboyBoilerplateProj | 25 | 241563 | include "./src/Includes.inc"
section "HBlankHandler", rom0
HBlank::
ld a, HBLANK_INTERRUPT_CODE
ld [wLastInterrupt], a ; Save last interrupt code
reti
|
programs/oeis/188/A188716.asm | karttu/loda | 1 | 241108 | <gh_stars>1-10
; A188716: a(n) = n + (n-1)*(2^n-2).
; 1,1,4,15,46,125,316,763,1786,4089,9208,20471,45046,98293,212980,458739,983026,2097137,4456432,9437167,19922926,41943021,88080364,184549355,385875946,805306345,1677721576,3489660903,7247757286,15032385509,31138512868,64424509411,133143986146,274877906913,566935683040,1168231104479,2405181685726,4947802324957,10170482556892,20890720927707,42880953483226,87960930222041,180319906955224,369435906932695,756463999909846,1548112371908565,3166593487994836,6473924464345043
mov $1,2
pow $1,$0
sub $0,1
mul $1,$0
sub $1,$0
add $1,1
|
src/main/antlr4/org/s1ck/gdl/GDL.g4 | lc0197/gdl | 0 | 1683 | <reponame>lc0197/gdl<filename>src/main/antlr4/org/s1ck/gdl/GDL.g4<gh_stars>0
/*
* Copyright 2017 The GDL Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Graph Definition Language
grammar GDL;
// starting point for parsing a GDL script
database
: elementList EOF
;
elementList
: CREATE? definitions | query
;
definitions
: (definition ','?)+
;
definition
: graph
| path
;
graph
: header properties? (('[' (path ','?)* ']'))
;
query
: match where*
;
match
: MATCH (path ','?)+
;
path
: vertex (edge vertex)*
;
vertex
: '(' header properties? ')'
;
edge
: '<-' edgeBody? '-' #incomingEdge
| '-' edgeBody? '->' #outgoingEdge
;
edgeBody
: '[' header properties? edgeLength?']'
;
edgeLength
: '*' IntegerLiteral? ('..' IntegerLiteral)?
;
header
: Identifier? label*
;
properties
: '{' (property (',' property)*)? '}'
;
property
: Identifier Colon (literal | listLiteral)
;
label
: Colon Identifier
;
where
: ('where' | 'WHERE') expression
;
expression : xorExpression ;
xorExpression: andExpression ( XOR andExpression )* ;
andExpression: orExpression ( AND orExpression )* ;
orExpression: notExpression ( OR notExpression )* ;
notExpression : ( NOT )* expression2 ;
expression2 : atom ;
atom : parenthesizedExpression
| comparisonExpression
| timeFunc
| temporalComparison
;
comparisonExpression
: comparisonElement ComparisonOP comparisonElement
;
comparisonElement
: Identifier
| propertyLookup
| literal
;
parenthesizedExpression : '(' expression ')' ;
propertyLookup
: Identifier '.' Identifier
;
listLiteral
: '[' WS? literalList WS? ']'
;
literalList
: (literal (',' WS? literal)* )?
;
literal
: StringLiteral
| BooleanLiteral
| IntegerLiteral
| FloatingPointLiteral
| NaN
| Null
;
//------------------------
// time-related
//________________________
// temporal query constraints
temporalComparison
: timePoint ComparisonOP timePoint
;
timeFunc
: interval '.' intervalFunc #intvF
| timePoint '.' stampFunc #stmpF
;
// intervals
interval
: intervalSelector
| intervalFromStamps
| complexInterval
;
intervalSelector
: Identifier '.' IntervalConst
| IntervalConst
;
intervalFromStamps
: 'Interval(' timePoint ',' timePoint ')'
;
complexInterval
: complexIntervalArgument '.merge(' complexIntervalArgument ')'
| complexIntervalArgument '.join(' complexIntervalArgument ')'
;
complexIntervalArgument
: intervalSelector
| intervalFromStamps
;
// time points
timePoint
: timeLiteral
| timeSelector
| complexTimePoint
;
timeLiteral
: 'Timestamp(' timeStamp ')'
;
timeStamp
: Datetime
| Date
| Now;
timeSelector
: Identifier '.' TimeProp
| TimeProp
;
complexTimePoint
: 'MAX(' complexTimePointArgument (',' complexTimePointArgument)+ ')'
| 'MIN(' complexTimePointArgument (',' complexTimePointArgument)+ ')'
;
complexTimePointArgument
: timeLiteral
| timeSelector
;
// interval functions
intervalFunc
: overlapsIntervallOperator
| fromToOperator
| betweenOperator
| precedesOperator
| succeedsOperator
| containsOperator
| immediatelyPrecedesOperator
| immediatelySucceedsOperator
| equalsOperator
| longerThanOperator
| shorterThanOperator
| lengthAtLeastOperator
| lengthAtMostOperator
| asOfOperator
;
overlapsIntervallOperator
: 'overlaps(' interval ')'
;
fromToOperator
: 'fromTo(' timePoint ',' timePoint ')'
;
betweenOperator
: 'between(' timePoint ',' timePoint ')'
;
precedesOperator
: 'precedes(' interval ')'
;
succeedsOperator
: 'succeeds(' interval ')'
;
containsOperator
: 'contains(' interval ')'
| 'contains(' timePoint ')'
;
immediatelyPrecedesOperator
: 'immediatelyPrecedes(' interval ')'
;
immediatelySucceedsOperator
: 'immediatelySucceeds(' interval ')'
;
equalsOperator
: 'equals(' interval ')'
;
longerThanOperator
: 'longerThan(' (interval | timeConstant) ')'
;
shorterThanOperator
: 'shorterThan(' (interval | timeConstant) ')'
;
lengthAtLeastOperator
: 'lengthAtLeast(' (interval | timeConstant) ')'
;
lengthAtMostOperator
: 'lengthAtMost(' (interval | timeConstant) ')'
;
asOfOperator
: 'asOf(' timePoint ')'
;
timeConstant
: 'Millis(' IntegerLiteral ')'
| 'Seconds(' IntegerLiteral ')'
| 'Minutes(' IntegerLiteral ')'
| 'Hours(' IntegerLiteral ')'
| 'Days(' IntegerLiteral ')'
;
// time stamp/point functions
stampFunc
: beforePointOperator
| afterPointOperator
| precedesOperator
| succeedsOperator
;
beforePointOperator
: 'before' '(' timePoint ')'
;
afterPointOperator
: 'after' '(' timePoint ')'
;
//-------------------------------
// String Literal
//-------------------------------
StringLiteral
: '"' ('\\"'|.)*? '"'
| '\'' ('\\\''|.)*? '\''
;
//-------------------------------
// Boolean Literal
//-------------------------------
BooleanLiteral
: 'true'
| 'TRUE'
| 'false'
| 'FALSE'
;
//-------------------------------
// Integer Literal
//-------------------------------
IntegerLiteral
: DecimalIntegerLiteral
;
fragment
DecimalIntegerLiteral
: DecimalNumeral IntegerTypeSuffix?
;
fragment
DecimalNumeral
: '0'
| '-'? NonZeroDigit Digit*
;
fragment
IntegerTypeSuffix
: [lL]
;
//-------------------------------
// Floating Point Literal
//-------------------------------
FloatingPointLiteral
: DecimalFloatingPointLiteral
;
fragment
DecimalFloatingPointLiteral
: (DecimalFloatingPointNumeral '.' Digits)
| (DecimalFloatingPointNumeral? '.' Digits) FloatTypeSuffix?
;
fragment
DecimalFloatingPointNumeral
: '0'
| '-'? Digits
;
fragment
FloatTypeSuffix
: [fFdD]
;
//-------------------------------
// Comparison
//-------------------------------
AND
: ('a'|'A')('n'|'N')('d'|'D')
;
OR
: ('o'|'O')('r'|'R')
;
XOR
: ('x'|'X')('o'|'O')('r'|'R')
;
NOT
: ('N'|'n')('o'|'O')('t'|'T')
;
ComparisonOP
: '='
| '!='
| '<>'
| '>'
| '<'
| '>='
| '<='
;
//_______________________________
// Time lexing
//_______________________________
TimeProp
: 'tx_from'
| 'tx_to'
| 'val_from'
| 'val_to'
;
IntervalConst
: 'tx'
| 'val'
;
Datetime
: Digit Digit Digit Digit '-' Digit Digit '-' Digit Digit 'T'Time
;
Date
: Digit Digit Digit Digit '-' Digit Digit '-' Digit Digit?
;
Time
: Digit Digit ':' Digit Digit (':' Digit Digit)?
;
Now
: ('N'|'n')('O'|'o')('W'|'w')
;
//-------------------------------
// General fragments
//-------------------------------
MATCH
: 'MATCH'
;
CREATE
: 'CREATE'
;
NaN
: 'NaN'
;
Null
: 'NULL'
;
//-------------------------------
// Identifier
//-------------------------------
Identifier
: (UnderScore | LowerCaseLetter | UpperCaseLetter) (UnderScore | Character)* // e.g. _temp, _0, t_T, g0, alice, birthTown
;
Characters
: Character+
;
Character
: UpperCaseLetter
| LowerCaseLetter
| Digit
;
UpperCaseLetters
: UpperCaseLetter+
;
UpperCaseLetter
: [A-Z]
;
LowerCaseLetters
: LowerCaseLetter+
;
LowerCaseLetter
: [a-z]
;
fragment
Digits
: Digit+
;
fragment
Digit
: [0-9]
;
fragment
NonZeroDigit
: [1-9]
;
fragment
UnderScore
: '_'
;
Colon
: ':'
;
PERIOD
: '.'
;
WS
: [ \t\n\r]+ -> skip
;
COMMENT
: '/*' .*? '*/' -> skip
;
LINE_COMMENT
: '//' ~[\r\n]* -> skip
;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_388.asm | ljhsiun2/medusa | 9 | 162541 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x153e1, %r13
nop
nop
nop
nop
and %r10, %r10
vmovups (%r13), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %rbp
nop
cmp $59857, %r8
lea addresses_A_ht+0x3b3d, %rsi
lea addresses_D_ht+0x666b, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
dec %rbp
mov $29, %rcx
rep movsl
nop
nop
nop
nop
xor $38062, %r13
lea addresses_WT_ht+0x1cf5, %r13
add %rbp, %rbp
movw $0x6162, (%r13)
add %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r15
push %r9
push %rcx
push %rdi
push %rsi
// Faulty Load
lea addresses_WT+0xf4f5, %rdi
nop
xor %rcx, %rcx
movb (%rdi), %r11b
lea oracles, %r9
and $0xff, %r11
shlq $12, %r11
mov (%r9,%r11,1), %r11
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.