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
|
---|---|---|---|---|
src/natools-web-cookie_setters.adb | faelys/natools-web | 1 | 11849 | <reponame>faelys/natools-web
------------------------------------------------------------------------------
-- Copyright (c) 2019, <NAME> --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
with Ada.IO_Exceptions;
with Ada.Strings.Fixed;
with Natools.S_Expressions.Atom_Ref_Constructors;
with Natools.S_Expressions.Enumeration_IO;
with Natools.S_Expressions.File_Readers;
with Natools.S_Expressions.Interpreter_Loop;
with Natools.S_Expressions.Lockable;
with Natools.Web.Error_Pages;
package body Natools.Web.Cookie_Setters is
package Elements is
type Enum is
(Unknown,
Redirect_Target,
Force_Name,
Allowed_Names,
Path,
Comment,
Domain,
Max_Age,
Secure,
No_Secure,
HTTP_Only,
No_HTTP_Only,
Max_Length);
end Elements;
package Element_IO is new S_Expressions.Enumeration_IO.Typed_IO
(Elements.Enum);
procedure Execute
(Object : in out Setter;
Context : in Meaningless_Type;
Name : in S_Expressions.Atom;
Arguments : in out S_Expressions.Lockable.Descriptor'Class);
procedure Set_Cookie
(Object : in Setter;
Exchange : in out Sites.Exchange;
Key : in String;
Value : in String)
with Pre => Key'Length >= 1;
function To_Element (Name : in S_Expressions.Atom) return Elements.Enum;
procedure Update_Setter is new S_Expressions.Interpreter_Loop
(Setter, Meaningless_Type, Execute);
------------------------------
-- Local Helper Subprograms --
------------------------------
procedure Execute
(Object : in out Setter;
Context : in Meaningless_Type;
Name : in S_Expressions.Atom;
Arguments : in out S_Expressions.Lockable.Descriptor'Class)
is
pragma Unreferenced (Context);
use Elements;
use type S_Expressions.Events.Event;
begin
case To_Element (Name) is
when Unknown =>
Log (Severities.Error,
"Unknown cookie setter element """
& S_Expressions.To_String (Name) & '"');
when Redirect_Target =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
Object.Redirect_Target
:= S_Expressions.Atom_Ref_Constructors.Create
(Arguments.Current_Atom);
end if;
when Force_Name =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
Object.Force_Name
:= S_Expressions.Atom_Ref_Constructors.Create
(Arguments.Current_Atom);
else
Object.Force_Name.Reset;
end if;
when Allowed_Names =>
declare
Names : Containers.Unsafe_Atom_Lists.List;
begin
Containers.Append_Atoms (Names, Arguments);
Object.Allowed_Names := Containers.Create (Names);
end;
when Path =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
Object.Path
:= S_Expressions.Atom_Ref_Constructors.Create
(Arguments.Current_Atom);
else
Object.Path.Reset;
end if;
when Comment =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
Object.Comment
:= S_Expressions.Atom_Ref_Constructors.Create
(Arguments.Current_Atom);
else
Object.Comment.Reset;
end if;
when Domain =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
Object.Domain
:= S_Expressions.Atom_Ref_Constructors.Create
(Arguments.Current_Atom);
else
Object.Domain.Reset;
end if;
when Max_Age =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
begin
Object.Max_Age := Duration'Value
(S_Expressions.To_String (Arguments.Current_Atom));
exception
when Constraint_Error =>
Object.Max_Age := Default_Max_Age;
end;
end if;
when Secure =>
Object.Secure := True;
when No_Secure =>
Object.Secure := False;
when HTTP_Only =>
Object.HTTP_Only := True;
when No_HTTP_Only =>
Object.HTTP_Only := False;
when Max_Length =>
if Arguments.Current_Event = S_Expressions.Events.Add_Atom then
begin
Object.Max_Length := Natural'Value
(S_Expressions.To_String (Arguments.Current_Atom));
exception
when Constraint_Error =>
Object.Max_Length := Default_Max_Length;
end;
end if;
end case;
end Execute;
procedure Set_Cookie
(Object : in Setter;
Exchange : in out Sites.Exchange;
Key : in String;
Value : in String)
is
use type Containers.Atom_Set;
begin
if Object.Force_Name.Is_Empty
and then Object.Allowed_Names /= Containers.Null_Atom_Set
and then not Containers.Contains
(Object.Allowed_Names, S_Expressions.To_Atom (Key))
then
return;
end if;
Exchange.Set_Cookie
(Key => Key,
Value => Value,
Comment => Comment (Object),
Domain => Domain (Object),
Max_Age => (if Value'Length > 0 then Object.Max_Age else 0.0),
Path => Path (Object),
Secure => Object.Secure,
HTTP_Only => Object.HTTP_Only);
end Set_Cookie;
function To_Element (Name : in S_Expressions.Atom) return Elements.Enum is
Result : Elements.Enum := Elements.Unknown;
begin
begin
Result := Element_IO.Value (Name);
exception
when Constraint_Error => null;
end;
return Result;
end To_Element;
----------------------
-- Public Interface --
----------------------
overriding function Can_Be_Stored (Object : in Loader) return Boolean is
begin
return Object.File_Found;
end Can_Be_Stored;
function Create (File : in S_Expressions.Atom)
return Sites.Page_Loader'Class is
begin
return Loader'
(File_Name => S_Expressions.Atom_Ref_Constructors.Create (File),
File_Found => False);
end Create;
overriding procedure Load
(Object : in out Loader;
Builder : in out Sites.Site_Builder;
Path : in S_Expressions.Atom)
is
Page : Setter;
begin
declare
File_Name : constant String
:= S_Expressions.To_String (Object.File_Name.Query);
begin
declare
Reader : S_Expressions.File_Readers.S_Reader
:= S_Expressions.File_Readers.Reader (File_Name);
begin
Update_Setter (Reader, Page, Meaningless_Value);
end;
Object.File_Found := True;
if Page.Redirect_Target.Is_Empty then
Log (Severities.Error,
"Cookie setter file """ & File_Name
& """ defines no rediction target");
return;
end if;
exception
when Ada.IO_Exceptions.Name_Error =>
Log (Severities.Warning,
"Unable to open cookie setter file """ & File_Name
& """, using it as a rediction target");
Object.File_Found := False;
Page.Redirect_Target := Object.File_Name;
end;
Sites.Insert (Builder, Path, Page);
end Load;
overriding procedure Respond
(Object : in out Setter;
Exchange : in out Sites.Exchange;
Extra_Path : in S_Expressions.Atom)
is
pragma Unmodified (Object);
use type S_Expressions.Octet;
use type S_Expressions.Offset;
Arguments : constant String
:= (if Extra_Path'Length >= 1
and then Extra_Path (Extra_Path'First) = Character'Pos ('/')
then S_Expressions.To_String
(Extra_Path (Extra_Path'First + 1 .. Extra_Path'Last))
else S_Expressions.To_String (Extra_Path));
Separator : constant Natural := Ada.Strings.Fixed.Index (Arguments, "/");
begin
if Arguments'Length > Object.Max_Length then
return;
elsif not Object.Force_Name.Is_Empty then
Set_Cookie
(Object,
Exchange,
S_Expressions.To_String (Object.Force_Name.Query),
Arguments);
elsif Arguments'Length = 0 or Separator = Arguments'First then
return;
elsif Separator = 0 or Separator = Arguments'Last then
Set_Cookie
(Object,
Exchange,
Arguments
(Arguments'First
.. (if Separator = 0 then Arguments'Last else Separator - 1)),
"");
else
Set_Cookie
(Object,
Exchange,
Arguments (Arguments'First .. Separator - 1),
Arguments (Separator + 1 .. Arguments'Last));
end if;
Natools.Web.Error_Pages.See_Other
(Exchange,
Object.Redirect_Target.Query);
end Respond;
end Natools.Web.Cookie_Setters;
|
Jahr 1/MC/Programmierung/LEDLauflicht/LEDLauflicht/main.asm | BackInBash/Technikerschule | 2 | 790 | <reponame>BackInBash/Technikerschule
;
; LEDLauflicht.asm
;
; Created: 19/03/2021 13:45:34
; Author : Markus
;
; Replace with your application code
.INCLUDE "m16def.inc"
init:
LDI R18, 1
LDI R17, 0xff
out DDRA, R17
main:
out PORTA, R18
ADD R18, R18
CBI PORTA, 0
jmp main
|
archive/agda-2/Oscar/Data/Step.agda | m0davis/oscar | 0 | 4199 | <reponame>m0davis/oscar
module Oscar.Data.Step {𝔣} (FunctionName : Set 𝔣) where
open import Data.Nat using (ℕ; suc; zero)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂; cong; sym; trans)
open import Function using (_∘_; flip)
open import Relation.Nullary using (¬_; Dec; yes; no)
open import Data.Product using (∃; _,_; _×_)
open import Data.Empty using (⊥-elim)
open import Data.Vec using (Vec; []; _∷_)
open import Oscar.Data.Fin
open import Data.Nat hiding (_≤_)
open import Relation.Binary.PropositionalEquality renaming ([_] to [[_]])
open import Function using (_∘_; id; case_of_; _$_; flip)
open import Relation.Nullary
open import Data.Product renaming (map to _***_)
open import Data.Empty
open import Data.Maybe
open import Category.Functor
open import Category.Monad
import Level
open RawMonad (Data.Maybe.monad {Level.zero})
open import Data.Sum
open import Data.Maybe using (maybe; maybe′; nothing; just; monad; Maybe)
open import Data.List renaming (_++_ to _++L_)
open ≡-Reasoning
open import Data.Vec using (Vec; []; _∷_) renaming (_++_ to _++V_; map to mapV)
open import Oscar.Data.Term FunctionName
data Step (n : ℕ) : Set 𝔣 where
left : Term n -> Step n
right : Term n -> Step n
function : FunctionName → ∀ {L} → Vec (Term n) L → ∀ {R} → Vec (Term n) R → Step n
fmapS : ∀ {n m} (f : Term n -> Term m) (s : Step n) -> Step m
fmapS f (left x) = left (f x)
fmapS f (right x) = right (f x)
fmapS f (function fn ls rs) = function fn (mapV f ls) (mapV f rs)
_⊹_ : ∀ {n} (ps : List (Step n)) (t : Term n) -> Term n
[] ⊹ t = t
(left r ∷ ps) ⊹ t = (ps ⊹ t) fork r
(right l ∷ ps) ⊹ t = l fork (ps ⊹ t)
(function fn ls rs ∷ ps) ⊹ t = function fn (ls ++V (ps ⊹ t) ∷ rs)
fork++ : ∀ {m} {s t : Term m} ps ->
(ps ⊹ (s fork t) ≡ (ps ++L [ left t ]) ⊹ s)
× (ps ⊹ (s fork t) ≡ (ps ++L [ right s ]) ⊹ t)
fork++ [] = refl , refl
fork++ (left y' ∷ xs') = (cong (λ a -> a fork y') *** cong (λ a -> a fork y')) (fork++ xs')
fork++ (right y' ∷ xs') = (cong (λ a -> y' fork a) *** cong (λ a -> y' fork a)) (fork++ xs')
fork++ {s = s} {t} (function fn ls rs ∷ xs') =
(cong (λ a → function fn (ls ++V a ∷ rs)) *** cong (λ a → function fn (ls ++V a ∷ rs))) (fork++ xs')
function++ : ∀ {m} {fn} {t : Term m} {L} {ls : Vec (Term m) L} {R} {rs : Vec (Term m) R} ps →
ps ⊹ (function fn (ls ++V t ∷ rs)) ≡ (ps ++L [ function fn ls rs ]) ⊹ t
function++ [] = refl
function++ (left x ∷ ps) = cong (_fork x) (function++ ps)
function++ (right x ∷ ps) = cong (x fork_) (function++ ps)
function++ (function fn ls rs ∷ ps) = cong (λ a → function fn (ls ++V a ∷ rs)) (function++ ps)
-- _◃S_ : ∀ {n m} (f : n ⊸ m) -> List (Step n) -> List (Step m)
-- _◃S_ f = Data.List.map (fmapS (f ◃_))
-- map-[] : ∀ {n m} (f : n ⊸ m) ps -> f ◃S ps ≡ [] -> ps ≡ []
-- map-[] f [] _ = refl
-- map-[] f (x ∷ xs) ()
-- module StepM where
-- lemma1 : ∀ {n} (x : Step n) xs t -> [ x ] ⊹ ( xs ⊹ t ) ≡ (x ∷ xs) ⊹ t
-- lemma1 (left y) xs t = refl
-- lemma1 (right y) xs t = refl
-- lemma1 (function fn ls rs) xs t = refl
-- lemma2 : ∀ {n} {r} {t} {xs} (x : Step n) -> xs ⊹ t ≡ r -> ((x ∷ xs) ⊹ t ) ≡ [ x ] ⊹ r
-- lemma2 (left y) eq = cong (λ t -> t fork y) eq
-- lemma2 (right y) eq = cong (λ t -> y fork t) eq
-- lemma2 (function fn ls rs) eq = cong (λ t → function fn (ls ++V t ∷ rs)) eq
-- fact1 : ∀ {n} ps qs (t : Term n) -> (ps ++L qs) ⊹ t ≡ ps ⊹ (qs ⊹ t)
-- fact1 [] qs t = refl
-- fact1 (p ∷ ps) qs t = begin (p ∷ (ps ++L qs)) ⊹ t ≡⟨ lemma2 p (fact1 ps qs t) ⟩
-- [ p ] ⊹ (ps ⊹ (qs ⊹ t)) ≡⟨ lemma1 p ps (qs ⊹ t) ⟩
-- (p ∷ ps) ⊹ (qs ⊹ t) ∎
-- ◃-fact1 : ∀ {m n} (f : m ⊸ n) {N} (rs : Vec (Term m) N) → f ◃s rs ≡ mapV (f ◃_) rs
-- ◃-fact1 f [] = refl
-- ◃-fact1 f (x ∷ rs) rewrite ◃-fact1 f rs = refl
-- ◃-fact2 : ∀ {m n} (f : m ⊸ n) {L} (ls : Vec (Term m) L) {R} (rs : Vec (Term m) R) → f ◃s (ls ++V rs) ≡ (f ◃s ls) ++V (f ◃s rs)
-- ◃-fact2 f [] rs = refl
-- ◃-fact2 f (l ∷ ls) rs = cong ((f ◃ l) ∷_) (◃-fact2 f ls rs)
-- fact2 : ∀ {m n} (f : m ⊸ n) t ps ->
-- f ◃ (ps ⊹ t) ≡ (f ◃S ps) ⊹ (f ◃ t)
-- fact2 f t [] = refl
-- fact2 f t (left y ∷ xs) = cong (λ t -> t fork (f ◃ y)) (fact2 f t xs)
-- fact2 f t (right y ∷ xs) = cong (λ t -> (f ◃ y) fork t) (fact2 f t xs)
-- fact2 f t (function fn ls rs ∷ xs) rewrite sym (◃-fact1 f ls) | sym (◃-fact1 f rs) = cong (function fn) (trans (◃-fact2 f ls ((xs ⊹ t) ∷ rs)) (cong ((f ◃s ls) ++V_) (cong (_∷ (f ◃s rs)) (fact2 f t xs))))
-- mutual
-- check-props : ∀ {m} (x : Fin (suc m)) {N} (ts : Vec (Term (suc m)) N) fn ->
-- (∃ λ (ts' : Vec (Term m) N) -> ts ≡ ▹ (thin x) ◃s ts' × check x ts ≡ just ts')
-- ⊎ (∃ λ ps -> function fn ts ≡ (ps ⊹ i x) × check x ts ≡ nothing)
-- check-props x [] fn = inj₁ ([] , refl , refl)
-- check-props x (t ∷ ts) fn with check-prop x t
-- … | inj₂ (ps , t=ps+ix , checkxt=no) rewrite t=ps+ix | checkxt=no = inj₂ (function fn [] ts ∷ ps , refl , refl)
-- … | inj₁ (t' , t=thinxt' , checkxt=t') rewrite checkxt=t' with check-props x ts fn
-- … | inj₁ (ts' , ts=thinxts' , checkxts=ts') rewrite t=thinxt' | ts=thinxts' | checkxts=ts' = inj₁ (_ , refl , refl)
-- … | inj₂ ([] , () , checkxts=no)
-- … | inj₂ (left _ ∷ ps , () , checkxts=no)
-- … | inj₂ (right _ ∷ ps , () , checkxts=no)
-- … | inj₂ (function fn' ls rs ∷ ps , ts=ps+ix , checkxts=no) with Term-function-inj-VecSize ts=ps+ix
-- … | refl with Term-function-inj-Vector ts=ps+ix
-- … | refl rewrite checkxts=no = inj₂ (function fn (t ∷ ls) rs ∷ ps , refl , refl)
-- check-prop : ∀ {m} (x : Fin (suc m)) t ->
-- (∃ λ t' -> t ≡ ▹ (thin x) ◃ t' × check x t ≡ just t')
-- ⊎ (∃ λ ps -> t ≡ (ps ⊹ i x) × check x t ≡ nothing)
-- check-prop x (i x') with checkfact1 x x' (check x x') refl
-- check-prop x (i .x) | inj₁ (refl , e) = inj₂ ([] , refl , cong (_<$>_ i) e)
-- ... | inj₂ (y , thinxy≡x' , thickxx'≡justy')
-- = inj₁ (i y
-- , cong i (sym (thinxy≡x'))
-- , cong (_<$>_ i) thickxx'≡justy' )
-- check-prop x leaf = inj₁ (leaf , (refl , refl))
-- check-prop x (s fork t)
-- with check-prop x s | check-prop x t
-- ... | inj₁ (s' , s≡thinxs' , checkxs≡s') | inj₁ (t' , t≡thinxt' , checkxt≡t')
-- = inj₁ (s' fork t' , cong₂ _fork_ s≡thinxs' t≡thinxt'
-- , cong₂ (λ a b -> _fork_ <$> a ⊛ b) checkxs≡s' checkxt≡t' )
-- ... | inj₂ (ps , s≡ps+ix , checkxs≡no ) | _
-- = inj₂ (left t ∷ ps , cong (λ s -> s fork t) s≡ps+ix
-- , cong (λ a -> _fork_ <$> a ⊛ check x t) checkxs≡no )
-- ... | _ | inj₂ (ps , s≡ps+ix , checkxs≡no )
-- = inj₂ (right s ∷ ps , cong (λ t -> s fork t) s≡ps+ix
-- , trans (cong (λ a -> _fork_ <$> check x s ⊛ a) checkxs≡no) (lemma (_fork_ <$> check x s)))
-- where
-- lemma : ∀ {a b : Set} {y : b} (x : Maybe a) -> maybe (λ _ → y) y x ≡ y
-- lemma (just x') = refl
-- lemma nothing = refl
-- check-prop x (function fn ts) with check-props x ts fn
-- … | inj₁ (t' , t=thinxt' , checkxt=t') rewrite checkxt=t' = inj₁ (function fn t' , cong (function fn) t=thinxt' , refl)
-- … | inj₂ (ps , t=ps+ix , checkxt=no) rewrite checkxt=no = inj₂ (ps , t=ps+ix , refl)
-- -- data SizedTerm (n : ℕ) : ℕ → Set where
-- -- i : (x : Fin n) -> SizedTerm n (suc zero)
-- -- leaf : SizedTerm n (suc zero)
-- -- _fork_ : (s : ∃ (SizedTerm n)) (t : ∃ (SizedTerm n)) -> SizedTerm n (suc (proj₁ s + proj₁ t))
-- -- function : FunctionName → ∀ {f} → (ts : Vec (∃ (SizedTerm n)) f) → SizedTerm n (suc (Data.Vec.sum (Data.Vec.map proj₁ ts)))
-- -- data SizedStep (n : ℕ) : Set where
-- -- left : ∃ (SizedTerm n) -> SizedStep n
-- -- right : ∃ (SizedTerm n) -> SizedStep n
-- -- function : FunctionName → ∀ {L} → Vec (∃ (SizedTerm n)) L → ∀ {R} → Vec (∃ (SizedTerm n)) R → SizedStep n
-- -- mutual
-- -- toSizedTerm : ∀ {n} → Term n → ∃ (SizedTerm n)
-- -- toSizedTerm (i x) = suc zero , i x
-- -- toSizedTerm leaf = suc zero , leaf
-- -- toSizedTerm (l fork r) with toSizedTerm l | toSizedTerm r
-- -- … | L , sl | R , sr = (suc (L + R)) , ((L , sl) fork (R , sr))
-- -- toSizedTerm (function fn ts) with toSizedTerms ts
-- -- … | sts = suc (Data.Vec.sum (Data.Vec.map proj₁ sts)) , SizedTerm.function fn sts
-- -- fromSizedTerm : ∀ {n} → ∃ (SizedTerm n) → Term n
-- -- fromSizedTerm (_ , i x) = i x
-- -- fromSizedTerm (_ , leaf) = leaf
-- -- fromSizedTerm (_ , (_fork_ t₁ t₂)) = (fromSizedTerm t₁ fork fromSizedTerm t₂)
-- -- fromSizedTerm (_ , function fn ts) = function fn (fromSizedTerms ts)
-- -- toSizedTerms : ∀ {n N} → Vec (Term n) N → Vec (∃ (SizedTerm n)) N
-- -- toSizedTerms [] = []
-- -- toSizedTerms (t ∷ ts) = toSizedTerm t ∷ toSizedTerms ts
-- -- fromSizedTerms : ∀ {n N} → Vec (∃ (SizedTerm n)) N → Vec (Term n) N
-- -- fromSizedTerms [] = []
-- -- fromSizedTerms (t ∷ ts) = fromSizedTerm t ∷ fromSizedTerms ts
-- -- mutual
-- -- isoSizedTerm : ∀ {n} → (st : ∃ (SizedTerm n)) → st ≡ toSizedTerm (fromSizedTerm st)
-- -- isoSizedTerm (._ , i x) = refl
-- -- isoSizedTerm (._ , leaf) = refl
-- -- isoSizedTerm (.(suc (proj₁ s + proj₁ t)) , (s fork t)) rewrite sym (isoSizedTerm s) | sym (isoSizedTerm t) = refl
-- -- isoSizedTerm (._ , function x ts) rewrite sym (isoSizedTerms ts) = refl
-- -- isoSizedTerms : ∀ {n N} → (st : Vec (∃ (SizedTerm n)) N) → st ≡ toSizedTerms (fromSizedTerms st)
-- -- isoSizedTerms [] = refl
-- -- isoSizedTerms (t ∷ ts) rewrite sym (isoSizedTerm t) | sym (isoSizedTerms ts) = refl
-- -- mutual
-- -- isoTerm : ∀ {n} → (t : Term n) → t ≡ fromSizedTerm (toSizedTerm t)
-- -- isoTerm (i x) = refl
-- -- isoTerm leaf = refl
-- -- isoTerm (s fork t) rewrite sym (isoTerm s) | sym (isoTerm t) = refl
-- -- isoTerm (function fn ts) rewrite sym (isoTerms ts) = refl
-- -- isoTerms : ∀ {n N} → (t : Vec (Term n) N) → t ≡ fromSizedTerms (toSizedTerms t)
-- -- isoTerms [] = refl
-- -- isoTerms (t ∷ ts) rewrite sym (isoTerm t) | sym (isoTerms ts) = refl
-- -- toSizedStep : ∀ {n} → Step n → SizedStep n
-- -- toSizedStep (left r) = left (toSizedTerm r)
-- -- toSizedStep (right l) = right (toSizedTerm l)
-- -- toSizedStep (function fn ls rs) = function fn (toSizedTerms ls) (toSizedTerms rs)
-- -- fromSizedStep : ∀ {n} → SizedStep n → Step n
-- -- fromSizedStep (left r) = left (fromSizedTerm r)
-- -- fromSizedStep (right l) = right (fromSizedTerm l)
-- -- fromSizedStep (function fn ls rs) = function fn (fromSizedTerms ls) (fromSizedTerms rs)
-- -- isoSizedStep : ∀ {n} → (ss : SizedStep n) → ss ≡ toSizedStep (fromSizedStep ss)
-- -- isoSizedStep (left r) rewrite sym (isoSizedTerm r) = refl
-- -- isoSizedStep (right l) rewrite sym (isoSizedTerm l) = refl
-- -- isoSizedStep (function fn ls rs) rewrite sym (isoSizedTerms ls) | sym (isoSizedTerms rs) = refl
-- -- isoStep : ∀ {n} → (s : Step n) → s ≡ fromSizedStep (toSizedStep s)
-- -- isoStep (left r) rewrite sym (isoTerm r) = refl
-- -- isoStep (right l) rewrite sym (isoTerm l) = refl
-- -- isoStep (function fn ls rs) rewrite sym (isoTerms ls) | sym (isoTerms rs) = refl
-- -- toSizedSteps : ∀ {n} → List (Step n) → List (SizedStep n)
-- -- toSizedSteps [] = []
-- -- toSizedSteps (s ∷ ss) = toSizedStep s ∷ toSizedSteps ss
-- -- fromSizedSteps : ∀ {n} → List (SizedStep n) → List (Step n)
-- -- fromSizedSteps [] = []
-- -- fromSizedSteps (s ∷ ss) = fromSizedStep s ∷ fromSizedSteps ss
-- -- isoSizedSteps : ∀ {n} → (ss : List (SizedStep n)) → ss ≡ toSizedSteps (fromSizedSteps ss)
-- -- isoSizedSteps [] = refl
-- -- isoSizedSteps (s ∷ ss) rewrite sym (isoSizedStep s) | sym (isoSizedSteps ss) = refl
-- -- isoSteps : ∀ {n} → (s : List (Step n)) → s ≡ fromSizedSteps (toSizedSteps s)
-- -- isoSteps [] = refl
-- -- isoSteps (s ∷ ss) rewrite sym (isoStep s) | sym (isoSteps ss) = refl
-- -- _Sized⊹_ : ∀ {n} (ps : List (SizedStep n)) (t : ∃ (SizedTerm n)) -> ∃ (SizedTerm n)
-- -- [] Sized⊹ t = t
-- -- (left r ∷ ps) Sized⊹ t = _ , (ps Sized⊹ t) SizedTerm.fork r
-- -- (right l ∷ ps) Sized⊹ t = _ , l SizedTerm.fork (ps Sized⊹ t)
-- -- (function fn ls rs ∷ ps) Sized⊹ t = _ , function fn (ls ++V (ps Sized⊹ t) ∷ rs)
-- -- fromSizedTerms-commute : ∀ {n} {L R} → (ls : Vec (∃ (SizedTerm n)) L) (rs : Vec (∃ (SizedTerm n)) R) → fromSizedTerms (ls ++V rs) ≡ fromSizedTerms ls ++V fromSizedTerms rs
-- -- fromSizedTerms-commute [] rs = refl
-- -- fromSizedTerms-commute (l ∷ ls) rs rewrite fromSizedTerms-commute ls rs = refl
-- -- toSizedTerms-commute : ∀ {n} {L R} → (ls : Vec (Term n) L) (rs : Vec (Term n) R) → toSizedTerms (ls ++V rs) ≡ toSizedTerms ls ++V toSizedTerms rs
-- -- toSizedTerms-commute [] rs = refl
-- -- toSizedTerms-commute (l ∷ ls) rs rewrite toSizedTerms-commute ls rs = refl
-- -- isoSized⊹ : ∀ {n} (ps : List (SizedStep n)) (t : ∃ (SizedTerm n)) → fromSizedTerm (ps Sized⊹ t) ≡ fromSizedSteps ps ⊹ fromSizedTerm t
-- -- isoSized⊹ [] t = refl
-- -- isoSized⊹ (left r ∷ ps) t rewrite isoSized⊹ ps t = refl
-- -- isoSized⊹ (right l ∷ ps) t rewrite isoSized⊹ ps t = refl
-- -- isoSized⊹ (function fn ls rs ∷ ps) t rewrite sym (isoSized⊹ ps t) | fromSizedTerms-commute ls ((ps Sized⊹ t) ∷ rs) = refl
-- -- iso⊹ : ∀ {n} (ps : List (Step n)) (t : Term n) → toSizedTerm (ps ⊹ t) ≡ toSizedSteps ps Sized⊹ toSizedTerm t
-- -- iso⊹ [] t = refl
-- -- iso⊹ (left r ∷ ps) t rewrite iso⊹ ps t = refl
-- -- iso⊹ (right l ∷ ps) t rewrite iso⊹ ps t = refl
-- -- iso⊹ (function fn ls rs ∷ ps) t rewrite sym (iso⊹ ps t) | toSizedTerms-commute ls ((ps ⊹ t) ∷ rs) = refl
-- -- import Data.Vec.Properties
-- -- import Relation.Binary.PropositionalEquality as PE
-- -- open Data.Vec.Properties.UsingVectorEquality (PE.setoid ℕ)
-- -- import Data.Vec.Equality
-- -- open Data.Vec.Equality.PropositionalEquality using (to-≡)
-- -- -- some equivalences needed to adapt Tactic.Nat to the standard library
-- -- module EquivalenceOf≤ where
-- -- open import Agda.Builtin.Equality
-- -- open import Agda.Builtin.Nat
-- -- open import Data.Nat using (less-than-or-equal) renaming (_≤_ to _≤s_)
-- -- open import Data.Nat.Properties using (≤⇒≤″; ≤″⇒≤)
-- -- open import Prelude using (diff; id) renaming (_≤_ to _≤p_)
-- -- open import Tactic.Nat.Generic (quote _≤p_) (quote Function.id) (quote Function.id) using (by)
-- -- ≤p→≤s : ∀ {a b} → a ≤p b → a ≤s b
-- -- ≤p→≤s (diff k b₊₁≡k₊₁+a) = ≤″⇒≤ (less-than-or-equal {k = k} (by b₊₁≡k₊₁+a))
-- -- ≤s→≤p : ∀ {a b} → a ≤s b → a ≤p b
-- -- ≤s→≤p a≤sb with ≤⇒≤″ a≤sb
-- -- ≤s→≤p _ | less-than-or-equal {k = k} a+k≡b = diff k (by a+k≡b)
-- -- module _ where
-- -- open EquivalenceOf≤
-- -- open import Data.Nat
-- -- open import Tactic.Nat.Generic (quote Data.Nat._≤_) (quote ≤s→≤p) (quote ≤p→≤s) public
-- -- growingSize : ∀ {m} (st : ∃ (SizedTerm m)) → (sp : SizedStep m) (sps : List (SizedStep m)) → proj₁ ((sp ∷ sps) Sized⊹ st) > proj₁ st
-- -- growingSize st (left r) [] = auto
-- -- growingSize st (right l) [] = auto
-- -- growingSize {m} st (function fn ls rs) [] rewrite to-≡ (map-++-commute proj₁ ls {ys = st ∷ rs}) | Data.Vec.Properties.sum-++-commute (mapV proj₁ ls) {ys = mapV proj₁ (st ∷ rs)} = auto
-- -- growingSize st (left x) (p₂ ∷ ps) = by (growingSize st p₂ ps)
-- -- growingSize st (right x) (p₂ ∷ ps) = by (growingSize st p₂ ps)
-- -- growingSize st (function fn ls rs) (p₂ ∷ ps) rewrite to-≡ (map-++-commute proj₁ ls {ys = ((p₂ ∷ ps) Sized⊹ st) ∷ rs}) | Data.Vec.Properties.sum-++-commute (mapV proj₁ ls) {ys = mapV proj₁ (((p₂ ∷ ps) Sized⊹ st) ∷ rs)} = by (growingSize st p₂ ps)
-- -- No-Cycle : ∀{m} (t : Term m) ps -> (eq : t ≡ ps ⊹ t) → ps ≡ []
-- -- No-Cycle t [] eq = refl
-- -- No-Cycle t (p ∷ ps) eq = refute (subst (λ v → v > proj₁ (toSizedTerm t)) (sym (trans same iso)) growth) where
-- -- same : proj₁ (toSizedTerm t) ≡ proj₁ (toSizedTerm ((p ∷ ps) ⊹ t))
-- -- growth : proj₁ ((toSizedStep p ∷ toSizedSteps ps) Sized⊹ toSizedTerm t) > proj₁ (toSizedTerm t)
-- -- iso : proj₁ (toSizedTerm ((p ∷ ps) ⊹ t)) ≡ proj₁ ((toSizedStep p ∷ toSizedSteps ps) Sized⊹ toSizedTerm t)
-- -- growth = growingSize (toSizedTerm t) (toSizedStep p) (toSizedSteps ps)
-- -- same = cong (proj₁ ∘ toSizedTerm) eq
-- -- iso = cong proj₁ (iso⊹ (p ∷ ps) t)
-- -- module Step2 where
-- -- fact : ∀{m} (x : Fin m) p ps -> Nothing (Unifies (i x) ((p ∷ ps) ⊹ i x))
-- -- fact x p ps f r with No-Cycle (f x) (f ◃S (p ∷ ps)) (trans r (StepM.fact2 f (i x) (p ∷ ps)))
-- -- ... | ()
-- -- NothingStep : ∀ {l} (x : Fin (suc l)) (t : Term (suc l)) →
-- -- i x ≢ t →
-- -- (ps : List (Step (suc l))) →
-- -- t ≡ (ps ⊹ i x) →
-- -- ∀ {n} (f : Fin (suc l) → Term n) → f x ≢ (f ◃ t)
-- -- NothingStep {l} x t ix≢t ps r = No-Unifier
-- -- where
-- -- No-Unifier : {n : ℕ} (f : Fin (suc l) → Term n) → f x ≢ f ◃ t
-- -- No-Unifier f fx≡f◃t = ix≢t (sym (trans r (cong (λ ps -> ps ⊹ i x) ps≡[])))
-- -- where
-- -- ps≡[] : ps ≡ []
-- -- ps≡[] = map-[] f ps (No-Cycle (f x) (f ◃S ps)
-- -- (begin f x ≡⟨ fx≡f◃t ⟩
-- -- f ◃ t ≡⟨ cong (f ◃_) r ⟩
-- -- f ◃ (ps ⊹ i x) ≡⟨ StepM.fact2 f (i x) ps ⟩
-- -- (f ◃S ps) ⊹ f x ∎))
|
6_LEZ/EX_2_NEAR/assembler.asm | mich2k/CE_LAB | 0 | 174175 | .586
.model flat
.code
_sommavett proc
push ebp
mov ebp,esp
push ebx
push esi
push edi
mov esi,0
mov ecx, dword ptr [ebp+8]
mov edx, dword ptr [ebp+12]
mov edi, dword ptr [ebp+16]
call fagiolo
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp,ebp
pop ebp
ret
_sommavett endp
; i parametri della mia funzione solo indirizzo vettore 1 in ecx e indirizzo vettore 2 in edx
; in edi ho la lunghezza del vettore
; in ebx c'e' la somma dei vettori
; i registri ESI, EDI e ECX devono essere ripristinati
fagiolo proc
push esi
push edi
push ecx
mov ebx,0
mov esi,0
ciclo_1:
cmp esi,edi
je fine_ciclo_1
mov eax, dword ptr [ecx+esi*4]
add eax, dword ptr [edx+esi*4]
add ebx,eax
inc esi
jmp ciclo_1
fine_ciclo_1:
pop ecx
pop edi
pop esi
ret
fagiolo endp
end |
programs/oeis/023/A023717.asm | neoneye/loda | 22 | 21718 | <filename>programs/oeis/023/A023717.asm<gh_stars>10-100
; A023717: Numbers with no 3's in base-4 expansion.
; 0,1,2,4,5,6,8,9,10,16,17,18,20,21,22,24,25,26,32,33,34,36,37,38,40,41,42,64,65,66,68,69,70,72,73,74,80,81,82,84,85,86,88,89,90,96,97,98,100,101,102,104,105,106,128,129,130,132,133,134,136,137,138,144,145,146,148,149,150,152,153,154,160,161,162,164,165,166,168,169,170,256,257,258,260,261,262,264,265,266,272,273,274,276,277,278,280,281,282,288
mov $2,$0
add $2,1
mov $5,$0
lpb $2
mov $0,$5
sub $2,1
sub $0,$2
mov $3,2
mov $4,0
lpb $0
sub $0,2
add $0,$3
mul $0,2
dif $0,6
add $4,1
mul $4,4
lpe
div $4,4
add $4,1
add $1,$4
lpe
sub $1,1
mov $0,$1
|
F458/mcu/nested_interrupt/TMDX570LC43HDK/source/HL_sys_intvecs.asm | daeroro/IntegrationProject | 0 | 160977 | ;-------------------------------------------------------------------------------
; HL_sys_intvecs.asm
;
; (c) Texas Instruments 2009-2013, All rights reserved.
;
.sect ".intvecs"
.arm
;-------------------------------------------------------------------------------
; import reference for interrupt routines
.ref _c_int00
.ref _irqDispatch
.def resetEntry
;-------------------------------------------------------------------------------
; interrupt vectors
resetEntry
b _c_int00
undefEntry
b undefEntry
svcEntry
b svcEntry
prefetchEntry
b prefetchEntry
dataEntry
b dataEntry
reservedEntry
b reservedEntry
b _irqDispatch
ldr pc,[pc,#-0x1b0]
;-------------------------------------------------------------------------------
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2390.asm | ljhsiun2/medusa | 9 | 16747 | <filename>Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2390.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x13b8f, %rsi
lea addresses_A_ht+0xbbc7, %rdi
clflush (%rsi)
nop
nop
nop
and %r15, %r15
mov $116, %rcx
rep movsw
nop
nop
xor $38397, %r13
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r8
push %rbp
push %rdi
push %rdx
// Store
lea addresses_A+0x1957b, %r14
nop
nop
nop
sub %r12, %r12
movw $0x5152, (%r14)
nop
nop
nop
nop
inc %r14
// Store
lea addresses_US+0x160cf, %rdx
nop
nop
nop
nop
add $158, %rdi
mov $0x5152535455565758, %r8
movq %r8, %xmm1
vmovups %ymm1, (%rdx)
nop
nop
nop
nop
nop
and %rdx, %rdx
// Faulty Load
lea addresses_WC+0x348f, %r14
nop
and %rdi, %rdi
mov (%r14), %r8w
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rdx
pop %rdi
pop %rbp
pop %r8
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
source/asis/asis-implementation-permissions.ads | faelys/gela-asis | 4 | 28081 | <filename>source/asis/asis-implementation-permissions.ads
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- 7 package Asis.Implementation.Permissions
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
package Asis.Implementation.Permissions is
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- 7.1 function Is_Formal_Parameter_Named_Notation_Supported
-------------------------------------------------------------------------------
function Is_Formal_Parameter_Named_Notation_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if it is possible to detect usage of named notation.
--
-- Returns False if this implementation will always change parameter lists
-- using named notation to positional lists in function, subprogram, and
-- entry calls. In that case, the Formal_Parameter query will always return
-- a Nil_Element unless the parameter list is obtained with Normalized = True.
--
-- This function affects association lists for aggregates, instantiations,
-- discriminant lists, entry calls, and subprogram calls.
--
-------------------------------------------------------------------------------
-- 7.2 function Default_In_Mode_Supported
-------------------------------------------------------------------------------
function Default_In_Mode_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the A_Default_In_Mode kind is supported by this
-- implementation.
--
-------------------------------------------------------------------------------
-- 7.3 function Generic_Actual_Part_Normalized
-------------------------------------------------------------------------------
function Generic_Actual_Part_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the query Generic_Actual_Part will always return
-- artificial Is_Normalized associations using the defining_identifier
-- instead of the generic_formal_parameter_selector_name, and using
-- default_expression or default_name.
--
-- If Generic_Actual_Part_Normalized then the query Generic_Actual_Part will
-- always behave as if called with Normalized => True.
--
-------------------------------------------------------------------------------
-- 7.4 function Record_Component_Associations_Normalized
-------------------------------------------------------------------------------
function Record_Component_Associations_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the query Record_Component_Associations will always return
-- artificial Is_Normalized associations using the defining_identifier
-- instead of the component_selector_name.
--
-- If Record_Component_Associations_Normalized then the query
-- Record_Component_Associations will always behave as if called with
-- Normalized => True.
--
-------------------------------------------------------------------------------
-- 7.5 function Is_Prefix_Call_Supported
-------------------------------------------------------------------------------
function Is_Prefix_Call_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the ASIS implementation has the ability to determine
-- whether calls are in prefix form.
--
-------------------------------------------------------------------------------
-- 7.6 function Function_Call_Parameters_Normalized
-------------------------------------------------------------------------------
function Function_Call_Parameters_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the query Function_Call_Parameters will always return
-- artificial Is_Normalized associations using the defining_identifier
-- instead of the formal_parameter_selector_name, and using the
-- default_expression.
--
-- If Function_Call_Parameters_Normalized then the query
-- Function_Call_Parameters will always behave as if called with
-- Normalized => True.
--
-------------------------------------------------------------------------------
-- 7.7 function Call_Statement_Parameters_Normalized
-------------------------------------------------------------------------------
function Call_Statement_Parameters_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the query Call_Statement_Parameters will always return
-- artificial Is_Normalized associations using the defining_identifier
-- instead of the formal_parameter_selector_name, and using the
-- default_expression.
--
-- If Call_Statement_Parameters_Normalized then the query
-- Call_Statement_Parameters will always behave as if called with
-- Normalized => True.
--
-------------------------------------------------------------------------------
-- It is not possible to obtain either a normalized or
-- unnormalized Discriminant_Association list for an unconstrained record
-- or derived subtype_indication where the discriminant_association is
-- supplied by default; there is no constraint to query, and a Nil_Element
-- is returned from the query Subtype_Constraint.
--
-------------------------------------------------------------------------------
-- 7.8 function Discriminant_Associations_Normalized
-------------------------------------------------------------------------------
function Discriminant_Associations_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the query Discriminant_Associations will always return
-- artificial Is_Normalized associations using the defining_identifier
-- instead of the discriminant_selector_name.
--
-- If Discriminant_Associations_Normalized then the query
-- Discriminant_Associations will always behave as if called with
-- Normalized => True.
--
-------------------------------------------------------------------------------
-- 7.9 function Is_Line_Number_Supported
-------------------------------------------------------------------------------
function Is_Line_Number_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation can return valid line numbers for
-- Elements.
--
-- An implementation may choose to ignore line number values in which case
-- this function returns False.
--
-------------------------------------------------------------------------------
-- 7.10 function Is_Span_Column_Position_Supported
-------------------------------------------------------------------------------
function Is_Span_Column_Position_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation can return valid character positions for
-- elements.
--
-- An implementation may choose to ignore column character position values
-- within spans in which case this function returns False. This function will
-- be False if Is_Line_Number_Supported = False.
--
-------------------------------------------------------------------------------
-- 7.11 function Is_Commentary_Supported
-------------------------------------------------------------------------------
function Is_Commentary_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation can return comments.
--
-- An implementation may choose to ignore comments in the text in which case
-- the function Is_Commentary_Supported returns False.
--
-------------------------------------------------------------------------------
-- 7.12 function Attributes_Are_Supported
-------------------------------------------------------------------------------
function Attributes_Are_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if an implementation supports compilation unit attributes.
-- Returns False if all attributes will return Has_Attribute() = False.
--
-------------------------------------------------------------------------------
-- 7.13 function Implicit_Components_Supported
-------------------------------------------------------------------------------
function Implicit_Components_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation provides elements representing
-- implicit implementation-defined record components.
--
-------------------------------------------------------------------------------
-- 7.14 function Object_Declarations_Normalized
-------------------------------------------------------------------------------
function Object_Declarations_Normalized return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation normalizes multiple object declarations
-- to an equivalent sequence of single declarations.
--
-------------------------------------------------------------------------------
-- 7.15 function Predefined_Operations_Supported
-------------------------------------------------------------------------------
function Predefined_Operations_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation supports queries of predefined
-- operations.
--
-------------------------------------------------------------------------------
-- 7.16 function Inherited_Declarations_Supported
-------------------------------------------------------------------------------
function Inherited_Declarations_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation supports queries of inherited
-- declarations.
--
-------------------------------------------------------------------------------
-- 7.17 function Inherited_Subprograms_Supported
-------------------------------------------------------------------------------
function Inherited_Subprograms_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation supports queries of inherited
-- subprograms.
--
-------------------------------------------------------------------------------
-- 7.18 function Generic_Macro_Expansion_Supported
-------------------------------------------------------------------------------
function Generic_Macro_Expansion_Supported return Boolean;
-------------------------------------------------------------------------------
-- Returns True if the implementation expands generics using macros to
-- supports queries.
-------------------------------------------------------------------------------
end Asis.Implementation.Permissions;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the <NAME>, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
data/items/marts.asm | AtmaBuster/pokeplat-gen2 | 6 | 104314 | Marts:
; entries correspond to MART_* constants
dw Mart0Badge
dw Mart1Badge
dw Mart3Badge
dw Mart5Badge
dw Mart7Badge
dw Mart8Badge
dw MartJubilife
dw MartOreburgh
.End
Mart0Badge:
db 4 ; # items
db POKE_BALL
db POTION
db ANTIDOTE
db PARLYZ_HEAL
db -1 ; end
Mart1Badge:
db 10 ; # items
db POKE_BALL
db POTION
db SUPER_POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db ESCAPE_ROPE
db REPEL
db -1 ; end
Mart3Badge:
db 13 ; # items
db POKE_BALL
db GREAT_BALL
db POTION
db SUPER_POTION
db REVIVE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db ESCAPE_ROPE
db REPEL
db SUPER_REPEL
db -1 ; end
Mart5Badge:
db 16 ; # items
db POKE_BALL
db GREAT_BALL
db ULTRA_BALL
db POTION
db SUPER_POTION
db HYPER_POTION
db REVIVE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db FULL_HEAL
db ESCAPE_ROPE
db REPEL
db SUPER_REPEL
db -1 ; end
Mart7Badge:
db 18 ; # items
db POKE_BALL
db GREAT_BALL
db ULTRA_BALL
db POTION
db SUPER_POTION
db HYPER_POTION
db MAX_POTION
db REVIVE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db FULL_HEAL
db ESCAPE_ROPE
db REPEL
db SUPER_REPEL
db MAX_REPEL
db -1 ; end
Mart8Badge:
db 19 ; # items
db POKE_BALL
db GREAT_BALL
db ULTRA_BALL
db POTION
db SUPER_POTION
db HYPER_POTION
db MAX_POTION
db FULL_RESTORE
db REVIVE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db FULL_HEAL
db ESCAPE_ROPE
db REPEL
db SUPER_REPEL
db MAX_REPEL
db -1 ; end
MartJubilife:
db 2 ; # items
db BLUESKY_MAIL
db HEAL_BALL
db -1 ; end
MartOreburgh:
db 3 ; # items
db LITEBLUEMAIL
db HEAL_BALL
db NET_BALL
db -1 ; end
DefaultMart:
db 2 ; # items
db POKE_BALL
db POTION
db -1 ; end
|
alloy4fun_models/trashltl/models/14/HgBXErKEyEuji6TYx.als | Kaixi26/org.alloytools.alloy | 0 | 45 | open main
pred idHgBXErKEyEuji6TYx_prop15 {
all f:File | f not in Trash implies eventually f in Trash
}
pred __repair { idHgBXErKEyEuji6TYx_prop15 }
check __repair { idHgBXErKEyEuji6TYx_prop15 <=> prop15o } |
source/amf/dd/amf-internals-tables-dg_metamodel.ads | svn2github/matreshka | 24 | 148 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
package AMF.Internals.Tables.DG_Metamodel is
pragma Preelaborate;
function MM_DG_DG return AMF.Internals.CMOF_Element;
function MC_DG_Close_Path return AMF.Internals.CMOF_Element;
function MC_DG_Cubic_Curve_To return AMF.Internals.CMOF_Element;
function MC_DG_Elliptical_Arc_To return AMF.Internals.CMOF_Element;
function MC_DG_Gradient_Stop return AMF.Internals.CMOF_Element;
function MC_DG_Line_To return AMF.Internals.CMOF_Element;
function MC_DG_Matrix return AMF.Internals.CMOF_Element;
function MC_DG_Move_To return AMF.Internals.CMOF_Element;
function MC_DG_Path_Command return AMF.Internals.CMOF_Element;
function MC_DG_Quadratic_Curve_To return AMF.Internals.CMOF_Element;
function MC_DG_Rotate return AMF.Internals.CMOF_Element;
function MC_DG_Scale return AMF.Internals.CMOF_Element;
function MC_DG_Skew return AMF.Internals.CMOF_Element;
function MC_DG_Transform return AMF.Internals.CMOF_Element;
function MC_DG_Translate return AMF.Internals.CMOF_Element;
function MP_DG_Cubic_Curve_To_End_Control return AMF.Internals.CMOF_Element;
function MP_DG_Cubic_Curve_To_Point return AMF.Internals.CMOF_Element;
function MP_DG_Cubic_Curve_To_Start_Control return AMF.Internals.CMOF_Element;
function MP_DG_Elliptical_Arc_To_Is_Large_Arc return AMF.Internals.CMOF_Element;
function MP_DG_Elliptical_Arc_To_Is_Sweep return AMF.Internals.CMOF_Element;
function MP_DG_Elliptical_Arc_To_Point return AMF.Internals.CMOF_Element;
function MP_DG_Elliptical_Arc_To_Radii return AMF.Internals.CMOF_Element;
function MP_DG_Elliptical_Arc_To_Rotation return AMF.Internals.CMOF_Element;
function MP_DG_Gradient_Stop_Color return AMF.Internals.CMOF_Element;
function MP_DG_Gradient_Stop_Offset return AMF.Internals.CMOF_Element;
function MP_DG_Gradient_Stop_Opacity return AMF.Internals.CMOF_Element;
function MP_DG_Line_To_Point return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_A return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_B return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_C return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_D return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_E return AMF.Internals.CMOF_Element;
function MP_DG_Matrix_F return AMF.Internals.CMOF_Element;
function MP_DG_Move_To_Point return AMF.Internals.CMOF_Element;
function MP_DG_Path_Command_Is_Relative return AMF.Internals.CMOF_Element;
function MP_DG_Quadratic_Curve_To_Control return AMF.Internals.CMOF_Element;
function MP_DG_Quadratic_Curve_To_Point return AMF.Internals.CMOF_Element;
function MP_DG_Rotate_Angle return AMF.Internals.CMOF_Element;
function MP_DG_Rotate_Center return AMF.Internals.CMOF_Element;
function MP_DG_Scale_Factor_X return AMF.Internals.CMOF_Element;
function MP_DG_Scale_Factor_Y return AMF.Internals.CMOF_Element;
function MP_DG_Skew_Angle_X return AMF.Internals.CMOF_Element;
function MP_DG_Skew_Angle_Y return AMF.Internals.CMOF_Element;
function MP_DG_Translate_Delta_X return AMF.Internals.CMOF_Element;
function MP_DG_Translate_Delta_Y return AMF.Internals.CMOF_Element;
function MC_DG_Canvas return AMF.Internals.CMOF_Element;
function MC_DG_Circle return AMF.Internals.CMOF_Element;
function MC_DG_Clip_Path return AMF.Internals.CMOF_Element;
function MC_DG_Ellipse return AMF.Internals.CMOF_Element;
function MC_DG_Fill return AMF.Internals.CMOF_Element;
function MC_DG_Gradient return AMF.Internals.CMOF_Element;
function MC_DG_Graphical_Element return AMF.Internals.CMOF_Element;
function MC_DG_Group return AMF.Internals.CMOF_Element;
function MC_DG_Image return AMF.Internals.CMOF_Element;
function MC_DG_Line return AMF.Internals.CMOF_Element;
function MC_DG_Linear_Gradient return AMF.Internals.CMOF_Element;
function MC_DG_Marked_Element return AMF.Internals.CMOF_Element;
function MC_DG_Marker return AMF.Internals.CMOF_Element;
function MC_DG_Path return AMF.Internals.CMOF_Element;
function MC_DG_Pattern return AMF.Internals.CMOF_Element;
function MC_DG_Polygon return AMF.Internals.CMOF_Element;
function MC_DG_Polyline return AMF.Internals.CMOF_Element;
function MC_DG_Radial_Gradient return AMF.Internals.CMOF_Element;
function MC_DG_Rectangle return AMF.Internals.CMOF_Element;
function MC_DG_Style return AMF.Internals.CMOF_Element;
function MC_DG_Text return AMF.Internals.CMOF_Element;
function MP_DG_Canvas_Background_Color return AMF.Internals.CMOF_Element;
function MP_DG_Canvas_Background_Fill_A_Canvas return AMF.Internals.CMOF_Element;
function MP_DG_Canvas_Packaged_Fill_Fill_Canvas return AMF.Internals.CMOF_Element;
function MP_DG_Canvas_Packaged_Marker_Marker_Canvas return AMF.Internals.CMOF_Element;
function MP_DG_Canvas_Packaged_Style_A_Canvas return AMF.Internals.CMOF_Element;
function MP_DG_Circle_Center return AMF.Internals.CMOF_Element;
function MP_DG_Circle_Radius return AMF.Internals.CMOF_Element;
function MP_DG_Clip_Path_Clipped_Element_Graphical_Element_Clip_Path return AMF.Internals.CMOF_Element;
function MP_DG_Ellipse_Center return AMF.Internals.CMOF_Element;
function MP_DG_Ellipse_Radii return AMF.Internals.CMOF_Element;
function MP_DG_Fill_Canvas_Canvas_Packaged_Fill return AMF.Internals.CMOF_Element;
function MP_DG_Fill_Transform return AMF.Internals.CMOF_Element;
function MP_DG_Gradient_Stop return AMF.Internals.CMOF_Element;
function MP_DG_Graphical_Element_Clip_Path_Clip_Path_Clipped_Element return AMF.Internals.CMOF_Element;
function MP_DG_Graphical_Element_Group_Group_Member return AMF.Internals.CMOF_Element;
function MP_DG_Graphical_Element_Local_Style_A_Styled_Element return AMF.Internals.CMOF_Element;
function MP_DG_Graphical_Element_Shared_Style_A_Styled_Element return AMF.Internals.CMOF_Element;
function MP_DG_Graphical_Element_Transform return AMF.Internals.CMOF_Element;
function MP_DG_Group_Member_Graphical_Element_Group return AMF.Internals.CMOF_Element;
function MP_DG_Image_Bounds return AMF.Internals.CMOF_Element;
function MP_DG_Image_Is_Aspect_Ratio_Preserved return AMF.Internals.CMOF_Element;
function MP_DG_Image_Source return AMF.Internals.CMOF_Element;
function MP_DG_Line_End return AMF.Internals.CMOF_Element;
function MP_DG_Line_Start return AMF.Internals.CMOF_Element;
function MP_DG_Linear_Gradient_X1 return AMF.Internals.CMOF_Element;
function MP_DG_Linear_Gradient_X2 return AMF.Internals.CMOF_Element;
function MP_DG_Linear_Gradient_Y1 return AMF.Internals.CMOF_Element;
function MP_DG_Linear_Gradient_Y2 return AMF.Internals.CMOF_Element;
function MP_DG_Marked_Element_End_Marker_A_Marked_Element return AMF.Internals.CMOF_Element;
function MP_DG_Marked_Element_Mid_Marker_A_Marked_Element return AMF.Internals.CMOF_Element;
function MP_DG_Marked_Element_Start_Marker_A_Marked_Element return AMF.Internals.CMOF_Element;
function MP_DG_Marker_Canvas_Canvas_Packaged_Marker return AMF.Internals.CMOF_Element;
function MP_DG_Marker_Reference return AMF.Internals.CMOF_Element;
function MP_DG_Marker_Size return AMF.Internals.CMOF_Element;
function MP_DG_Path_Command return AMF.Internals.CMOF_Element;
function MP_DG_Pattern_Bounds return AMF.Internals.CMOF_Element;
function MP_DG_Pattern_Tile_A_Pattern return AMF.Internals.CMOF_Element;
function MP_DG_Polygon_Point return AMF.Internals.CMOF_Element;
function MP_DG_Polyline_Point return AMF.Internals.CMOF_Element;
function MP_DG_Radial_Gradient_Center_X return AMF.Internals.CMOF_Element;
function MP_DG_Radial_Gradient_Center_Y return AMF.Internals.CMOF_Element;
function MP_DG_Radial_Gradient_Focus_X return AMF.Internals.CMOF_Element;
function MP_DG_Radial_Gradient_Focus_Y return AMF.Internals.CMOF_Element;
function MP_DG_Radial_Gradient_Radius return AMF.Internals.CMOF_Element;
function MP_DG_Rectangle_Bounds return AMF.Internals.CMOF_Element;
function MP_DG_Rectangle_Corner_Radius return AMF.Internals.CMOF_Element;
function MP_DG_Style_Fill_A_Style return AMF.Internals.CMOF_Element;
function MP_DG_Style_Fill_Color return AMF.Internals.CMOF_Element;
function MP_DG_Style_Fill_Opacity return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Bold return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Color return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Italic return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Name return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Size return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Strike_Through return AMF.Internals.CMOF_Element;
function MP_DG_Style_Font_Underline return AMF.Internals.CMOF_Element;
function MP_DG_Style_Stroke_Color return AMF.Internals.CMOF_Element;
function MP_DG_Style_Stroke_Dash_Length return AMF.Internals.CMOF_Element;
function MP_DG_Style_Stroke_Opacity return AMF.Internals.CMOF_Element;
function MP_DG_Style_Stroke_Width return AMF.Internals.CMOF_Element;
function MP_DG_Text_Alignment return AMF.Internals.CMOF_Element;
function MP_DG_Text_Bounds return AMF.Internals.CMOF_Element;
function MP_DG_Text_Data return AMF.Internals.CMOF_Element;
function MP_DG_A_Pattern_Pattern_Tile return AMF.Internals.CMOF_Element;
function MP_DG_A_Canvas_Canvas_Packaged_Style return AMF.Internals.CMOF_Element;
function MP_DG_A_Marked_Element_Marked_Element_Start_Marker return AMF.Internals.CMOF_Element;
function MP_DG_A_Marked_Element_Marked_Element_End_Marker return AMF.Internals.CMOF_Element;
function MP_DG_A_Marked_Element_Marked_Element_Mid_Marker return AMF.Internals.CMOF_Element;
function MP_DG_A_Styled_Element_Graphical_Element_Local_Style return AMF.Internals.CMOF_Element;
function MP_DG_A_Style_Style_Fill return AMF.Internals.CMOF_Element;
function MP_DG_A_Styled_Element_Graphical_Element_Shared_Style return AMF.Internals.CMOF_Element;
function MP_DG_A_Canvas_Canvas_Background_Fill return AMF.Internals.CMOF_Element;
function MA_DG_Pattern_Tile_Pattern return AMF.Internals.CMOF_Element;
function MA_DG_Canvas_Packaged_Style_Canvas return AMF.Internals.CMOF_Element;
function MA_DG_Marked_Element_Start_Marker_Marked_Element return AMF.Internals.CMOF_Element;
function MA_DG_Marked_Element_End_Marker_Marked_Element return AMF.Internals.CMOF_Element;
function MA_DG_Group_Member_Group return AMF.Internals.CMOF_Element;
function MA_DG_Marked_Element_Mid_Marker_Marked_Element return AMF.Internals.CMOF_Element;
function MA_DG_Canvas_Packaged_Marker_Canvas return AMF.Internals.CMOF_Element;
function MA_DG_Graphical_Element_Clip_Path_Clipped_Element return AMF.Internals.CMOF_Element;
function MA_DG_Graphical_Element_Local_Style_Styled_Element return AMF.Internals.CMOF_Element;
function MA_DG_Canvas_Packaged_Fill_Canvas return AMF.Internals.CMOF_Element;
function MA_DG_Style_Fill_Style return AMF.Internals.CMOF_Element;
function MA_DG_Graphical_Element_Shared_Style_Styled_Element return AMF.Internals.CMOF_Element;
function MA_DG_Canvas_Background_Fill_Canvas return AMF.Internals.CMOF_Element;
function MB_DG return AMF.Internals.AMF_Element;
function ML_DG return AMF.Internals.AMF_Element;
private
Base : AMF.Internals.CMOF_Element := 0;
end AMF.Internals.Tables.DG_Metamodel;
|
OutlawsLib/antlr/LvtParser.g4 | Zbyl/OutlawsX | 2 | 2193 | <reponame>Zbyl/OutlawsX<filename>OutlawsLib/antlr/LvtParser.g4
parser grammar LvtParser;
options { tokenVocab = LvtLexer; }
lvt_file : LVT lvt_version=float_
LEVELNAME level_name=STR
VERSION level_version=float_
lvt_file_element*
EOF
;
lvt_file_element
: music
| paralax
| light_source
| cmaps
| palettes
| shades
| textures
| sectors
;
float_ : INT | FLOAT ;
music : MUSIC musicName=ID;
paralax : PARALLAX float_ float_;
light_source : LIGHT SOURCE float_ float_ float_ float_;
shades : SHADES numShades=INT (shade)* ;
shade : SHADE COLON INT INT INT INT INT (L|G|T);
cmaps : CMAPS numCMaps=INT (cmap)* ;
cmap : CMAP_COLON cMapName=ID ;
palettes : PALETTES numTextures=INT (palette)* ;
palette : PALETTE_COLON paletteName=ID ;
textures : TEXTURES numTextures=INT (texture)* ;
texture : TEXTURE_COLON textureName=ID ;
vertices : VERTICES numVertices=INT (vertex)* ;
vertex : X COLON x=float_ Z COLON z=float_;
floorOffsets : FLOOR OFFSETS numFloorOffsets=INT (floorOffset)* ;
floorOffset : OFFSET COLON FLOAT INT FLOAT FLOAT FLAGS COLON flag1=INT flag2=INT;
walls : WALLS numWalls=INT (wall)* ;
wall : WALL_COLON wallId=ID
V1 COLON v1=INT
V2 COLON v2=INT
MID COLON mid=textureParamsSmall
TOP COLON top=textureParamsSmall
BOT COLON bot=textureParamsSmall
OVERLAY COLON overlay=textureParamsSmall
ADJOIN COLON adjoin=INT
MIRROR COLON mirror=INT
DADJOIN COLON dadjoin=INT
DMIRROR COLON dmirror=INT
FLAGS COLON flag1=INT flag2=INT
LIGHT COLON light=INT
;
sectors : NUMSECTORS numSectors=INT
(sector)*;
textureParamsSmall : textureId=INT offsX=float_ offsY=float_;
textureParams : textureParamsSmall unused=float_;
slopeParams : sectorId=INT wallId=INT angle=INT ;
sector : SECTOR id=ID
NAME (name=IDEND)?
AMBIENT ambient=INT
PALETTE paletteId=INT
CMAP cmapId=INT
FRICTION friction=float_
GRAVITY gravity=INT
ELASTICITY elasticity=float_
VELOCITY velocityX=INT velocityY=INT velocityZ=INT
VADJOIN vadjoin=INT
FLOOR SOUND floorSound=ID
(
FLOOR TEXTURE floorTexture=textureParams
FLOOR ALTITUDE floorY=float_
|
FLOOR Y floorY=float_ floorTexture=textureParams
)
(
CEILING TEXTURE ceilingTexture=textureParams
CEILING ALTITUDE ceilingY=float_
|
CEILING Y ceilingY=float_ ceilingTexture=textureParams
)
F_OVERLAY floorOverlayTexture=textureParams
C_OVERLAY ceilingOverlayTexture=textureParams
floorOffsets
FLAGS flag1=INT flag2=INT (flag3=INT)?
(SLOPEDFLOOR floorSlope=slopeParams)?
(SLOPEDCEILING ceilingSlope=slopeParams)?
LAYER layer=INT
vertices
walls
;
|
programs/oeis/021/A021130.asm | neoneye/loda | 22 | 174049 | <reponame>neoneye/loda
; A021130: Decimal expansion of 1/126.
; 0,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7,9,3,6,5,0,7
add $0,1
mov $1,10
pow $1,$0
mul $1,7
div $1,882
mod $1,10
mov $0,$1
|
regtests/util-beans-objects-discretes.adb | RREE/ada-util | 60 | 6376 | -----------------------------------------------------------------------
-- Util.Beans.Objects.Discretes -- Unit tests for concurrency package
-- Copyright (C) 2009, 2010, 2020 <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 Ada.Calendar;
with Ada.Calendar.Formatting;
with Util.Beans.Objects;
with Util.Beans.Objects.Enums;
with Util.Beans.Objects.Time;
with Util.Beans.Objects.Discrete_Tests;
package body Util.Beans.Objects.Discretes is
use Ada.Calendar;
function "-" (Left, Right : Ada.Calendar.Time) return Ada.Calendar.Time;
function "+" (Left, Right : Ada.Calendar.Time) return Ada.Calendar.Time;
function Time_Value (S : String) return Ada.Calendar.Time;
function "-" (Left, Right : Boolean) return Boolean;
function "+" (Left, Right : Boolean) return Boolean;
package Test_Integer is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Integer,
To_Type => Util.Beans.Objects.To_Integer,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Integer'Value,
Test_Name => "Integer",
Test_Values => "-100,1,0,1,1000");
package Test_Duration is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Duration,
To_Type => Util.Beans.Objects.To_Duration,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Duration'Value,
Test_Name => "Duration",
Test_Values => "-100,1,0,1,1000");
package Test_Long_Integer is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Long_Integer,
To_Type => Util.Beans.Objects.To_Long_Integer,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Long_Integer'Value,
Test_Name => "Long_Integer",
Test_Values => "-100,1,0,1,1000");
package Test_Long_Long_Integer is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Long_Long_Integer,
To_Type => Util.Beans.Objects.To_Long_Long_Integer,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Long_Long_Integer'Value,
Test_Name => "Long_Long_Integer",
Test_Values => "-10000000000000,1,0,1,1000_000_000_000");
function "-" (Left, Right : Boolean) return Boolean is
begin
return Left and Right;
end "-";
function "+" (Left, Right : Boolean) return Boolean is
begin
return Left or Right;
end "+";
package Test_Boolean is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Boolean,
To_Type => Util.Beans.Objects.To_Boolean,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Boolean'Value,
Test_Name => "Boolean",
Test_Values => "false,true");
type Color is (WHITE, BLACK, RED, GREEN, BLUE, YELLOW);
package Color_Object is new Util.Beans.Objects.Enums (Color, ROUND_VALUE => True);
function "-" (Left, Right : Color) return Color;
function "+" (Left, Right : Color) return Color;
function "-" (Left, Right : Color) return Color is
N : constant Integer := Color'Pos (Left) - Color'Pos (Right);
begin
if N >= 0 then
return Color'Val ((Color'Pos (WHITE) + N) mod 6);
else
return Color'Val ((Color'Pos (WHITE) - N) mod 6);
end if;
end "-";
function "+" (Left, Right : Color) return Color is
N : constant Integer := Color'Pos (Left) + Color'Pos (Right);
begin
return Color'Val ((Color'Pos (WHITE) + N) mod 6);
end "+";
package Test_Enum is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Color,
To_Type => Color_Object.To_Value,
To_Object_Test => Color_Object.To_Object,
Value => Color'Value,
Test_Name => "Color",
Test_Values => "BLACK,RED,GREEN,BLUE,YELLOW");
Epoch : constant Ada.Calendar.Time :=
Ada.Calendar.Time_Of (Year => Year_Number'First,
Month => 1,
Day => 1,
Seconds => 12 * 3600.0);
function Time_Value (S : String) return Ada.Calendar.Time is
begin
return Ada.Calendar.Formatting.Value (S);
end Time_Value;
-- For the purpose of the time unit test, we need Time + Time operation even
-- if this does not really makes sense.
function "+" (Left, Right : Ada.Calendar.Time) return Ada.Calendar.Time is
T1 : constant Duration := Left - Epoch;
T2 : constant Duration := Right - Epoch;
begin
return (T1 + T2) + Epoch;
end "+";
function "-" (Left, Right : Ada.Calendar.Time) return Ada.Calendar.Time is
T1 : constant Duration := Left - Epoch;
T2 : constant Duration := Right - Epoch;
begin
return (T1 - T2) + Epoch;
end "-";
package Test_Time is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Ada.Calendar.Time,
To_Type => Util.Beans.Objects.Time.To_Time,
To_Object_Test => Util.Beans.Objects.Time.To_Object,
Value => Time_Value,
Test_Name => "Time",
Test_Values => "1970-03-04 12:12:00,1975-05-04 13:13:10");
package Test_Float is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Float,
To_Type => Util.Beans.Objects.To_Float,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Float'Value,
Test_Name => "Float",
Test_Values => "1.2,3.3,-3.3");
package Test_Long_Float is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Long_Float,
To_Type => Util.Beans.Objects.To_Long_Float,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Long_Float'Value,
Test_Name => "Long_Float",
Test_Values => "1.2,3.3,-3.3");
package Test_Long_Long_Float is new
Util.Beans.Objects.Discrete_Tests (Test_Type => Long_Long_Float,
To_Type => Util.Beans.Objects.To_Long_Long_Float,
To_Object_Test => Util.Beans.Objects.To_Object,
Value => Long_Long_Float'Value,
Test_Name => "Long_Long_Float",
Test_Values => "1.2,3.3,-3.3");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Test_Boolean.Add_Tests (Suite);
Test_Integer.Add_Tests (Suite);
Test_Long_Integer.Add_Tests (Suite);
Test_Duration.Add_Tests (Suite);
Test_Long_Long_Integer.Add_Tests (Suite);
Test_Time.Add_Tests (Suite);
Test_Float.Add_Tests (Suite);
Test_Long_Float.Add_Tests (Suite);
Test_Long_Long_Float.Add_Tests (Suite);
Test_Enum.Add_Tests (Suite);
end Add_Tests;
end Util.Beans.Objects.Discretes;
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_820.asm | ljhsiun2/medusa | 9 | 87714 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x1e95, %r13
nop
nop
nop
sub $62914, %r8
movl $0x61626364, (%r13)
nop
nop
nop
nop
cmp $5373, %r8
lea addresses_WC_ht+0xde2, %rsi
lea addresses_UC_ht+0x110e2, %rdi
cmp %r14, %r14
mov $59, %rcx
rep movsl
nop
nop
inc %r8
lea addresses_normal_ht+0x168e2, %rsi
lea addresses_A_ht+0x1282a, %rdi
inc %r12
mov $16, %rcx
rep movsb
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x118e2, %rsi
lea addresses_UC_ht+0x109a0, %rdi
nop
nop
nop
nop
sub $53539, %r13
mov $121, %rcx
rep movsb
inc %r14
lea addresses_UC_ht+0x60a2, %rdi
nop
nop
nop
nop
xor %r13, %r13
movups (%rdi), %xmm6
vpextrq $0, %xmm6, %rdx
dec %r8
lea addresses_UC_ht+0x6066, %rdx
nop
nop
nop
nop
nop
add %r14, %r14
movl $0x61626364, (%rdx)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0x1c862, %rsi
lea addresses_A_ht+0x1b51e, %rdi
sub $39782, %r12
mov $87, %rcx
rep movsl
nop
inc %rcx
lea addresses_WC_ht+0x1b6ce, %r8
nop
nop
nop
nop
sub $47578, %rdx
movw $0x6162, (%r8)
nop
nop
xor $8526, %rdi
lea addresses_A_ht+0x16b2, %rsi
lea addresses_WC_ht+0x1c2e2, %rdi
nop
nop
nop
nop
cmp $24190, %rdx
mov $45, %rcx
rep movsb
nop
nop
dec %rsi
lea addresses_normal_ht+0x118e2, %rcx
nop
nop
nop
add %r12, %r12
movl $0x61626364, (%rcx)
nop
nop
nop
xor %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r15
push %rax
push %rdi
push %rdx
// Load
lea addresses_D+0x30e2, %rax
nop
nop
nop
nop
dec %rdx
mov (%rax), %r10
nop
nop
nop
nop
add $42763, %rdi
// Faulty Load
lea addresses_D+0x30e2, %rdx
nop
dec %r11
mov (%rdx), %rax
lea oracles, %r10
and $0xff, %rax
shlq $12, %rax
mov (%r10,%rax,1), %rax
pop %rdx
pop %rdi
pop %rax
pop %r15
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': True, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_72_896.asm | ljhsiun2/medusa | 9 | 245238 | <reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_72_896.asm<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r8
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x530f, %r14
nop
xor %r8, %r8
mov $0x6162636465666768, %r9
movq %r9, %xmm3
and $0xffffffffffffffc0, %r14
movaps %xmm3, (%r14)
nop
nop
nop
nop
sub $8480, %rax
lea addresses_A_ht+0x1ae0f, %rsi
lea addresses_UC_ht+0x9fc0, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp %rbp, %rbp
mov $80, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r8, %r8
lea addresses_D_ht+0xc48f, %rsi
lea addresses_WC_ht+0x9f5f, %rdi
clflush (%rdi)
nop
xor $56261, %r8
mov $62, %rcx
rep movsw
cmp $15959, %r8
lea addresses_UC_ht+0x1da0f, %rsi
nop
xor $15935, %r9
movups (%rsi), %xmm3
vpextrq $0, %xmm3, %rbp
nop
nop
add %r8, %r8
lea addresses_A_ht+0x1789f, %rsi
lea addresses_WT_ht+0x1e80f, %rdi
nop
nop
nop
nop
dec %r8
mov $85, %rcx
rep movsw
xor $36542, %rcx
lea addresses_UC_ht+0x3ed7, %rsi
lea addresses_normal_ht+0x15c0f, %rdi
nop
nop
nop
nop
cmp $16277, %rbp
mov $67, %rcx
rep movsb
nop
cmp %rcx, %rcx
lea addresses_WT_ht+0x340f, %rax
clflush (%rax)
nop
nop
nop
nop
nop
cmp %r9, %r9
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
vmovups %ymm6, (%rax)
and $10862, %rbp
lea addresses_UC_ht+0x17e0f, %r9
nop
and %rax, %rax
mov $0x6162636465666768, %rbp
movq %rbp, %xmm6
and $0xffffffffffffffc0, %r9
movaps %xmm6, (%r9)
nop
dec %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rbx
push %rdx
push %rsi
// Store
lea addresses_PSE+0x1fd2f, %r11
nop
nop
sub $9343, %r10
mov $0x5152535455565758, %r9
movq %r9, %xmm4
vmovups %ymm4, (%r11)
nop
nop
dec %r10
// Store
mov $0x3c1f600000000b0f, %r10
nop
nop
nop
nop
and $55767, %rdx
mov $0x5152535455565758, %r11
movq %r11, (%r10)
nop
nop
nop
cmp $4050, %r9
// Store
lea addresses_D+0x215f, %rdx
nop
add %r9, %r9
mov $0x5152535455565758, %rsi
movq %rsi, %xmm1
vmovntdq %ymm1, (%rdx)
nop
nop
nop
nop
sub $63971, %r13
// Store
lea addresses_D+0x1010f, %rsi
clflush (%rsi)
nop
nop
nop
nop
sub %rbx, %rbx
movb $0x51, (%rsi)
nop
nop
cmp $52133, %rdx
// Store
lea addresses_RW+0x1fe5f, %r9
nop
inc %rbx
mov $0x5152535455565758, %r10
movq %r10, %xmm6
vmovups %ymm6, (%r9)
and %r9, %r9
// Store
lea addresses_D+0x8f8f, %r9
nop
nop
nop
cmp $51993, %r10
mov $0x5152535455565758, %rbx
movq %rbx, %xmm3
movups %xmm3, (%r9)
// Exception!!!
nop
nop
mov (0), %r10
cmp %rbx, %rbx
// Faulty Load
lea addresses_D+0x16e0f, %rbx
nop
nop
and %rsi, %rsi
movb (%rbx), %r13b
lea oracles, %r9
and $0xff, %r13
shlq $12, %r13
mov (%r9,%r13,1), %r13
pop %rsi
pop %rdx
pop %rbx
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_NC', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_D', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_RW', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D', 'congruent': 7}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 6}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 9}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 4, 'type': 'addresses_A_ht'}}
{'dst': {'same': True, 'congruent': 9, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 11}, 'OP': 'STOR'}
{'36': 72}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
src/Generic/Lib/Category.agda | turion/Generic | 0 | 17031 | module Generic.Lib.Category where
open import Category.Functor public
open import Category.Applicative public
open import Category.Monad public
open RawFunctor {{...}} public
open RawApplicative {{...}} hiding (_<$>_; _<&>_; _<$_; zip; zipWith) renaming (_⊛_ to _<*>_) public
open RawMonad {{...}} hiding (pure; _<$>_; _<&>_; _<$_; _⊛_; _<⊛_; _⊛>_; _⊗_; rawFunctor; zip; zipWith) public
fmap = _<$>_
|
bahamut/source/menu-names.asm | higan-emu/bahamut-lagoon-translation-kit | 2 | 245675 | <reponame>higan-emu/bahamut-lagoon-translation-kit<filename>bahamut/source/menu-names.asm
//modifications to the name entry screen
namespace menu {
seek(codeCursor)
namespace decodeNameEntry {
//called once when loading the name entry screen
enqueue pc
seek($eeda2c); jsl main; jmp $da5a
dequeue pc
//A => name index (0-9)
//$7e2b00 => name table input
//$7e9e00 <= name output
//function must return with B set to #$7e: it is used by subsequent code
main: {
ldb #$7e //B set by original routine
enter
and #$00ff; mul(8); tax
lda $2b00,x; sta base56.decode.input+0
lda $2b02,x; sta base56.decode.input+2
lda $2b04,x; sta base56.decode.input+4
lda $2b06,x; sta base56.decode.input+6
jsl base56.decode
lda base56.decode.output+ 0; sta $9e00
lda base56.decode.output+ 2; sta $9e02
lda base56.decode.output+ 4; sta $9e04
lda base56.decode.output+ 6; sta $9e06
lda base56.decode.output+ 8; sta $9e08
lda base56.decode.output+10; sta $9e0a
leave; rtl
}
}
namespace encodeNameEntry {
//called once when confirming a name and exiting the name entry screen
enqueue pc
seek($eedc21); jsl main; jmp $dc49
dequeue pc
variable(2, index)
//A => name index (0-9)
//$7e9e00 => name input
//$7e2b00 <= name table output
main: {
ldb #$7e //B set by original routine
enter
and #$00ff; sta index
mul(8); tax
lda $9e00; sta base56.encode.input+ 0
lda $9e02; sta base56.encode.input+ 2
lda $9e04; sta base56.encode.input+ 4
lda $9e06; sta base56.encode.input+ 6
lda $9e08; sta base56.encode.input+ 8
lda $9e0a; sta base56.encode.input+10
jsl base56.encode
lda base56.encode.output+0; sta $2b00,x
lda base56.encode.output+2; sta $2b02,x
lda base56.encode.output+4; sta $2b04,x
lda base56.encode.output+6; sta $2b06,x
//pre-render the newly chosen name to the names cache
lda index; jsl names.render
leave; rtl
}
}
namespace calculateNameLength {
enqueue pc
//------
//eedbf1 lda $cc ;load number of characters in name
//eedbf3 sta $00 ;store as multiplicand
//eedbf5 lda #$000c ;multiplier
//eedbf8 jsr $2ae9 ;a = 12 * $cc
//eedbfb clc
//eedbfc adc #$003a ;add base offset
//eedbff sta $0010d6 ;store cursor X position
//------
seek($eedbf1); jsl main; jmp $dbfb
seek($eedbfc); adc #$0041 //X cursor offset
seek($eedc03); lda #$fffd //Y cursor offset
seek($eeda76); lda #$0050 //X name offset
dequeue pc
//used to place the cursor on the name entry screen dynamically
//$7e9e00 => name
//A <= length of name in pixels
function main {
render.large.width($7e9e00)
rtl
}
}
namespace appendNameEntry {
//called when attempting to add a character on the name entry screen.
//limits maximum name lengths against both the large and small fonts.
enqueue pc
seek($eedb69); jsl main; jmp $db7d
dequeue pc
//$00 => character
//$ca => name index (0-9)
//$cc => name length
//D => $0e80
//------
//eedb69 sep #$20
//eedb6b ldx $cc ;load name length
//eedb6d lda $00 ;load character to append
//eedb6f sta $7e9e00,x ;store character
//eedb73 lda #$ff
//eedb75 sta $7e9e01,x ;store terminal
//eedb79 rep #$20
//eedb7b inc $cc ;increment name length
//------
function main {
variable(16, name) //copy of name + character to append
variable( 2, limit) //8x8 width limit
enter
lda.w #60+1; sta limit //dragon name limit (7.5 tiles) + 1 (shadow)
lda $ca; cmp.w #2; bcs + //test if this is a player name
lda.w #52+1; sta limit; + //player name limit (6.5 tiles) + 1 (shadow)
ldx #$0000; txy; append.string(name, $7e9e00)
lda $00; ora #$ff00; sta name,x
render.large.width(name); cmp.w #66+1; bcs +
render.small.width(name); cmp.l limit; bcs +
ldx $cc
lda $00; ora #$ff00
sta $7e9e00,x
inc $cc
+;leave; rtl
}
}
namespace nameEntry {
enqueue pc
seek($eedaa7); string.hook(draw) //"Finished" text
seek($eedaa1); lda #$0128 //"Finished" position
seek($eed985); dec; sta $1056 //X cursor offset (character map)
seek($eed98f); sbc #$001d //Y cursor offset (character map)
dequeue pc
function draw {
enter
//use this as an anchor point to load "Space" into VRAM now
//the "Space" tilemap data is set in names.characterMap
lda tilemap.address //this will write the tilemap where "Finished" is
jsl spaceIndicator.draw //this will place "Space" into VRAM
sta tilemap.address //but this will overwrite it with "Finished" as desired
ldy.w #strings.bpp4.finished
lda #$0005; ldx #$0030; write.bpp4(lists.strings.bpp4)
leave; rtl
}
}
namespace spaceIndicator {
//the original game parses the tilemap copy in RAM to find non-zero tiles.
//when it finds one, it allows the cursor to be moved to the left of said tile.
//this makes it exceedingly difficult to print a "Space" indicator for said character.
enqueue pc
seek($eed9c5); jsl ignore //lda $7ec400,x
seek($eedb35); jsl transform //lda $7ec400,x
dequeue pc
function draw {
enter
ldy.w #strings.bpp2.space
lda #$0003; ldx #$0030; write.bpp2(lists.strings.bpp2)
leave; rtl
}
//this tricks the game into thinking the tiles immediately after "Space" are blank.
//doing so prevents the cursor from moving on top of the subsequent tiles.
function ignore {
lda tilemap.location,x
cpx #$0492; bcc +
cpx #$0496; bcs +
lda #$2000
+;rtl
}
//this tricks the game into thinking the first tile for "Space" is an actual space.
//it's really our tiledata, but we need the game to insert a space into the name here.
function transform {
lda tilemap.location,x
cpx #$0490; bne +
lda #$20ef
+;rtl
}
}
namespace forceSinglePage {
enqueue pc
//the original game had three pages of characters: hiragana, katakana, and romaji.
//only a single English character page is needed, so force the page to page zero.
//------
//eed892 lda $c0 ;load current selected page
//eed894 beq $d8a3 ;if page# = 0, go to $d8a3
//------
seek($eed894); db $80 //beq -> bra
//this forces the "Finished" option to be the only selectable option
//------
//eed7dc lda $c0 ;load current selected page
//eed7de sta $00 ;store selected page
//eed7e0 lda #$0030 ;length of each option in pixels
//eed7e3 jsr $2a39 ;multiply A by $00
//eed7e6 clc
//eed7e7 adc #$0034 ;base offset
//eed7ea sta $001056 ;store X cursor position
//eed7ee lda #$0014 ;Y cursor position
//eed7f1 sta $001058 ;store Y cursor position
//eed7f5 plp
//eed7f6 rts
//------
seek($eed7dc); {
lda #$0003 //3 => "Finished" menu option
sta $c0 //set current selected page to "Finished"
lda #$00a4 //load cursor X offset
sta $001056 //store value
lda #$0013 //load cursor Y offset
sta $001058 //store value
plp; rts
}
//originally, the "Finished" option would disable the three character pages.
//disable this so that characters can now be selected with "Finished" active.
//------
//eed7c4 lda $c0 ;load current page
//eed7c6 cmp #$0003 ;test if it is the "Finished" option
//eed7c9 beq $d777 ;if so, do not allow the down key to be pressed
//------
seek($eed7c9); nop #2
dequeue pc
}
namespace increaseNameLengthLimits {
enqueue pc
seek($eedb00); lda.w #11 //dragon name length limit (was 8)
seek($eedb0c); lda.w #11 //player name length limit (was 6)
dequeue pc
}
//note that the character map is technically encoded as LZ77 data.
//but so long as we don't insert $1a or $1b pointer codes, we can just write out uncompressed data.
function characterMap {
enqueue pc
seek($eed8a7); dl characterMap
dequeue pc
db $00 //first byte is always skipped by lz77 decompressor
// 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //00
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //01
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //02
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //03
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //04
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //05
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //06
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //07
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //08
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //09
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //0a
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //0b
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$20b9,$2000,$20ba,$2000,$20bb,$2000,$20bc,$2000 //0c
dw $20bd,$2000,$20be,$2000,$20bf,$2000,$20c0,$2000,$20c1,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //0d
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //0e
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //0f
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$20c2,$2000,$20c3,$2000,$20c4,$2000,$20c5,$2000 //10
dw $20c6,$2000,$20c7,$2000,$20c8,$2000,$20c9,$2000,$20ca,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //11
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //12
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //13
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$20cb,$2000,$20cc,$2000,$20cd,$2000,$20ce,$2000 //14
dw $20cf,$2000,$20d0,$2000,$20d1,$2000,$20d2,$2000,$20ae,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //15
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //16
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //17
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2074,$2000,$2075,$2000,$2076,$2000,$2077,$2000 //18
dw $2078,$2000,$2079,$2000,$207a,$2000,$207b,$2000,$207c,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //19
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //1a
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //1b
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$207d,$2000,$207e,$2000,$207f,$2000,$2080,$2000 //1c
dw $2081,$2000,$2082,$2000,$2083,$2000,$2084,$2000,$2085,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //1d
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //1e
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //1f
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2086,$2000,$2087,$2000,$2088,$2000,$2089,$2000 //20
dw $208a,$2000,$208b,$2000,$208c,$2000,$208d,$2000,$208e,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //21
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //22
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //23
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2030,$2031,$2032,$2000,$2000,$2000,$2000,$2000 //24
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //25
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //26
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //27
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //28
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //29
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2a
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2b
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2c
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2d
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2e
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //2f
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //30
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //31
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //32
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //33
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //34
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //35
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //36
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //37
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //38
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //39
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3a
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3b
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3c
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3d
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3e
dw $2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000,$2000 //3f
db $1a,$00,$01 //end of compressed block code
}
codeCursor = pc()
}
|
src/linted-simulator/src/linted-types.adb | mstewartgallus/linted | 0 | 20056 | <reponame>mstewartgallus/linted<gh_stars>0
-- Copyright 2016 <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 Linted.Types is
use type Sim_Angle;
Rotation_Speed : constant Types.Nat := 2048;
Dead_Zone : constant Types.Nat := Types.Nat'Last / 8 + 1;
function Min_Int (X : Types.Int; Y : Types.Int) return Types.Int is
Result : Types.Int;
begin
if X < Y then
Result := X;
else
Result := Y;
end if;
return Result;
end Min_Int;
function Increment return Sim_Angle with
Global => null,
Depends => (Increment'Result => null);
function Increment return Sim_Angle is
begin
return Sim_Angles.To_Angle (1, Rotation_Speed);
end Increment;
function Absolute (X : Types.Int) return Types.Nat is
Inc : Types.Int;
N : Types.Nat;
Result : Types.Nat;
begin
-- Avoid tricky arithmetic overflow possibilities
if X < 0 then
Inc := X + 1;
pragma Assert (Inc > Types.Int'First);
N := Types.Nat (-Inc);
pragma Assert (N <= Types.Nat (-(Types.Int'First + 1)));
Result := N + 1;
pragma Assert (Result <= Types.Nat (-(Types.Int'First + 1)) + 1);
pragma Assert (Result <= Types.Nat (Types.Int'Last) + 1);
else
Result := Types.Nat (X);
pragma Assert (Result <= Types.Nat (Types.Int'Last));
end if;
return Result;
end Absolute;
function Tilt_Rotation
(Rotation : Types.Sim_Angle;
Tilt : Types.Int) return Types.Sim_Angle
is
Result : Types.Sim_Angle;
begin
if Absolute (Tilt) <= Dead_Zone or 0 = Tilt then
Result := Rotation;
elsif Tilt > 0 then
Result := Rotation + Types.Increment;
else
Result := Rotation - Types.Increment;
end if;
return Result;
end Tilt_Rotation;
function Tilt_Clamped_Rotation
(Rotation : Types.Sim_Angle;
Tilt : Types.Int) return Types.Sim_Angle
is
Minimum : constant Types.Sim_Angle := Types.Sim_Angles.To_Angle (3, 16);
Maximum : constant Types.Sim_Angle := Types.Sim_Angles.To_Angle (5, 16);
Ab : Types.Nat := Absolute (Tilt);
Result : Types.Sim_Angle;
begin
if 0 = Tilt or Dead_Zone >= Ab then
Result := Rotation;
elsif Tilt > 0 then
Result :=
Types.Sim_Angles.Add_Clamped
(Minimum,
Maximum,
Rotation,
Types.Increment);
else
Result :=
Types.Sim_Angles.Subtract_Clamped
(Minimum,
Maximum,
Rotation,
Types.Increment);
end if;
return Result;
end Tilt_Clamped_Rotation;
function Find_Sign (X : Types.Int) return Types.Int is
Result : Types.Int;
begin
if X > 0 then
Result := 1;
elsif 0 = X then
Result := 0;
else
Result := -1;
end if;
return Result;
end Find_Sign;
function Saturate (X : Types.Large) return Types.Int is
Result : Types.Int;
begin
if X > Types.Large (Types.Int'Last) then
Result := Types.Int'Last;
elsif X < Types.Large (Types.Int'First) then
Result := Types.Int'First;
else
Result := Types.Int (X);
end if;
return Result;
end Saturate;
function Sim_Isatadd (X : Types.Int; Y : Types.Int) return Types.Int is
begin
return Saturate (Types.Large (X) + Types.Large (Y));
end Sim_Isatadd;
function Downscale (X : Types.Int; Y : Types.Int) return Types.Int is
begin
return Types.Int
((Types.Large (Y) * Types.Large (X)) / Types.Large (Types.Int'Last));
end Downscale;
end Linted.Types;
|
Transynther/x86/_processed/NC/_zr_un_/i3-7100_9_0x84_notsx.log_21829_699.asm | ljhsiun2/medusa | 9 | 7610 | <filename>Transynther/x86/_processed/NC/_zr_un_/i3-7100_9_0x84_notsx.log_21829_699.asm<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0xe19a, %rsi
lea addresses_A_ht+0x1bd3a, %rdi
nop
and %rdx, %rdx
mov $24, %rcx
rep movsw
nop
nop
nop
nop
inc %rbx
lea addresses_normal_ht+0x14c3a, %rsi
lea addresses_UC_ht+0x16aca, %rdi
nop
nop
xor $22898, %rbp
mov $86, %rcx
rep movsb
nop
nop
nop
nop
nop
inc %rdi
lea addresses_WC_ht+0x13cd0, %rdi
nop
nop
nop
add $12624, %r10
movl $0x61626364, (%rdi)
nop
inc %rsi
lea addresses_WT_ht+0x3d7a, %rsi
lea addresses_UC_ht+0xd83a, %rdi
nop
nop
nop
xor $12214, %rbx
mov $96, %rcx
rep movsb
nop
nop
nop
nop
cmp $4630, %rdi
lea addresses_normal_ht+0x1403a, %rsi
lea addresses_WT_ht+0x179a, %rdi
clflush (%rsi)
nop
nop
xor $63817, %rbx
mov $125, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp %rbp, %rbp
lea addresses_normal_ht+0xeca, %rsi
lea addresses_UC_ht+0x1bd12, %rdi
nop
nop
nop
nop
nop
xor $12813, %rax
mov $93, %rcx
rep movsq
nop
and $44468, %rdx
lea addresses_WT_ht+0x1b8ba, %rdx
nop
nop
dec %r10
mov $0x6162636465666768, %rcx
movq %rcx, (%rdx)
nop
nop
sub $45462, %r10
lea addresses_normal_ht+0xb0a2, %rdx
nop
nop
nop
inc %r10
mov (%rdx), %rcx
nop
nop
nop
nop
nop
cmp $55510, %r10
lea addresses_D_ht+0xb03a, %rdx
nop
nop
xor $4394, %rcx
movb (%rdx), %al
nop
nop
nop
nop
sub $59243, %rax
lea addresses_WC_ht+0x16bba, %rcx
clflush (%rcx)
nop
nop
nop
cmp $26238, %rdi
vmovups (%rcx), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %r10
nop
nop
nop
nop
nop
sub $6393, %rcx
lea addresses_A_ht+0x10d72, %r10
clflush (%r10)
nop
nop
nop
nop
and %rdi, %rdi
mov (%r10), %ax
nop
nop
nop
nop
sub %rax, %rax
lea addresses_A_ht+0x283a, %rbx
clflush (%rbx)
nop
nop
nop
nop
cmp $15273, %rbp
movw $0x6162, (%rbx)
nop
nop
xor $37914, %rdi
lea addresses_D_ht+0x25fa, %rsi
lea addresses_WT_ht+0xb23a, %rdi
xor %r10, %r10
mov $119, %rcx
rep movsq
nop
nop
nop
nop
nop
dec %rsi
lea addresses_A_ht+0x1183a, %rsi
lea addresses_normal_ht+0x303a, %rdi
nop
inc %rax
mov $95, %rcx
rep movsw
nop
nop
nop
xor $7722, %rcx
lea addresses_normal_ht+0x1d902, %rax
nop
nop
inc %rbp
movb (%rax), %bl
xor %rbx, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x1c4d6, %r11
nop
nop
nop
nop
nop
sub %rsi, %rsi
movb $0x51, (%r11)
nop
nop
nop
nop
nop
inc %rsi
// REPMOV
lea addresses_WC+0x171da, %rsi
lea addresses_RW+0x1d83a, %rdi
nop
nop
nop
nop
nop
and $17245, %rbx
mov $31, %rcx
rep movsl
nop
nop
nop
cmp $64232, %rbx
// Faulty Load
mov $0x3d0dca000000083a, %r14
nop
nop
nop
add %rbx, %rbx
movups (%r14), %xmm7
vpextrq $0, %xmm7, %rcx
lea oracles, %r10
and $0xff, %rcx
shlq $12, %rcx
mov (%r10,%rcx,1), %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_RW', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': True, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': True, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': True, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': True, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'0a': 1, '1a': 1, '79': 1, 'b0': 16163, '00': 5662, 'd0': 1}
00 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 00 00 00 00 00 b0 b0 b0 b0 00 b0 b0 b0 00 00 b0 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 00 b0 b0 b0 b0 b0 00 00 00 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 00 00 00 00 00 b0 b0 00 00 00 00 00 00 00 00 00 00 b0 00 00 00 00 b0 b0 00 00 00 b0 b0 b0 b0 00 00 00 b0 b0 00 00 b0 b0 b0 b0 00 00 00 b0 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 00 00 b0 b0 b0 00 00 b0 00 b0 b0 b0 b0 00 00 b0 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 00 b0 00 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 00 b0 b0 00 00 00 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 00 00 b0 b0 00 b0 b0 b0 00 b0 b0 00 00 b0 00 b0 b0 b0 00 b0 b0 b0 b0 00 b0 b0 b0 00 00 00 00 00 b0 00 00 b0 b0 00 00 00 00 b0 b0 b0 b0 b0 00 00 00 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 b0 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 00 00 b0 00 00 b0 00 b0 b0 b0 b0 00 b0 00 00 00 b0 00 b0 00 00 00 b0 b0 b0 00 b0 00 b0 00 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 b0 b0 b0 00 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 00 00 b0 b0 b0 b0 b0 b0 00 b0 00 b0 b0 00 00 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 00 00 00 00 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 00 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 00 00 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 00 00 b0 00 b0 b0 b0 b0 00 00 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 b0 00 00 00 b0 b0 b0 b0 b0 00 00 b0 b0 00 b0 b0 b0 b0 b0 00 00 00 00 00 b0 b0 b0 00 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 00 00 00 b0 b0 b0 00 00 00 00 b0 00 00 00 00 b0 00 00 b0 00 00 b0 b0 b0 b0
*/
|
springboot-demos02/springbootdemo194-Antlr4/src/main/resources/Dsl.g4 | zjxkenshine/codedemo | 1 | 1743 | grammar Dsl; //定义规则文件grammar
@header { //一种action,定义生成的词法语法解析文件的头,当使用java的时候,生成的类需要包名,可以在这里统一定义
package com.kenshine.antlr4.demo;
}
//parsers
sta:(sql ender)*; //定义sta规则,里面包含了*(0个以上)个 sql ender组合规则
ender:';'; //定义ender规则,是一个分号
sql //定义sql规则,sql规则有两条分支:select/load
: SELECT ~(';')* as tableName //select语法规则,以lexer SELECT开头, 以as tableName 结尾,其中as 和tableName分别是两个parser
| LOAD format '.' path as tableName //load语法规则,大致就是 load json.'path' as table1,load语法里面含有format,path, as,tableName四种规则
; //sql规则结束符
as: AS; //定义as规则,其内容指向AS这个lexer
tableName: identifier; //tableName 规则,指向identifier规则
format: identifier; //format规则,也指向identifier规则
path: quotedIdentifier; //path,指向quotedIdentifier
identifier: IDENTIFIER | quotedIdentifier; //identifier,指向lexer IDENTIFIER 或者parser quotedIdentifier
quotedIdentifier: BACKQUOTED_IDENTIFIER; //quotedIdentifier,指向lexer BACKQUOTED_IDENTIFIER
//lexers antlr将某个句子进行分词的时候,分词单元就是如下的lexer
//keywords 定义一些关键字的lexer,忽略大小写
AS: [Aa][Ss];
LOAD: [Ll][Oo][Aa][Dd];
SELECT: [Ss][Ee][Ll][Ee][Cc][Tt];
//base 定义一些基础的lexer,
fragment DIGIT:[0-9]; //匹配数字
fragment LETTER:[a-zA-Z]; //匹配字母
STRING //匹配带引号的文本
: '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
| '"' ( ~('"'|'\\') | ('\\' .) )* '"'
;
IDENTIFIER //匹配只含有数字字母和下划线的文本
: (LETTER | DIGIT | '_')+
;
BACKQUOTED_IDENTIFIER //匹配被``包裹的文本
: '`' ( ~'`' | '``' )* '`'
;
//--hiden 定义需要隐藏的文本,指向channel(HIDDEN)就会隐藏。这里的channel可以自定义,到时在后台获取不同的channel的数据进行不同的处理
SIMPLE_COMMENT: '--' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN); //忽略行注释
BRACKETED_EMPTY_COMMENT: '/**/' -> channel(HIDDEN); //忽略多行注释
BRACKETED_COMMENT : '/*' ~[+] .*? '*/' -> channel(HIDDEN) ; //忽略多行注释
WS: [ \r\n\t]+ -> channel(HIDDEN); //忽略空白符
// 匹配其他的不能使用上面的lexer进行分词的文本
UNRECOGNIZED: .; |
IEAATParser/src/main/antlr4/nl/utwente/fmt/ieaatparser/antlr/GetPaths.g4 | SwiftPengu/ProbabilisticVulnerabilityAnalysis | 0 | 7376 | grammar GetPaths;
paths :
(
attackStepList
|
'(' attackStepList ')'
|
TARGET putInSet
) DASH 'visited' EOF
;
attackStepList:
attackStepReference union*;
attackStepReference:
reference castToAttackStep putInSet;
reference:
'self'? '.' ID;
union: '->' 'union' '(' attackStepReference ')';
castToAttackStep:
'.' 'oclAsType' '(' 'AttackStep' ')';
putInSet:
'->' 'asSet' '(' ')';
//Named tokens
//Only define those which are required to be referenced from the AST
TARGET: 'target';
DASH: '-';
AND : 'and';
OR : 'or';
NOT : 'not';
TRUE : 'true';
FALSE : 'false';
CHAR: 'a'..'z' | 'A'..'Z';
NUMBER: DIGIT+;
DIGIT: [0-9];
ID : CHAR (CHAR | NUMBER | '_')* ;
WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
COMMENT : DASH DASH ~[\r\n]* -> skip;
|
Cubical/HITs/S2.agda | thomas-lamiaux/cubical | 1 | 15383 | {-# OPTIONS --safe #-}
module Cubical.HITs.S2 where
open import Cubical.HITs.S2.Base public
open import Cubical.HITs.S2.Properties public
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1469.asm | ljhsiun2/medusa | 9 | 3475 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0xec36, %r8
nop
add %rdx, %rdx
movb $0x61, (%r8)
nop
dec %rbx
lea addresses_UC_ht+0x1e534, %r13
nop
add %rbx, %rbx
movl $0x61626364, (%r13)
nop
nop
nop
nop
xor %r8, %r8
lea addresses_normal_ht+0x14436, %rsi
lea addresses_A_ht+0x16f86, %rdi
nop
nop
sub %rbx, %rbx
mov $45, %rcx
rep movsb
nop
nop
xor %r8, %r8
lea addresses_UC_ht+0x10e36, %r8
nop
nop
nop
xor %r13, %r13
mov (%r8), %rcx
cmp $50539, %r8
lea addresses_D_ht+0x42f6, %r8
nop
nop
nop
nop
xor %rcx, %rcx
movl $0x61626364, (%r8)
nop
nop
nop
add %r8, %r8
lea addresses_UC_ht+0x12c0e, %r8
nop
nop
nop
xor %rcx, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, (%r8)
nop
nop
nop
nop
nop
inc %r12
lea addresses_D_ht+0x12246, %rsi
lea addresses_WT_ht+0x1cf36, %rdi
inc %r8
mov $44, %rcx
rep movsq
nop
nop
nop
xor $40042, %rcx
lea addresses_A_ht+0x6ea, %rdx
clflush (%rdx)
nop
nop
nop
and %rdi, %rdi
vmovups (%rdx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rcx
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_WT_ht+0x1004a, %r12
nop
nop
nop
mfence
and $0xffffffffffffffc0, %r12
vmovntdqa (%r12), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %rsi
and $17771, %rbx
lea addresses_UC_ht+0xee2c, %rsi
lea addresses_UC_ht+0x6bce, %rdi
clflush (%rsi)
nop
and %r8, %r8
mov $19, %rcx
rep movsb
nop
and %r13, %r13
lea addresses_D_ht+0x787e, %rsi
lea addresses_D_ht+0x17ca5, %rdi
nop
nop
nop
nop
nop
add %r13, %r13
mov $56, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $33739, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %rbx
push %rdx
push %rsi
// Faulty Load
mov $0x66c4750000000436, %rsi
nop
nop
nop
nop
sub %rbx, %rbx
movaps (%rsi), %xmm3
vpextrq $1, %xmm3, %r12
lea oracles, %rsi
and $0xff, %r12
shlq $12, %r12
mov (%rsi,%r12,1), %r12
pop %rsi
pop %rdx
pop %rbx
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}, 'dst': {'same': True, 'congruent': 4, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}}
{'46': 17091, '49': 1130, '45': 3574, '44': 22, '00': 12}
46 46 46 46 46 46 46 46 45 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 45 45 45 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 46 46 45 45 45 45 45 46 46 46 49 46 46 49 46 46 46 46 46 46 45 45 45 46 46 46 46 46 46 45 45 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 49 46 46 46 46 46 49 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 45 45 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 45 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 45 45 46 46 46 46 46 46 46 46 46 46 46 46 46 49 45 45 45 45 46 46 46 46 49 46 46 46 46 46 46 46 46 45 45 00 46 46 49 46 46 46 46 46 46 49 45 45 45 45 45 45 45 45 45 45 46 46 46 46 46 46 46 46 46 46 46 49 45 45 45 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 46 46 49 46 46 46 46 46 46 46 46 46 45 45 45 45 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 49 46 46 46 46 46 46 49 45 45 46 46 46 46 49 46 46 45 45 45 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 49 46 46 46 46 46 46 45 45 45 45 45 45 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 49 45 45 45 45 45 46 46 46 46 46 46 49 45 45 45 45 45 45 45 46 46 46 46 46 46 46 46 46 46 46 46 45 45 45 45 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 44 46 46 46 46 46 46 46 46 46 46 46 46 46 46 45 45 45 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 46 46 49 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 45 45 46 46 46 46 46 46 45 45 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 45 45 45 45 45 46 46 46 46 46 46 46 49 45 45 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 45 45 45 45 45 45 45 45 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 45 45 45 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 45 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46
*/
|
oeis/057/A057300.asm | neoneye/loda-programs | 11 | 11980 | <reponame>neoneye/loda-programs
; A057300: Binary counter with odd/even bit positions swapped; base-4 counter with 1's replaced by 2's and vice versa.
; Submitted by <NAME>(s1.)
; 0,2,1,3,8,10,9,11,4,6,5,7,12,14,13,15,32,34,33,35,40,42,41,43,36,38,37,39,44,46,45,47,16,18,17,19,24,26,25,27,20,22,21,23,28,30,29,31,48,50,49,51,56,58,57,59,52,54,53,55,60,62,61,63,128,130,129,131,136,138,137,139,132,134,133,135,140,142,141,143,160,162,161,163,168,170,169,171,164,166,165,167,172,174,173,175,144,146,145,147
mov $1,$0
mov $2,3
lpb $0
mov $3,$0
div $0,4
mod $3,2
mul $3,$2
add $1,$3
mul $2,4
lpe
mov $0,$1
div $0,2
|
test/interaction/Issue2578.agda | cruhland/agda | 1,989 | 770 | <filename>test/interaction/Issue2578.agda
-- <NAME>, 2017-05-13, issue #2578 reported by nad
-- Jesper, 2017-07-06, absurd clauses are no longer highlighted as catchall,
-- so the test case had to be changed to reproduce the intended behaviour.
data _⊎_ (A B : Set) : Set where
inj₁ : A → A ⊎ B
inj₂ : B → A ⊎ B
record ⊤ : Set where
constructor tt
data ⊥ : Set where
Maybe : Set → Set
Maybe A = ⊤ ⊎ A
pattern nothing = inj₁ tt
pattern just x = inj₂ x
Bool : Set
Bool = ⊤ ⊎ ⊤
pattern true = inj₁ tt
pattern false = inj₂ tt
x : Maybe ⊥
x = nothing
_∋_ : ∀ {ℓ} → (A : Set ℓ) (a : A) → A
A ∋ a = a
A : Set₁
A with Bool ∋ false
A | true = Set
A | false with x | x
... | nothing | nothing = Set
... | just x | _ = {!!}
... | _ | just y = {!!}
|
oeis/090/A090965.asm | neoneye/loda-programs | 11 | 80558 | <gh_stars>10-100
; A090965: a(n) = 8*a(n-1) - 4*a(n-2), where a(0) = 1, a(1) = 4.
; 1,4,28,208,1552,11584,86464,645376,4817152,35955712,268377088,2003193856,14952042496,111603564544,833020346368,6217748512768,46409906716672,346408259682304,2585626450591744,19299378566004736,144052522725670912,1075222667541348352,8025571249428103168,59903679325259431936,447127149604363042816,3337402479533866614784,24910711237853480747008,185936079984692379516928,1387845794926125113147392,10359022039470231387111424,77320793136057350644301824,577130256930577879605968896
mov $1,1
lpb $0
sub $0,1
add $2,$1
mul $1,2
mul $2,2
add $1,$2
add $2,$1
lpe
mov $0,$1
|
source/image/required/s-valboo.adb | ytomino/drake | 33 | 6191 | with System.Val_Enum;
with System.Value_Errors;
package body System.Val_Bool is
function Value_Boolean (Str : String) return Boolean is
First : Positive;
Last : Natural;
begin
Val_Enum.Trim (Str, First, Last);
if First <= Last then
declare
S : String := Str (First .. Last);
begin
Val_Enum.To_Upper (S);
if S'Length = 5
and then S (S'First .. S'First + 3) = "FALS"
and then S (S'First + 4) = 'E'
then
return False;
elsif S'Length = 4
and then S (S'First .. S'First + 3) = "TRUE"
then
return True;
end if;
end;
end if;
Value_Errors.Raise_Discrete_Value_Failure ("Boolean", Str);
declare
Uninitialized : Boolean;
pragma Unmodified (Uninitialized);
begin
return Uninitialized;
end;
end Value_Boolean;
end System.Val_Bool;
|
src/compiler.ads | GLADORG/template-compiler | 0 | 2682 | <filename>src/compiler.ads
with GNATCOLL.Strings_Impl, Ada.Wide_Wide_Characters.Handling, Ada.Characters,Ada.Containers.Doubly_Linked_Lists;
use Ada.Wide_Wide_Characters.Handling;
package Compiler is
package aString is new GNATCOLL.Strings_Impl.Strings
(SSize => GNATCOLL.Strings_Impl.Optimal_String_Size,
Character_Type => Wide_Wide_Character,
Character_String => Wide_Wide_String);
use Compiler.aString;
type Token is
(Keyword_Comment, Keyword_Complex_Comment_Start,
Keyword_Simple_Comment_Start, Keyword_Complex_Comment_End, Keyword_Web,
Keyword_Block_Start, Keyword_Block_Close, Keyword_Component,
Keyword_Identifier_Opening, Keyword_Identifier_Closing, Attribute_Symbol,
Blockparam_Symbol, Parantesis_Open_Symbol, Parantesis_Close_Symbol,
Assignment_Symbol, Quotation_Symbol, Keyword_Tag_Start, Keyword_Tag_End,
Keyword_Tag_Close, Keyword_Tag_Closing_End,Identifier, Token_Integer,
Token_String, End_of_input, No_Token,
Empty_Char_Error, Invalid_Escape_Error, Multi_Char_Error,
EOF_Comment_Error, EOF_String_Error, EOL_String_Error, Invalid_Char_Error,
Invalid_Num_Error);
subtype Keyword is Token range Keyword_Comment .. Keyword_Tag_Close;
subtype Error is Token range Empty_Char_Error .. Invalid_Num_Error;
type Node is record
TheToken : Token := No_Token;
TheName : XString := To_XString ("");
TheValue : XString := To_XString ("");
Closing : Boolean := false;
Block : Boolean := false;
BlockClosing : Boolean := false;
Component : Boolean := false;
end record;
package Node_List is new Ada.Containers.Doubly_Linked_Lists
(Element_Type => Node);
private
end Compiler; |
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sccz80/mul2.asm | Frodevan/z88dk | 640 | 86180 |
SECTION code_fp_math32
PUBLIC mul2
EXTERN m32_fsmul2_fastcall
defc mul2 = m32_fsmul2_fastcall
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _mul2
EXTERN cm32_sdcc_fsmul2
defc _mul2 = cm32_sdcc_fsmul2
ENDIF
|
tools-src/gnu/gcc/gcc/ada/frontend.adb | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 17380 | <reponame>enfoTek/tomato.linksys.e2000.nvram-mod<filename>tools-src/gnu/gcc/gcc/ada/frontend.adb
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- F R O N T E N D --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Checks;
with CStand;
with Debug; use Debug;
with Elists;
with Exp_Ch11;
with Exp_Dbug;
with Fmap;
with Fname.UF;
with Hostparm; use Hostparm;
with Inline; use Inline;
with Lib; use Lib;
with Lib.Load; use Lib.Load;
with Live; use Live;
with Namet; use Namet;
with Nlists; use Nlists;
with Opt; use Opt;
with Osint;
with Output; use Output;
with Par;
with Rtsfind;
with Sprint;
with Scn; use Scn;
with Sem; use Sem;
with Sem_Ch8; use Sem_Ch8;
with Sem_Elab; use Sem_Elab;
with Sem_Prag; use Sem_Prag;
with Sem_Warn; use Sem_Warn;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
with Sinput.L; use Sinput.L;
with Types; use Types;
procedure Frontend is
Pragmas : List_Id;
Prag : Node_Id;
Save_Style_Check : constant Boolean := Opt.Style_Check;
-- Save style check mode so it can be restored later
begin
-- Carry out package initializations. These are initializations which
-- might logically be performed at elaboration time, were it not for
-- the fact that we may be doing things more than once in the big loop
-- over files. Like elaboration, the order in which these calls are
-- made is in some cases important. For example, Lib cannot be
-- initialized until Namet, since it uses names table entries.
Rtsfind.Initialize;
Atree.Initialize;
Nlists.Initialize;
Elists.Initialize;
Lib.Load.Initialize;
Sem_Ch8.Initialize;
Fname.UF.Initialize;
Exp_Ch11.Initialize;
Checks.Initialize;
-- Create package Standard
CStand.Create_Standard;
-- Read and process gnat.adc file if one is present
if Opt.Config_File then
-- We always analyze the gnat.adc file with style checks off,
-- since we don't want a miscellaneous gnat.adc that is around
-- to discombobulate intended -gnatg compilations.
Opt.Style_Check := False;
-- Capture current suppress options, which may get modified
Scope_Suppress := Opt.Suppress_Options;
Name_Buffer (1 .. 8) := "gnat.adc";
Name_Len := 8;
Source_gnat_adc := Load_Config_File (Name_Enter);
if Source_gnat_adc /= No_Source_File then
Initialize_Scanner (No_Unit, Source_gnat_adc);
Pragmas := Par (Configuration_Pragmas => True);
if Pragmas /= Error_List
and then Operating_Mode /= Check_Syntax
then
Prag := First (Pragmas);
while Present (Prag) loop
Analyze_Pragma (Prag);
Next (Prag);
end loop;
end if;
end if;
-- Restore style check, but if gnat.adc turned on checks, leave on!
Opt.Style_Check := Save_Style_Check or Style_Check;
-- Capture any modifications to suppress options from config pragmas
Opt.Suppress_Options := Scope_Suppress;
end if;
-- Read and process the configuration pragmas file if one is present
if Config_File_Name /= null then
declare
New_Pragmas : List_Id;
Style_Check_Saved : constant Boolean := Opt.Style_Check;
Source_Config_File : Source_File_Index := No_Source_File;
begin
-- We always analyze the config pragmas file with style checks off,
-- since we don't want it to discombobulate intended
-- -gnatg compilations.
Opt.Style_Check := False;
-- Capture current suppress options, which may get modified
Scope_Suppress := Opt.Suppress_Options;
Name_Buffer (1 .. Config_File_Name'Length) := Config_File_Name.all;
Name_Len := Config_File_Name'Length;
Source_Config_File := Load_Config_File (Name_Enter);
if Source_Config_File = No_Source_File then
Osint.Fail
("cannot find configuration pragmas file ",
Config_File_Name.all);
end if;
Initialize_Scanner (No_Unit, Source_Config_File);
New_Pragmas := Par (Configuration_Pragmas => True);
if New_Pragmas /= Error_List
and then Operating_Mode /= Check_Syntax
then
Prag := First (New_Pragmas);
while Present (Prag) loop
Analyze_Pragma (Prag);
Next (Prag);
end loop;
end if;
-- Restore style check, but if the config pragmas file
-- turned on checks, leave on!
Opt.Style_Check := Style_Check_Saved or Style_Check;
-- Capture any modifications to suppress options from config pragmas
Opt.Suppress_Options := Scope_Suppress;
end;
end if;
-- If there was a -gnatem switch, initialize the mappings of unit names to
-- file names and of file names to path names from the mapping file.
if Mapping_File_Name /= null then
Fmap.Initialize (Mapping_File_Name.all);
end if;
-- We have now processed the command line switches, and the gnat.adc
-- file, so this is the point at which we want to capture the values
-- of the configuration switches (see Opt for further details).
Opt.Register_Opt_Config_Switches;
-- Initialize the scanner. Note that we do this after the call to
-- Create_Standard, which uses the scanner in its processing of
-- floating-point bounds.
Initialize_Scanner (Main_Unit, Source_Index (Main_Unit));
-- Output header if in verbose mode or full list mode
if Verbose_Mode or Full_List then
Write_Eol;
if Operating_Mode = Generate_Code then
Write_Str ("Compiling: ");
else
Write_Str ("Checking: ");
end if;
Write_Name (Full_File_Name (Current_Source_File));
if not Debug_Flag_7 then
Write_Str (" (source file time stamp: ");
Write_Time_Stamp (Current_Source_File);
Write_Char (')');
end if;
Write_Eol;
end if;
-- Here we call the parser to parse the compilation unit (or units in
-- the check syntax mode, but in that case we won't go on to the
-- semantics in any case).
declare
Discard : List_Id;
begin
Discard := Par (Configuration_Pragmas => False);
end;
-- The main unit is now loaded, and subunits of it can be loaded,
-- without reporting spurious loading circularities.
Set_Loading (Main_Unit, False);
-- Now on to the semantics. We skip the semantics if we are in syntax
-- only mode, or if we encountered a fatal error during the parsing.
if Operating_Mode /= Check_Syntax
and then not Fatal_Error (Main_Unit)
then
-- Reset Operating_Mode to Check_Semantics for subunits. We cannot
-- actually generate code for subunits, so we suppress expansion.
-- This also corrects certain problems that occur if we try to
-- incorporate subunits at a lower level.
if Operating_Mode = Generate_Code
and then Nkind (Unit (Cunit (Main_Unit))) = N_Subunit
then
Operating_Mode := Check_Semantics;
end if;
-- Analyze (and possibly expand) main unit
Scope_Suppress := Suppress_Options;
Semantics (Cunit (Main_Unit));
-- Cleanup processing after completing main analysis
if Operating_Mode = Generate_Code
or else (Operating_Mode = Check_Semantics
and then Tree_Output)
then
Instantiate_Bodies;
end if;
if Operating_Mode = Generate_Code then
if Inline_Processing_Required then
Analyze_Inlined_Bodies;
end if;
-- Remove entities from program that do not have any
-- execution time references.
if Debug_Flag_UU then
Collect_Garbage_Entities;
end if;
Check_Elab_Calls;
-- Build unit exception table. We leave this up to the end to
-- make sure that all the necessary information is at hand.
Exp_Ch11.Generate_Unit_Exception_Table;
-- Save the unit name and list of packages named in Use_Package
-- clauses for subsequent use in generating a special symbol for
-- the debugger for certain targets that require this.
Exp_Dbug.Save_Unitname_And_Use_List
(Cunit (Main_Unit), Nkind (Unit (Cunit (Main_Unit))));
end if;
-- List library units if requested
if List_Units then
Lib.List;
end if;
-- Output any messages for unreferenced entities
Output_Unreferenced_Messages;
Sem_Warn.Check_Unused_Withs;
end if;
-- Qualify all entity names in inner packages, package bodies, etc.,
-- except when compiling for the JVM back end, which depends on
-- having unqualified names in certain cases and handles the generation
-- of qualified names when needed.
if not Java_VM then
Exp_Dbug.Qualify_All_Entity_Names;
Exp_Dbug.Generate_Auxiliary_Types;
end if;
-- Dump the source now. Note that we do this as soon as the analysis
-- of the tree is complete, because it is not just a dump in the case
-- of -gnatD, where it rewrites all source locations in the tree.
Sprint.Source_Dump;
end Frontend;
|
oeis/018/A018909.asm | neoneye/loda-programs | 11 | 168871 | ; A018909: Define the sequence S(a_0,a_1) by a_{n+2} is the least integer such that a_{n+2}/a_{n+1}>a_{n+1}/a_n for n >= 0. This is S(3,6).
; Submitted by <NAME>(s1)
; 3,6,13,29,65,146,328,737,1657,3726,8379,18843,42375,95295,214305,481942,1083821,2437364,5481296,12326680,27721007,62340730,140195723,315280889,709023335,1594495915,3585801902,8063975053,18134770251,40782602860,91714461944,206253204548,463835075567,1043101258949,2345791195483,5275361606169,11863562336422,26679519209752,59998567468918,134928522137929,303435679456131,682385088846399,1534590165251905,3451082114453939,7761008789437168,17453440814244903,39250386711447232,88268718666681135
mov $4,2
lpb $4
sub $4,1
add $0,$4
sub $0,1
mov $1,3
mov $2,4
mov $3,-2
lpb $0
sub $0,1
add $3,$2
div $3,$2
mov $2,$1
mul $1,2
add $1,$3
mul $3,$1
lpe
div $4,2
lpe
mov $0,$1
|
F1.agda | JacquesCarette/pi-dual | 14 | 13670 | {-# OPTIONS --without-K #-}
module F1 where
open import Data.Unit
open import Data.Sum hiding (map)
open import Data.Product hiding (map)
open import Data.List
open import Data.Nat
open import Data.Bool
{--
infixr 90 _⊗_
infixr 80 _⊕_
infixr 60 _∘_
infix 30 _⟷_
--}
---------------------------------------------------------------------------
-- Paths
-- Path relation should be an equivalence
data Path (A : Set) : Set where
_↝_ : (a : A) → (b : A) → Path A
id↝ : {A : Set} → (a : A) → Path A
id↝ a = a ↝ a
ap : {A B : Set} → (f : A → B) → Path A → Path B
ap f (a ↝ a') = f a ↝ f a'
pathProd : {A B : Set} → Path A → Path B → Path (A × B)
pathProd (a ↝ a') (b ↝ b') = (a , b) ↝ (a' , b')
pathProdL : {A B : Set} → List (Path A) → List (Path B) → List (Path (A × B))
pathProdL pas pbs = concatMap (λ pa → map (pathProd pa) pbs) pas
-- pi types with exactly one level of reciprocals
data B0 : Set where
ONE : B0
PLUS0 : B0 → B0 → B0
TIMES0 : B0 → B0 → B0
data B1 : Set where
LIFT0 : B0 → B1
PLUS1 : B1 → B1 → B1
TIMES1 : B1 → B1 → B1
RECIP1 : B0 → B1
-- interpretation of B0 as discrete groupoids
record 0-type : Set₁ where
constructor G₀
field
∣_∣₀ : Set
open 0-type public
plus : 0-type → 0-type → 0-type
plus t₁ t₂ = G₀ (∣ t₁ ∣₀ ⊎ ∣ t₂ ∣₀)
times : 0-type → 0-type → 0-type
times t₁ t₂ = G₀ (∣ t₁ ∣₀ × ∣ t₂ ∣₀)
⟦_⟧₀ : B0 → 0-type
⟦ ONE ⟧₀ = G₀ ⊤
⟦ PLUS0 b₁ b₂ ⟧₀ = plus ⟦ b₁ ⟧₀ ⟦ b₂ ⟧₀
⟦ TIMES0 b₁ b₂ ⟧₀ = times ⟦ b₁ ⟧₀ ⟦ b₂ ⟧₀
elems0 : (b : B0) → List ∣ ⟦ b ⟧₀ ∣₀
elems0 ONE = [ tt ]
elems0 (PLUS0 b b') = map inj₁ (elems0 b) ++ map inj₂ (elems0 b')
elems0 (TIMES0 b b') =
concatMap (λ a → map (λ b → (a , b)) (elems0 b')) (elems0 b)
-- interpretation of B1 types as 2-types
record 2-type : Set₁ where
constructor G₂
field
∣_∣₁ : Set
1-paths : List (Path ∣_∣₁)
2-paths : List (Path (Path ∣_∣₁))
open 2-type public
_⊎↝_ : {A B : Set} → List (Path A) → List (Path B) → List (Path (A ⊎ B))
p₁ ⊎↝ p₂ = map (ap inj₁) p₁ ++ map (ap inj₂) p₂
⟦_⟧₁ : B1 → 2-type
⟦ LIFT0 b0 ⟧₁ = G₂ ∣ ⟦ b0 ⟧₀ ∣₀ (map id↝ (elems0 b0)) []
⟦ PLUS1 b₁ b₂ ⟧₁ with ⟦ b₁ ⟧₁ | ⟦ b₂ ⟧₁
... | G₂ 0p₁ 1p₁ 2p₁ | G₂ 0p₂ 1p₂ 2p₂ = G₂ (0p₁ ⊎ 0p₂) (1p₁ ⊎↝ 1p₂) []
⟦ TIMES1 b₁ b₂ ⟧₁ = G₂ {!!} {!!} []
⟦ RECIP1 b0 ⟧₁ = G₂ ⊤ (map (λ _ → tt ↝ tt) (elems0 b0)) []
test10 = ⟦ LIFT0 ONE ⟧₁
test11 = ⟦ LIFT0 (PLUS0 ONE ONE) ⟧₁
test12 = ⟦ RECIP1 (PLUS0 ONE ONE) ⟧₁
{--
-- isos
data _⟷_ : B → B → Set where
-- +
swap₊ : { b₁ b₂ : B } → PLUS b₁ b₂ ⟷ PLUS b₂ b₁
assocl₊ : { b₁ b₂ b₃ : B } → PLUS b₁ (PLUS b₂ b₃) ⟷ PLUS (PLUS b₁ b₂) b₃
assocr₊ : { b₁ b₂ b₃ : B } → PLUS (PLUS b₁ b₂) b₃ ⟷ PLUS b₁ (PLUS b₂ b₃)
-- *
unite⋆ : { b : B } → TIMES ONE b ⟷ b
uniti⋆ : { b : B } → b ⟷ TIMES ONE b
swap⋆ : { b₁ b₂ : B } → TIMES b₁ b₂ ⟷ TIMES b₂ b₁
assocl⋆ : { b₁ b₂ b₃ : B } → TIMES b₁ (TIMES b₂ b₃) ⟷ TIMES (TIMES b₁ b₂) b₃
assocr⋆ : { b₁ b₂ b₃ : B } → TIMES (TIMES b₁ b₂) b₃ ⟷ TIMES b₁ (TIMES b₂ b₃)
-- * distributes over +
dist : { b₁ b₂ b₃ : B } →
TIMES (PLUS b₁ b₂) b₃ ⟷ PLUS (TIMES b₁ b₃) (TIMES b₂ b₃)
factor : { b₁ b₂ b₃ : B } →
PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) ⟷ TIMES (PLUS b₁ b₂) b₃
-- congruence
id⟷ : { b : B } → b ⟷ b
sym : { b₁ b₂ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₁)
_∘_ : { b₁ b₂ b₃ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₃) → (b₁ ⟷ b₃)
_⊕_ : { b₁ b₂ b₃ b₄ : B } →
(b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (PLUS b₁ b₂ ⟷ PLUS b₃ b₄)
_⊗_ : { b₁ b₂ b₃ b₄ : B } →
(b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (TIMES b₁ b₂ ⟷ TIMES b₃ b₄)
-- interpret isos as functors
record 0-functor (A B : 0-type) : Set where
constructor F₀
field
fobj : ∣ A ∣ → ∣ B ∣
fmor : {a b : ∣ A ∣} → (a ≡ b) → (fobj a ≡ fobj b)
fmor {a} {.a} (refl .a) = refl (fobj a)
open 0-functor public
swap⊎ : {A B : Set} → A ⊎ B → B ⊎ A
swap⊎ (inj₁ a) = inj₂ a
swap⊎ (inj₂ b) = inj₁ b
eval : {b₁ b₂ : B} → (b₁ ⟷ b₂) → 0-functor ⟦ b₁ ⟧ ⟦ b₂ ⟧
eval swap₊ = F₀ swap⊎
eval assocl₊ = ? -- : { b₁ b₂ b₃ : B } → PLUS b₁ (PLUS b₂ b₃) ⟷ PLUS (PLUS b₁ b₂) b₃
eval assocr₊ = ? -- : { b₁ b₂ b₃ : B } → PLUS (PLUS b₁ b₂) b₃ ⟷ PLUS b₁ (PLUS b₂ b₃)
eval unite⋆ = ? -- : { b : B } → TIMES ONE b ⟷ b
eval uniti⋆ = ? -- : { b : B } → b ⟷ TIMES ONE b
eval swap⋆ = ? -- : { b₁ b₂ : B } → TIMES b₁ b₂ ⟷ TIMES b₂ b₁
eval assocl⋆ = ? -- : { b₁ b₂ b₃ : B } → TIMES b₁ (TIMES b₂ b₃) ⟷ TIMES (TIMES b₁ b₂) b₃
eval assocr⋆ = ? -- : { b₁ b₂ b₃ : B } → TIMES (TIMES b₁ b₂) b₃ ⟷ TIMES b₁ (TIMES b₂ b₃)
eval dist = ? -- : { b₁ b₂ b₃ : B } → TIMES (PLUS b₁ b₂) b₃ ⟷ PLUS (TIMES b₁ b₃) (TIMES b₂ b₃)
eval factor = ? -- : { b₁ b₂ b₃ : B } → PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) ⟷ TIMES (PLUS b₁ b₂) b₃
eval id⟷ = ? -- : { b : B } → b ⟷ b
eval (sym c) = ? -- : { b₁ b₂ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₁)
eval (c₁ ∘ c₂) = ? -- : { b₁ b₂ b₃ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₃) → (b₁ ⟷ b₃)
eval (c₁ ⊕ c₂) = ? -- : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (PLUS b₁ b₂ ⟷ PLUS b₃ b₄)
eval (c₁ ⊗ c₂) = ? -- : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (TIMES b₁ b₂ ⟷ TIMES b₃ b₄)
---------------------------------------------------------------------------
--}
|
target/cos_117/disasm/iop_overlay1/COMM11.asm | jrrk2/cray-sim | 49 | 8324 | 0x0000 (0x000000) 0x2104- f:00020 d: 260 | A = OR[260]
0x0001 (0x000002) 0x290D- f:00024 d: 269 | OR[269] = A
0x0002 (0x000004) 0x2104- f:00020 d: 260 | A = OR[260]
0x0003 (0x000006) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0004 (0x000008) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x0006 (0x00000C) 0x2904- f:00024 d: 260 | OR[260] = A
0x0007 (0x00000E) 0x2104- f:00020 d: 260 | A = OR[260]
0x0008 (0x000010) 0x291E- f:00024 d: 286 | OR[286] = A
0x0009 (0x000012) 0x1014- f:00010 d: 20 | A = 20 (0x0014)
0x000A (0x000014) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260]
0x000B (0x000016) 0x2104- f:00020 d: 260 | A = OR[260]
0x000C (0x000018) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x000D (0x00001A) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x000E (0x00001C) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x000F (0x00001E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0010 (0x000020) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0011 (0x000022) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x0012 (0x000024) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0013 (0x000026) 0x292D- f:00024 d: 301 | OR[301] = A
0x0014 (0x000028) 0x1800-0x012A f:00014 d: 0 | A = 298 (0x012A)
0x0016 (0x00002C) 0x292E- f:00024 d: 302 | OR[302] = A
0x0017 (0x00002E) 0x2119- f:00020 d: 281 | A = OR[281]
0x0018 (0x000030) 0x292F- f:00024 d: 303 | OR[303] = A
0x0019 (0x000032) 0x211C- f:00020 d: 284 | A = OR[284]
0x001A (0x000034) 0x2930- f:00024 d: 304 | OR[304] = A
0x001B (0x000036) 0x211D- f:00020 d: 285 | A = OR[285]
0x001C (0x000038) 0x2931- f:00024 d: 305 | OR[305] = A
0x001D (0x00003A) 0x1800-0x0138 f:00014 d: 0 | A = 312 (0x0138)
0x001F (0x00003E) 0x2932- f:00024 d: 306 | OR[306] = A
0x0020 (0x000040) 0x211E- f:00020 d: 286 | A = OR[286]
0x0021 (0x000042) 0x2933- f:00024 d: 307 | OR[307] = A
0x0022 (0x000044) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0023 (0x000046) 0x2934- f:00024 d: 308 | OR[308] = A
0x0024 (0x000048) 0x1011- f:00010 d: 17 | A = 17 (0x0011)
0x0025 (0x00004A) 0x2935- f:00024 d: 309 | OR[309] = A
0x0026 (0x00004C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0027 (0x00004E) 0x5800- f:00054 d: 0 | B = A
0x0028 (0x000050) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x002A (0x000054) 0x7C09- f:00076 d: 9 | R = OR[9]
0x002B (0x000056) 0x8602- f:00103 d: 2 | P = P + 2 (0x002D), A # 0
0x002C (0x000058) 0x7010- f:00070 d: 16 | P = P + 16 (0x003C)
0x002D (0x00005A) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x002E (0x00005C) 0x3104- f:00030 d: 260 | A = (OR[260])
0x002F (0x00005E) 0x2904- f:00024 d: 260 | OR[260] = A
0x0030 (0x000060) 0x2104- f:00020 d: 260 | A = OR[260]
0x0031 (0x000062) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x0032 (0x000064) 0x8007- f:00100 d: 7 | P = P + 7 (0x0039), C = 0
0x0033 (0x000066) 0x2104- f:00020 d: 260 | A = OR[260]
0x0034 (0x000068) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0035 (0x00006A) 0x8003- f:00100 d: 3 | P = P + 3 (0x0038), C = 0
0x0036 (0x00006C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0038), A = 0
0x0037 (0x00006E) 0x7002- f:00070 d: 2 | P = P + 2 (0x0039)
0x0038 (0x000070) 0x7003- f:00070 d: 3 | P = P + 3 (0x003B)
0x0039 (0x000072) 0x7C34- f:00076 d: 52 | R = OR[52]
0x003A (0x000074) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x003B (0x000076) 0x719B- f:00070 d: 411 | P = P + 411 (0x01D6)
0x003C (0x000078) 0x211E- f:00020 d: 286 | A = OR[286]
0x003D (0x00007A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x003E (0x00007C) 0x2908- f:00024 d: 264 | OR[264] = A
0x003F (0x00007E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0040 (0x000080) 0x2921- f:00024 d: 289 | OR[289] = A
0x0041 (0x000082) 0x211E- f:00020 d: 286 | A = OR[286]
0x0042 (0x000084) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0043 (0x000086) 0x2908- f:00024 d: 264 | OR[264] = A
0x0044 (0x000088) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0045 (0x00008A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0046 (0x00008C) 0x7596- f:00072 d: 406 | R = P + 406 (0x01DC)
0x0047 (0x00008E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0048 (0x000090) 0x2924- f:00024 d: 292 | OR[292] = A
0x0049 (0x000092) 0x311E- f:00030 d: 286 | A = (OR[286])
0x004A (0x000094) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x004B (0x000096) 0x2913- f:00024 d: 275 | OR[275] = A
0x004C (0x000098) 0x2113- f:00020 d: 275 | A = OR[275]
0x004D (0x00009A) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C)
0x004E (0x00009C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0050), A # 0
0x004F (0x00009E) 0x700B- f:00070 d: 11 | P = P + 11 (0x005A)
0x0050 (0x0000A0) 0x211E- f:00020 d: 286 | A = OR[286]
0x0051 (0x0000A2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0052 (0x0000A4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0053 (0x0000A6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0054 (0x0000A8) 0x2923- f:00024 d: 291 | OR[291] = A
0x0055 (0x0000AA) 0x211E- f:00020 d: 286 | A = OR[286]
0x0056 (0x0000AC) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0057 (0x0000AE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0058 (0x0000B0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0059 (0x0000B2) 0x2924- f:00024 d: 292 | OR[292] = A
0x005A (0x0000B4) 0x7582- f:00072 d: 386 | R = P + 386 (0x01DC)
0x005B (0x0000B6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x005C (0x0000B8) 0x2920- f:00024 d: 288 | OR[288] = A
0x005D (0x0000BA) 0x311E- f:00030 d: 286 | A = (OR[286])
0x005E (0x0000BC) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x005F (0x0000BE) 0x2913- f:00024 d: 275 | OR[275] = A
0x0060 (0x0000C0) 0x2113- f:00020 d: 275 | A = OR[275]
0x0061 (0x0000C2) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C)
0x0062 (0x0000C4) 0x8602- f:00103 d: 2 | P = P + 2 (0x0064), A # 0
0x0063 (0x0000C6) 0x7006- f:00070 d: 6 | P = P + 6 (0x0069)
0x0064 (0x0000C8) 0x211E- f:00020 d: 286 | A = OR[286]
0x0065 (0x0000CA) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0066 (0x0000CC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0067 (0x0000CE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0068 (0x0000D0) 0x2920- f:00024 d: 288 | OR[288] = A
0x0069 (0x0000D2) 0x7573- f:00072 d: 371 | R = P + 371 (0x01DC)
0x006A (0x0000D4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x006B (0x0000D6) 0x2925- f:00024 d: 293 | OR[293] = A
0x006C (0x0000D8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x006D (0x0000DA) 0x2926- f:00024 d: 294 | OR[294] = A
0x006E (0x0000DC) 0x311E- f:00030 d: 286 | A = (OR[286])
0x006F (0x0000DE) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0070 (0x0000E0) 0x2913- f:00024 d: 275 | OR[275] = A
0x0071 (0x0000E2) 0x2113- f:00020 d: 275 | A = OR[275]
0x0072 (0x0000E4) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C)
0x0073 (0x0000E6) 0x8602- f:00103 d: 2 | P = P + 2 (0x0075), A # 0
0x0074 (0x0000E8) 0x7014- f:00070 d: 20 | P = P + 20 (0x0088)
0x0075 (0x0000EA) 0x211E- f:00020 d: 286 | A = OR[286]
0x0076 (0x0000EC) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0077 (0x0000EE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0078 (0x0000F0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0079 (0x0000F2) 0x2925- f:00024 d: 293 | OR[293] = A
0x007A (0x0000F4) 0x211E- f:00020 d: 286 | A = OR[286]
0x007B (0x0000F6) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x007C (0x0000F8) 0x2908- f:00024 d: 264 | OR[264] = A
0x007D (0x0000FA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x007E (0x0000FC) 0x2926- f:00024 d: 294 | OR[294] = A
0x007F (0x0000FE) 0x1800-0x01F7 f:00014 d: 0 | A = 503 (0x01F7)
0x0081 (0x000102) 0x292A- f:00024 d: 298 | OR[298] = A
0x0082 (0x000104) 0x1800-0x0274 f:00014 d: 0 | A = 628 (0x0274)
0x0084 (0x000108) 0x292B- f:00024 d: 299 | OR[299] = A
0x0085 (0x00010A) 0x11C0- f:00010 d: 448 | A = 448 (0x01C0)
0x0086 (0x00010C) 0x292C- f:00024 d: 300 | OR[300] = A
0x0087 (0x00010E) 0x7009- f:00070 d: 9 | P = P + 9 (0x0090)
0x0088 (0x000110) 0x1800-0x01B6 f:00014 d: 0 | A = 438 (0x01B6)
0x008A (0x000114) 0x292A- f:00024 d: 298 | OR[298] = A
0x008B (0x000116) 0x1800-0x0233 f:00014 d: 0 | A = 563 (0x0233)
0x008D (0x00011A) 0x292B- f:00024 d: 299 | OR[299] = A
0x008E (0x00011C) 0x1140- f:00010 d: 320 | A = 320 (0x0140)
0x008F (0x00011E) 0x292C- f:00024 d: 300 | OR[300] = A
0x0090 (0x000120) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x0091 (0x000122) 0x3104- f:00030 d: 260 | A = (OR[260])
0x0092 (0x000124) 0x2904- f:00024 d: 260 | OR[260] = A
0x0093 (0x000126) 0x2104- f:00020 d: 260 | A = OR[260]
0x0094 (0x000128) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x0095 (0x00012A) 0x8007- f:00100 d: 7 | P = P + 7 (0x009C), C = 0
0x0096 (0x00012C) 0x2104- f:00020 d: 260 | A = OR[260]
0x0097 (0x00012E) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0098 (0x000130) 0x8003- f:00100 d: 3 | P = P + 3 (0x009B), C = 0
0x0099 (0x000132) 0x8402- f:00102 d: 2 | P = P + 2 (0x009B), A = 0
0x009A (0x000134) 0x7002- f:00070 d: 2 | P = P + 2 (0x009C)
0x009B (0x000136) 0x7003- f:00070 d: 3 | P = P + 3 (0x009E)
0x009C (0x000138) 0x7C34- f:00076 d: 52 | R = OR[52]
0x009D (0x00013A) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x009E (0x00013C) 0x212C- f:00020 d: 300 | A = OR[300]
0x009F (0x00013E) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F)
0x00A0 (0x000140) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x00A1 (0x000142) 0x2913- f:00024 d: 275 | OR[275] = A
0x00A2 (0x000144) 0x2104- f:00020 d: 260 | A = OR[260]
0x00A3 (0x000146) 0x290D- f:00024 d: 269 | OR[269] = A
0x00A4 (0x000148) 0x2104- f:00020 d: 260 | A = OR[260]
0x00A5 (0x00014A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00A6 (0x00014C) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x00A8 (0x000150) 0x2904- f:00024 d: 260 | OR[260] = A
0x00A9 (0x000152) 0x2104- f:00020 d: 260 | A = OR[260]
0x00AA (0x000154) 0x291F- f:00024 d: 287 | OR[287] = A
0x00AB (0x000156) 0x2113- f:00020 d: 275 | A = OR[275]
0x00AC (0x000158) 0x2504- f:00022 d: 260 | A = A + OR[260]
0x00AD (0x00015A) 0x2904- f:00024 d: 260 | OR[260] = A
0x00AE (0x00015C) 0x2104- f:00020 d: 260 | A = OR[260]
0x00AF (0x00015E) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x00B0 (0x000160) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x00B1 (0x000162) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x00B2 (0x000164) 0x210D- f:00020 d: 269 | A = OR[269]
0x00B3 (0x000166) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x00B4 (0x000168) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x00B5 (0x00016A) 0x211F- f:00020 d: 287 | A = OR[287]
0x00B6 (0x00016C) 0x290E- f:00024 d: 270 | OR[270] = A
0x00B7 (0x00016E) 0x2113- f:00020 d: 275 | A = OR[275]
0x00B8 (0x000170) 0x290D- f:00024 d: 269 | OR[269] = A
0x00B9 (0x000172) 0x210D- f:00020 d: 269 | A = OR[269]
0x00BA (0x000174) 0x8406- f:00102 d: 6 | P = P + 6 (0x00C0), A = 0
0x00BB (0x000176) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00BC (0x000178) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00BD (0x00017A) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x00BE (0x00017C) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00BF (0x00017E) 0x7206- f:00071 d: 6 | P = P - 6 (0x00B9)
0x00C0 (0x000180) 0x2120- f:00020 d: 288 | A = OR[288]
0x00C1 (0x000182) 0x1A00-0x0FFF f:00015 d: 0 | A = A & 4095 (0x0FFF)
0x00C3 (0x000186) 0x2920- f:00024 d: 288 | OR[288] = A
0x00C4 (0x000188) 0x211F- f:00020 d: 287 | A = OR[287]
0x00C5 (0x00018A) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010)
0x00C6 (0x00018C) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C7 (0x00018E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C8 (0x000190) 0x0A0D- f:00005 d: 13 | A = A < 13 (0x000D)
0x00C9 (0x000192) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x00CA (0x000194) 0x0C0D- f:00006 d: 13 | A = A >> 13 (0x000D)
0x00CB (0x000196) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00CC (0x000198) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x00CD (0x00019A) 0x2913- f:00024 d: 275 | OR[275] = A
0x00CE (0x00019C) 0x7515- f:00072 d: 277 | R = P + 277 (0x01E3)
0x00CF (0x00019E) 0x2123- f:00020 d: 291 | A = OR[291]
0x00D0 (0x0001A0) 0x2921- f:00024 d: 289 | OR[289] = A
0x00D1 (0x0001A2) 0x2124- f:00020 d: 292 | A = OR[292]
0x00D2 (0x0001A4) 0x2922- f:00024 d: 290 | OR[290] = A
0x00D3 (0x0001A6) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x00D4 (0x0001A8) 0x2913- f:00024 d: 275 | OR[275] = A
0x00D5 (0x0001AA) 0x750E- f:00072 d: 270 | R = P + 270 (0x01E3)
0x00D6 (0x0001AC) 0x212C- f:00020 d: 300 | A = OR[300]
0x00D7 (0x0001AE) 0x17C0- f:00013 d: 448 | A = A - 448 (0x01C0)
0x00D8 (0x0001B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00DA), A = 0
0x00D9 (0x0001B2) 0x7008- f:00070 d: 8 | P = P + 8 (0x00E1)
0x00DA (0x0001B4) 0x2125- f:00020 d: 293 | A = OR[293]
0x00DB (0x0001B6) 0x2921- f:00024 d: 289 | OR[289] = A
0x00DC (0x0001B8) 0x2126- f:00020 d: 294 | A = OR[294]
0x00DD (0x0001BA) 0x2922- f:00024 d: 290 | OR[290] = A
0x00DE (0x0001BC) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00DF (0x0001BE) 0x2913- f:00024 d: 275 | OR[275] = A
0x00E0 (0x0001C0) 0x7503- f:00072 d: 259 | R = P + 259 (0x01E3)
0x00E1 (0x0001C2) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00E2 (0x0001C4) 0x292D- f:00024 d: 301 | OR[301] = A
0x00E3 (0x0001C6) 0x1800-0x015A f:00014 d: 0 | A = 346 (0x015A)
0x00E5 (0x0001CA) 0x292E- f:00024 d: 302 | OR[302] = A
0x00E6 (0x0001CC) 0x212A- f:00020 d: 298 | A = OR[298]
0x00E7 (0x0001CE) 0x292F- f:00024 d: 303 | OR[303] = A
0x00E8 (0x0001D0) 0x211F- f:00020 d: 287 | A = OR[287]
0x00E9 (0x0001D2) 0x2930- f:00024 d: 304 | OR[304] = A
0x00EA (0x0001D4) 0x212C- f:00020 d: 300 | A = OR[300]
0x00EB (0x0001D6) 0x2931- f:00024 d: 305 | OR[305] = A
0x00EC (0x0001D8) 0x212B- f:00020 d: 299 | A = OR[299]
0x00ED (0x0001DA) 0x2932- f:00024 d: 306 | OR[306] = A
0x00EE (0x0001DC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00EF (0x0001DE) 0x2933- f:00024 d: 307 | OR[307] = A
0x00F0 (0x0001E0) 0x101B- f:00010 d: 27 | A = 27 (0x001B)
0x00F1 (0x0001E2) 0x2934- f:00024 d: 308 | OR[308] = A
0x00F2 (0x0001E4) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x00F3 (0x0001E6) 0x2935- f:00024 d: 309 | OR[309] = A
0x00F4 (0x0001E8) 0x101D- f:00010 d: 29 | A = 29 (0x001D)
0x00F5 (0x0001EA) 0x2936- f:00024 d: 310 | OR[310] = A
0x00F6 (0x0001EC) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x00F7 (0x0001EE) 0x5800- f:00054 d: 0 | B = A
0x00F8 (0x0001F0) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x00FA (0x0001F4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00FB (0x0001F6) 0x2913- f:00024 d: 275 | OR[275] = A
0x00FC (0x0001F8) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x00FD (0x0001FA) 0x3104- f:00030 d: 260 | A = (OR[260])
0x00FE (0x0001FC) 0x2904- f:00024 d: 260 | OR[260] = A
0x00FF (0x0001FE) 0x2104- f:00020 d: 260 | A = OR[260]
0x0100 (0x000200) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x0101 (0x000202) 0x8007- f:00100 d: 7 | P = P + 7 (0x0108), C = 0
0x0102 (0x000204) 0x2104- f:00020 d: 260 | A = OR[260]
0x0103 (0x000206) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0104 (0x000208) 0x8003- f:00100 d: 3 | P = P + 3 (0x0107), C = 0
0x0105 (0x00020A) 0x8402- f:00102 d: 2 | P = P + 2 (0x0107), A = 0
0x0106 (0x00020C) 0x7002- f:00070 d: 2 | P = P + 2 (0x0108)
0x0107 (0x00020E) 0x7003- f:00070 d: 3 | P = P + 3 (0x010A)
0x0108 (0x000210) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0109 (0x000212) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x010A (0x000214) 0x2113- f:00020 d: 275 | A = OR[275]
0x010B (0x000216) 0x8602- f:00103 d: 2 | P = P + 2 (0x010D), A # 0
0x010C (0x000218) 0x7014- f:00070 d: 20 | P = P + 20 (0x0120)
0x010D (0x00021A) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x010E (0x00021C) 0x292D- f:00024 d: 301 | OR[301] = A
0x010F (0x00021E) 0x1800-0x0137 f:00014 d: 0 | A = 311 (0x0137)
0x0111 (0x000222) 0x292E- f:00024 d: 302 | OR[302] = A
0x0112 (0x000224) 0x2113- f:00020 d: 275 | A = OR[275]
0x0113 (0x000226) 0x292F- f:00024 d: 303 | OR[303] = A
0x0114 (0x000228) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0115 (0x00022A) 0x2930- f:00024 d: 304 | OR[304] = A
0x0116 (0x00022C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0117 (0x00022E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0118 (0x000230) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0119 (0x000232) 0x2932- f:00024 d: 306 | OR[306] = A
0x011A (0x000234) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x011B (0x000236) 0x5800- f:00054 d: 0 | B = A
0x011C (0x000238) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x011E (0x00023C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x011F (0x00023E) 0x70B7- f:00070 d: 183 | P = P + 183 (0x01D6)
0x0120 (0x000240) 0x212C- f:00020 d: 300 | A = OR[300]
0x0121 (0x000242) 0x17C0- f:00013 d: 448 | A = A - 448 (0x01C0)
0x0122 (0x000244) 0x8402- f:00102 d: 2 | P = P + 2 (0x0124), A = 0
0x0123 (0x000246) 0x7008- f:00070 d: 8 | P = P + 8 (0x012B)
0x0124 (0x000248) 0x104C- f:00010 d: 76 | A = 76 (0x004C)
0x0125 (0x00024A) 0x2921- f:00024 d: 289 | OR[289] = A
0x0126 (0x00024C) 0x1038- f:00010 d: 56 | A = 56 (0x0038)
0x0127 (0x00024E) 0x2922- f:00024 d: 290 | OR[290] = A
0x0128 (0x000250) 0x1050- f:00010 d: 80 | A = 80 (0x0050)
0x0129 (0x000252) 0x2923- f:00024 d: 291 | OR[291] = A
0x012A (0x000254) 0x7007- f:00070 d: 7 | P = P + 7 (0x0131)
0x012B (0x000256) 0x1038- f:00010 d: 56 | A = 56 (0x0038)
0x012C (0x000258) 0x2921- f:00024 d: 289 | OR[289] = A
0x012D (0x00025A) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x012E (0x00025C) 0x2922- f:00024 d: 290 | OR[290] = A
0x012F (0x00025E) 0x1048- f:00010 d: 72 | A = 72 (0x0048)
0x0130 (0x000260) 0x2923- f:00024 d: 291 | OR[291] = A
0x0131 (0x000262) 0x2104- f:00020 d: 260 | A = OR[260]
0x0132 (0x000264) 0x290D- f:00024 d: 269 | OR[269] = A
0x0133 (0x000266) 0x2104- f:00020 d: 260 | A = OR[260]
0x0134 (0x000268) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0135 (0x00026A) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x0137 (0x00026E) 0x2904- f:00024 d: 260 | OR[260] = A
0x0138 (0x000270) 0x2104- f:00020 d: 260 | A = OR[260]
0x0139 (0x000272) 0x291F- f:00024 d: 287 | OR[287] = A
0x013A (0x000274) 0x2121- f:00020 d: 289 | A = OR[289]
0x013B (0x000276) 0x2504- f:00022 d: 260 | A = A + OR[260]
0x013C (0x000278) 0x2904- f:00024 d: 260 | OR[260] = A
0x013D (0x00027A) 0x2104- f:00020 d: 260 | A = OR[260]
0x013E (0x00027C) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x013F (0x00027E) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x0140 (0x000280) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0141 (0x000282) 0x210D- f:00020 d: 269 | A = OR[269]
0x0142 (0x000284) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0143 (0x000286) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x0144 (0x000288) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x0145 (0x00028A) 0x292D- f:00024 d: 301 | OR[301] = A
0x0146 (0x00028C) 0x2127- f:00020 d: 295 | A = OR[295]
0x0147 (0x00028E) 0x292E- f:00024 d: 302 | OR[302] = A
0x0148 (0x000290) 0x2128- f:00020 d: 296 | A = OR[296]
0x0149 (0x000292) 0x292F- f:00024 d: 303 | OR[303] = A
0x014A (0x000294) 0x211F- f:00020 d: 287 | A = OR[287]
0x014B (0x000296) 0x2930- f:00024 d: 304 | OR[304] = A
0x014C (0x000298) 0x2121- f:00020 d: 289 | A = OR[289]
0x014D (0x00029A) 0x0802- f:00004 d: 2 | A = A > 2 (0x0002)
0x014E (0x00029C) 0x2931- f:00024 d: 305 | OR[305] = A
0x014F (0x00029E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0150 (0x0002A0) 0x2932- f:00024 d: 306 | OR[306] = A
0x0151 (0x0002A2) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0152 (0x0002A4) 0x5800- f:00054 d: 0 | B = A
0x0153 (0x0002A6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0154 (0x0002A8) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0155 (0x0002AA) 0x101E- f:00010 d: 30 | A = 30 (0x001E)
0x0156 (0x0002AC) 0x292D- f:00024 d: 301 | OR[301] = A
0x0157 (0x0002AE) 0x2127- f:00020 d: 295 | A = OR[295]
0x0158 (0x0002B0) 0x292E- f:00024 d: 302 | OR[302] = A
0x0159 (0x0002B2) 0x2128- f:00020 d: 296 | A = OR[296]
0x015A (0x0002B4) 0x292F- f:00024 d: 303 | OR[303] = A
0x015B (0x0002B6) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x015C (0x0002B8) 0x2930- f:00024 d: 304 | OR[304] = A
0x015D (0x0002BA) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x015E (0x0002BC) 0x5800- f:00054 d: 0 | B = A
0x015F (0x0002BE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0160 (0x0002C0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0161 (0x0002C2) 0x2122- f:00020 d: 290 | A = OR[290]
0x0162 (0x0002C4) 0x2913- f:00024 d: 275 | OR[275] = A
0x0163 (0x0002C6) 0x2123- f:00020 d: 291 | A = OR[291]
0x0164 (0x0002C8) 0x2914- f:00024 d: 276 | OR[276] = A
0x0165 (0x0002CA) 0x2114- f:00020 d: 276 | A = OR[276]
0x0166 (0x0002CC) 0x8439- f:00102 d: 57 | P = P + 57 (0x019F), A = 0
0x0167 (0x0002CE) 0x2113- f:00020 d: 275 | A = OR[275]
0x0168 (0x0002D0) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0169 (0x0002D2) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x016A (0x0002D4) 0x290D- f:00024 d: 269 | OR[269] = A
0x016B (0x0002D6) 0x310D- f:00030 d: 269 | A = (OR[269])
0x016C (0x0002D8) 0x290D- f:00024 d: 269 | OR[269] = A
0x016D (0x0002DA) 0x2113- f:00020 d: 275 | A = OR[275]
0x016E (0x0002DC) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x016F (0x0002DE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0170 (0x0002E0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0171 (0x0002E2) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0172 (0x0002E4) 0x8604- f:00103 d: 4 | P = P + 4 (0x0176), A # 0
0x0173 (0x0002E6) 0x210D- f:00020 d: 269 | A = OR[269]
0x0174 (0x0002E8) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0175 (0x0002EA) 0x290D- f:00024 d: 269 | OR[269] = A
0x0176 (0x0002EC) 0x210D- f:00020 d: 269 | A = OR[269]
0x0177 (0x0002EE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0178 (0x0002F0) 0x2915- f:00024 d: 277 | OR[277] = A
0x0179 (0x0002F2) 0x2115- f:00020 d: 277 | A = OR[277]
0x017A (0x0002F4) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x017B (0x0002F6) 0x8007- f:00100 d: 7 | P = P + 7 (0x0182), C = 0
0x017C (0x0002F8) 0x2115- f:00020 d: 277 | A = OR[277]
0x017D (0x0002FA) 0x167F- f:00013 d: 127 | A = A - 127 (0x007F)
0x017E (0x0002FC) 0x8003- f:00100 d: 3 | P = P + 3 (0x0181), C = 0
0x017F (0x0002FE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0181), A = 0
0x0180 (0x000300) 0x7002- f:00070 d: 2 | P = P + 2 (0x0182)
0x0181 (0x000302) 0x701B- f:00070 d: 27 | P = P + 27 (0x019C)
0x0182 (0x000304) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0183 (0x000306) 0x2915- f:00024 d: 277 | OR[277] = A
0x0184 (0x000308) 0x2115- f:00020 d: 277 | A = OR[277]
0x0185 (0x00030A) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0186 (0x00030C) 0x290D- f:00024 d: 269 | OR[269] = A
0x0187 (0x00030E) 0x2113- f:00020 d: 275 | A = OR[275]
0x0188 (0x000310) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0189 (0x000312) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x018A (0x000314) 0x290E- f:00024 d: 270 | OR[270] = A
0x018B (0x000316) 0x2113- f:00020 d: 275 | A = OR[275]
0x018C (0x000318) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x018D (0x00031A) 0x2908- f:00024 d: 264 | OR[264] = A
0x018E (0x00031C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x018F (0x00031E) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0190 (0x000320) 0x8607- f:00103 d: 7 | P = P + 7 (0x0197), A # 0
0x0191 (0x000322) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0192 (0x000324) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0193 (0x000326) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0194 (0x000328) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0195 (0x00032A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0196 (0x00032C) 0x7006- f:00070 d: 6 | P = P + 6 (0x019C)
0x0197 (0x00032E) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0198 (0x000330) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x019A (0x000334) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x019B (0x000336) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x019C (0x000338) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1
0x019D (0x00033A) 0x2F14- f:00027 d: 276 | OR[276] = OR[276] - 1
0x019E (0x00033C) 0x7239- f:00071 d: 57 | P = P - 57 (0x0165)
0x019F (0x00033E) 0x2102- f:00020 d: 258 | A = OR[258]
0x01A0 (0x000340) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x01A1 (0x000342) 0x2908- f:00024 d: 264 | OR[264] = A
0x01A2 (0x000344) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01A3 (0x000346) 0x2913- f:00024 d: 275 | OR[275] = A
0x01A4 (0x000348) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x01A5 (0x00034A) 0x292D- f:00024 d: 301 | OR[301] = A
0x01A6 (0x00034C) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123)
0x01A8 (0x000350) 0x292E- f:00024 d: 302 | OR[302] = A
0x01A9 (0x000352) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005)
0x01AB (0x000356) 0x292F- f:00024 d: 303 | OR[303] = A
0x01AC (0x000358) 0x2113- f:00020 d: 275 | A = OR[275]
0x01AD (0x00035A) 0x2930- f:00024 d: 304 | OR[304] = A
0x01AE (0x00035C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01AF (0x00035E) 0x2931- f:00024 d: 305 | OR[305] = A
0x01B0 (0x000360) 0x211F- f:00020 d: 287 | A = OR[287]
0x01B1 (0x000362) 0x2932- f:00024 d: 306 | OR[306] = A
0x01B2 (0x000364) 0x2122- f:00020 d: 290 | A = OR[290]
0x01B3 (0x000366) 0x2933- f:00024 d: 307 | OR[307] = A
0x01B4 (0x000368) 0x2123- f:00020 d: 291 | A = OR[291]
0x01B5 (0x00036A) 0x2934- f:00024 d: 308 | OR[308] = A
0x01B6 (0x00036C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x01B7 (0x00036E) 0x5800- f:00054 d: 0 | B = A
0x01B8 (0x000370) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x01BA (0x000374) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01BB (0x000376) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x01BC (0x000378) 0x292D- f:00024 d: 301 | OR[301] = A
0x01BD (0x00037A) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123)
0x01BF (0x00037E) 0x292E- f:00024 d: 302 | OR[302] = A
0x01C0 (0x000380) 0x1800-0x0002 f:00014 d: 0 | A = 2 (0x0002)
0x01C2 (0x000384) 0x292F- f:00024 d: 303 | OR[303] = A
0x01C3 (0x000386) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x01C4 (0x000388) 0x5800- f:00054 d: 0 | B = A
0x01C5 (0x00038A) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x01C7 (0x00038E) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01C8 (0x000390) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x01C9 (0x000392) 0x3104- f:00030 d: 260 | A = (OR[260])
0x01CA (0x000394) 0x2904- f:00024 d: 260 | OR[260] = A
0x01CB (0x000396) 0x2104- f:00020 d: 260 | A = OR[260]
0x01CC (0x000398) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x01CD (0x00039A) 0x8007- f:00100 d: 7 | P = P + 7 (0x01D4), C = 0
0x01CE (0x00039C) 0x2104- f:00020 d: 260 | A = OR[260]
0x01CF (0x00039E) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x01D0 (0x0003A0) 0x8003- f:00100 d: 3 | P = P + 3 (0x01D3), C = 0
0x01D1 (0x0003A2) 0x8402- f:00102 d: 2 | P = P + 2 (0x01D3), A = 0
0x01D2 (0x0003A4) 0x7002- f:00070 d: 2 | P = P + 2 (0x01D4)
0x01D3 (0x0003A6) 0x7003- f:00070 d: 3 | P = P + 3 (0x01D6)
0x01D4 (0x0003A8) 0x7C34- f:00076 d: 52 | R = OR[52]
0x01D5 (0x0003AA) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x01D6 (0x0003AC) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x01D7 (0x0003AE) 0x292D- f:00024 d: 301 | OR[301] = A
0x01D8 (0x0003B0) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x01D9 (0x0003B2) 0x5800- f:00054 d: 0 | B = A
0x01DA (0x0003B4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01DB (0x0003B6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01DC (0x0003B8) 0x311E- f:00030 d: 286 | A = (OR[286])
0x01DD (0x0003BA) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01DE (0x0003BC) 0x2913- f:00024 d: 275 | OR[275] = A
0x01DF (0x0003BE) 0x211E- f:00020 d: 286 | A = OR[286]
0x01E0 (0x0003C0) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x01E1 (0x0003C2) 0x291E- f:00024 d: 286 | OR[286] = A
0x01E2 (0x0003C4) 0x0200- f:00001 d: 0 | EXIT
0x01E3 (0x0003C6) 0x2121- f:00020 d: 289 | A = OR[289]
0x01E4 (0x0003C8) 0x290F- f:00024 d: 271 | OR[271] = A
0x01E5 (0x0003CA) 0x2113- f:00020 d: 275 | A = OR[275]
0x01E6 (0x0003CC) 0x2910- f:00024 d: 272 | OR[272] = A
0x01E7 (0x0003CE) 0x2122- f:00020 d: 290 | A = OR[290]
0x01E8 (0x0003D0) 0x2911- f:00024 d: 273 | OR[273] = A
0x01E9 (0x0003D2) 0x7A03-0x021E f:00075 d: 3 | P = OR[3]+542 (0x021E)
0x01EB (0x0003D6) 0x210F- f:00020 d: 271 | A = OR[271]
0x01EC (0x0003D8) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x01ED (0x0003DA) 0x2519- f:00022 d: 281 | A = A + OR[281]
0x01EE (0x0003DC) 0x290D- f:00024 d: 269 | OR[269] = A
0x01EF (0x0003DE) 0x310D- f:00030 d: 269 | A = (OR[269])
0x01F0 (0x0003E0) 0x290D- f:00024 d: 269 | OR[269] = A
0x01F1 (0x0003E2) 0x210F- f:00020 d: 271 | A = OR[271]
0x01F2 (0x0003E4) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01F3 (0x0003E6) 0x2908- f:00024 d: 264 | OR[264] = A
0x01F4 (0x0003E8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01F5 (0x0003EA) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x01F6 (0x0003EC) 0x8604- f:00103 d: 4 | P = P + 4 (0x01FA), A # 0
0x01F7 (0x0003EE) 0x210D- f:00020 d: 269 | A = OR[269]
0x01F8 (0x0003F0) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x01F9 (0x0003F2) 0x290D- f:00024 d: 269 | OR[269] = A
0x01FA (0x0003F4) 0x210D- f:00020 d: 269 | A = OR[269]
0x01FB (0x0003F6) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01FC (0x0003F8) 0x2912- f:00024 d: 274 | OR[274] = A
0x01FD (0x0003FA) 0x2D0F- f:00026 d: 271 | OR[271] = OR[271] + 1
0x01FE (0x0003FC) 0x2112- f:00020 d: 274 | A = OR[274]
0x01FF (0x0003FE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0200 (0x000400) 0x290D- f:00024 d: 269 | OR[269] = A
0x0201 (0x000402) 0x2110- f:00020 d: 272 | A = OR[272]
0x0202 (0x000404) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0203 (0x000406) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0204 (0x000408) 0x290E- f:00024 d: 270 | OR[270] = A
0x0205 (0x00040A) 0x2110- f:00020 d: 272 | A = OR[272]
0x0206 (0x00040C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0207 (0x00040E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0208 (0x000410) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0209 (0x000412) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x020A (0x000414) 0x8607- f:00103 d: 7 | P = P + 7 (0x0211), A # 0
0x020B (0x000416) 0x310E- f:00030 d: 270 | A = (OR[270])
0x020C (0x000418) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x020D (0x00041A) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x020E (0x00041C) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x020F (0x00041E) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0210 (0x000420) 0x7006- f:00070 d: 6 | P = P + 6 (0x0216)
0x0211 (0x000422) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0212 (0x000424) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0214 (0x000428) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0215 (0x00042A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0216 (0x00042C) 0x2D10- f:00026 d: 272 | OR[272] = OR[272] + 1
0x0217 (0x00042E) 0x2F11- f:00027 d: 273 | OR[273] = OR[273] - 1
0x0218 (0x000430) 0x2111- f:00020 d: 273 | A = OR[273]
0x0219 (0x000432) 0x8E2E- f:00107 d: 46 | P = P - 46 (0x01EB), A # 0
0x021A (0x000434) 0x0200- f:00001 d: 0 | EXIT
0x021B (0x000436) 0x0000- f:00000 d: 0 | PASS
0x021C (0x000438) 0x0000- f:00000 d: 0 | PASS
0x021D (0x00043A) 0x0000- f:00000 d: 0 | PASS
0x021E (0x00043C) 0x0000- f:00000 d: 0 | PASS
0x021F (0x00043E) 0x0000- f:00000 d: 0 | PASS
|
same-origin-policy/src/model/sop.als | cfbolz/500lines | 2 | 4328 | /**
* sop.als
* A model of the same-origin policy
*/
module sop
open cors
open origin
open setDomain
fact sameOriginPolicy {
-- same origin policy actually has multiple parts
domSop
xmlHttpReqSop
}
pred domSop {
-- For every successful read/write DOM operation,
all o: ReadDom + WriteDom | let target = o.doc, caller = o.from.context |
-- the calling and target documents are from the same origin, or
origin[target] = origin[caller] or
-- domain properties of both documents have been modified
(target + caller in (o.prevs <: SetDomain).doc and
-- ...and they have matching origin values.
currOrigin[target, o.start] = currOrigin[caller, o.start])
}
pred xmlHttpReqSop {
all x: XmlHttpRequest |
-- A script can only make an AJAX call to a server with the same origin or
origin[x.url] = origin[x.from.context.src] or
-- (relaxation) it's a CORS request
x in CorsRequest
}
/* Commands */
// Can a script read or write the DOM of a document with another origin?
run { some c: ReadDom + WriteDom | origin[c.doc.src] != origin[c.from.context.src] } for 4
|
oeis/347/A347525.asm | neoneye/loda-programs | 11 | 13009 | ; A347525: Number of minimum dominating sets in the n-Andrásfai graph.
; Submitted by <NAME>(w2)
; 2,5,24,22,28,34,40,46,52,58,64,70,76,82,88,94,100,106,112,118,124,130,136,142,148,154,160,166,172,178,184,190,196,202,208,214,220,226,232,238,244,250,256,262,268,274,280,286,292,298,304,310,316,322,328,334
mov $6,2
mov $7,$0
lpb $6
mov $0,$7
sub $6,1
add $0,$6
sub $0,1
mov $4,$0
add $0,1
mov $2,1
mov $3,3
lpb $0
sub $0,1
div $0,$2
div $0,2
max $0,0
seq $0,151799 ; Version 2 of the "previous prime" function: largest prime < n.
sub $0,1
mul $2,2
mul $3,$4
add $2,$3
lpe
mov $0,$2
mov $5,$6
mul $5,$2
add $8,$5
lpe
min $7,1
mul $7,$0
mov $0,$8
sub $0,$7
add $0,1
|
eBindings/uuid/tests/testcases/gnatcoll-uuid-test.adb | persan/zeromq-Ada | 33 | 18765 | <reponame>persan/zeromq-Ada<filename>eBindings/uuid/tests/testcases/gnatcoll-uuid-test.adb
with GNAT.Source_Info;
package body GNATCOLL.uuid.Test is
----------
-- Name --
----------
function Name (T : Test_Case)
return AUnit.Test_String is
pragma Unreferenced (T);
begin
return AUnit.Format (GNAT.Source_Info.File);
end Name;
procedure test_Generate (Test : in out AUnit.Test_Cases.Test_Case'Class) is
t : UUID;
begin
t.Generate;
t.Generate_Random;
Test.Assert (t.Get_Type = DCE_RANDOM, "Get_Type RANDOM");
t.Generate_Time;
Test.Assert (t.Get_Type = DCE_TIME, "Get_Type TIME");
Test.Assert (t.Get_Variant = DCE, "Get_Variant");
end test_Generate;
procedure test_Parse (Test : in out AUnit.Test_Cases.Test_Case'Class) is
t : UUID;
t2 : UUID;
begin
t.Generate_Random;
t2 := Parse (t.Unparse);
Test.Assert (t = t2, "Roundtrip failed");
t.Clear;
Test.Assert (t.Unparse_Lower = "00000000-0000-0000-0000-000000000000",
"Unparse_Lower");
Test.Assert (t.Unparse_Upper = "00000000-0000-0000-0000-000000000000",
"Unparse_Upper");
end test_Parse;
procedure test_Clear (Test : in out AUnit.Test_Cases.Test_Case'Class) is
t : UUID;
begin
t.Clear;
Test.Assert (t.Is_Null, "Clear failed");
t.Generate_Random;
Test.Assert (not t.Is_Null, "Fill failed");
end test_Clear;
procedure test_gtlt (Test : in out AUnit.Test_Cases.Test_Case'Class) is
t, t2 : UUID;
begin
t.Generate_Time;
t2.Generate_Time;
Test.Assert (t2 > t, "> failed");
Test.Assert (not (t2 < t), "< Faild");
Test.Assert (not (t2 = t), "= Faild");
end test_gtlt;
--------------------
-- Register_Tests --
--------------------
procedure Register_Tests (T : in out Test_Case) is
use AUnit.Test_Cases.Registration;
begin
Register_Routine (T, test_Generate'Access, "test_Generate");
Register_Routine (T, test_Parse'Access, "test_Parse");
Register_Routine (T, test_Clear'Access, "test_Clear");
Register_Routine (T, test_gtlt'Access, "test_gtlt");
end Register_Tests;
end GNATCOLL.uuid.Test;
|
Transynther/x86/_processed/NONE/_st_zr_un_/i7-8650U_0xd2.log_19663_1016.asm | ljhsiun2/medusa | 9 | 24273 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x3bc1, %r15
nop
inc %r12
movups (%r15), %xmm6
vpextrq $1, %xmm6, %r14
inc %rbp
lea addresses_WT_ht+0x1dea1, %rsi
lea addresses_WC_ht+0xc3c1, %rdi
nop
nop
nop
cmp %r14, %r14
mov $39, %rcx
rep movsq
nop
nop
nop
nop
add %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r15
push %rax
push %rbp
push %rbx
// Load
lea addresses_UC+0x83c1, %r15
nop
nop
nop
cmp $19057, %rbx
mov (%r15), %r11d
xor %r11, %r11
// Store
lea addresses_PSE+0x1d181, %r11
nop
nop
nop
nop
cmp $18910, %r14
movb $0x51, (%r11)
and $41761, %r13
// Store
lea addresses_normal+0x33c1, %r13
nop
nop
cmp $37933, %r11
mov $0x5152535455565758, %rbx
movq %rbx, %xmm7
vmovups %ymm7, (%r13)
nop
nop
nop
add $39136, %rax
// Faulty Load
lea addresses_WC+0x1a3c1, %rbx
sub $28118, %rbp
mov (%rbx), %r13
lea oracles, %r14
and $0xff, %r13
shlq $12, %r13
mov (%r14,%r13,1), %r13
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}}
{'58': 19541, 'c0': 72, '00': 50}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 c0 58 58 58 58 58 58 58 58 58 58 58 58 c0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 c0 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 c0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
MdePkg/Library/BaseLib/X64/ReadCr3.nasm | nicklela/edk2 | 3,861 | 90488 | <gh_stars>1000+
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; ReadCr3.Asm
;
; Abstract:
;
; AsmReadCr3 function
;
; Notes:
;
;------------------------------------------------------------------------------
DEFAULT REL
SECTION .text
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadCr3 (
; VOID
; );
;------------------------------------------------------------------------------
global ASM_PFX(AsmReadCr3)
ASM_PFX(AsmReadCr3):
mov rax, cr3
ret
|
Task/Long-multiplication/Ada/long-multiplication-6.ada | LaudateCorpus1/RosettaCodeData | 1 | 701 | with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO; use Ada.Text_IO;
with Interfaces; use Interfaces;
procedure Long_Multiplication is
-- Insert definitions above here
procedure Put (Value : Long_Number) is
X : Long_Number := Value;
Last : Natural := X'Last;
Digit : Unsigned_32;
Result : Unbounded_String;
begin
loop
Div (X, Last, Digit, 10);
Append (Result, Character'Val (Digit + Character'Pos ('0')));
exit when Last = 0 and then X (0) = 0;
end loop;
for Index in reverse 1..Length (Result) loop
Put (Element (Result, Index));
end loop;
end Put;
X : Long_Number := (0 => 0, 1 => 0, 2 => 1) * (0 => 0, 1 => 0, 2 => 1);
begin
Put (X);
end Long_Multiplication;
|
Task/Twelve-statements/Ada/twelve-statements-1.ada | LaudateCorpus1/RosettaCodeData | 1 | 24366 | with Ada.Text_IO, Logic;
procedure Twelve_Statements is
package L is new Logic(Number_Of_Statements => 12); use L;
-- formally define the 12 statements as expression function predicates
function P01(T: Table) return Boolean is (T'Length = 12); -- list of 12 statements
function P02(T: Table) return Boolean is (Sum(T(7 .. 12)) = 3); -- three of last six
function P03(T: Table) return Boolean is (Sum(Half(T, Even)) = 2); -- two of the even
function P04(T: Table) return Boolean is (if T(5) then T(6) and T(7)); -- if 5 is true, then ...
function P05(T: Table) return Boolean is
( (not T(2)) and (not T(3)) and (not T(4)) ); -- none of preceding three
function P06(T: Table) return Boolean is (Sum(Half(T, Odd)) = 4); -- four of the odd
function P07(T: Table) return Boolean is (T(2) xor T(3)); -- either 2 or 3, not both
function P08(T: Table) return Boolean is (if T(7) then T(5) and T(6)); -- if 7 is true, then ...
function P09(T: Table) return Boolean is (Sum(T(1 .. 6)) = 3); -- three of first six
function P10(T: Table) return Boolean is (T(11) and T(12)); -- next two
function P11(T: Table) return Boolean is (Sum(T(7..9)) = 1); -- one of 7, 8, 9
function P12(T: Table) return Boolean is (Sum(T(1 .. 11)) = 4); -- four of the preding
-- define a global list of statements
Statement_List: constant Statements :=
(P01'Access, P02'Access, P03'Access, P04'Access, P05'Access, P06'Access,
P07'Access, P08'Access, P09'Access, P10'Access, P11'Access, P12'Access);
-- try out all 2^12 possible choices for the table
procedure Try(T: Table; Fail: Natural; Idx: Indices'Base := Indices'First) is
procedure Print_Table(T: Table) is
use Ada.Text_IO;
begin
Put(" ");
if Fail > 0 then
Put("(wrong at");
for J in T'Range loop
if Statement_List(J)(T) /= T(J) then
Put(Integer'Image(J) & (if J < 10 then ") " else ") "));
end if;
end loop;
end if;
if T = (1..12 => False) then
Put_Line("All false!");
else
Put("True are");
for J in T'Range loop
if T(J) then
Put(Integer'Image(J));
end if;
end loop;
New_Line;
end if;
end Print_Table;
Wrong_Entries: Natural := 0;
begin
if Idx <= T'Last then
Try(T(T'First .. Idx-1) & False & T(Idx+1 .. T'Last), Fail, Idx+1);
Try(T(T'First .. Idx-1) & True & T(Idx+1 .. T'Last), Fail, Idx+1);
else -- now Index > T'Last and we have one of the 2^12 choices to test
for J in T'Range loop
if Statement_List(J)(T) /= T(J) then
Wrong_Entries := Wrong_Entries + 1;
end if;
end loop;
if Wrong_Entries = Fail then
Print_Table(T);
end if;
end if;
end Try;
begin
Ada.Text_IO.Put_Line("Exact hits:");
Try(T => (1..12 => False), Fail => 0);
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line("Near Misses:");
Try(T => (1..12 => False), Fail => 1);
end Twelve_Statements;
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_1275_910.asm | ljhsiun2/medusa | 9 | 169690 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r14
push %rbp
lea addresses_WC_ht+0x1ed74, %r11
nop
nop
nop
nop
nop
and $28745, %r10
mov $0x6162636465666768, %r14
movq %r14, (%r11)
nop
nop
nop
and $45067, %r11
lea addresses_normal_ht+0x1c574, %r12
nop
inc %rbp
mov (%r12), %r10d
and %r12, %r12
pop %rbp
pop %r14
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r15
push %rbp
push %rcx
push %rdx
// Faulty Load
lea addresses_PSE+0xe574, %r11
nop
cmp $51770, %r15
vmovups (%r11), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rcx
lea oracles, %r11
and $0xff, %rcx
shlq $12, %rcx
mov (%r11,%rcx,1), %rcx
pop %rdx
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'33': 1275}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c35502a.ada | best08618/asylo | 7 | 12925 | <reponame>best08618/asylo<gh_stars>1-10
-- C35502A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT THE ATTRIBUTE 'WIDTH' YIELDS THE CORRECT RESULTS
-- WHEN THE PREFIX IS AN ENUMERATION TYPE OTHER THAN A BOOLEAN OR
-- A CHARACTER TYPE.
-- RJW 5/05/86
WITH REPORT; USE REPORT;
PROCEDURE C35502A IS
BEGIN
TEST( "C35502A" , "CHECK THAT THE ATTRIBUTE 'WIDTH' YIELDS " &
"THE CORRECT RESULTS WHEN THE PREFIX " &
"IS AN ENUMERATION TYPE OTHER THAN " &
"A BOOLEAN OR A CHARACTER TYPE" );
DECLARE
TYPE ENUM IS (A, BC, ABC, A_B_C, ABCD);
SUBTYPE SUBENUM IS ENUM RANGE A .. ABC;
SUBTYPE NOENUM IS ENUM RANGE ABC .. A;
TYPE NEWENUM IS NEW ENUM;
BEGIN
IF ENUM'WIDTH /= IDENT_INT(5) THEN
FAILED( "INCORRECT WIDTH FOR ENUM" );
END IF;
IF NEWENUM'WIDTH /= IDENT_INT(5) THEN
FAILED( "INCORRECT WIDTH FOR NEWENUM" );
END IF;
IF SUBENUM'WIDTH /= IDENT_INT(3) THEN
FAILED( "INCORRECT WIDTH FOR SUBENUM" );
END IF;
IF NOENUM'WIDTH /= IDENT_INT(0) THEN
FAILED( "INCORRECT WIDTH FOR NOENUM" );
END IF;
END;
RESULT;
END C35502A;
|
DevSound_Vars.asm | DevEd2/HokeyPokey-GB | 0 | 88850 | ; ================================================================
; DevSound variable definitions
; ================================================================
if !def(incDSVars)
incDSVars set 1
SECTION "DevSound varialbes",WRAM0
DSVarsStart
GlobalVolume ds 1
GlobalSpeed1 ds 1
GlobalSpeed2 ds 1
GlobalTimer ds 1
TickCount ds 1
FadeTimer ds 1
FadeType ds 1
SoundEnabled ds 1
CH1Enabled ds 1
CH2Enabled ds 1
CH3Enabled ds 1
CH4Enabled ds 1
CH1Ptr ds 2
CH1VolPtr ds 2
CH1PulsePtr ds 2
CH1ArpPtr ds 2
CH1VibPtr ds 2
CH1Pos ds 1
CH1VolPos ds 1
CH1PulsePos ds 1
CH1ArpPos ds 1
CH1VibPos ds 1
CH1VibDelay ds 1
CH1LoopPos ds 1
CH1RetPtr ds 2
CH1RetPos ds 1
CH1Tick ds 1
CH1Reset ds 1
CH1Note ds 1
CH1Transpose ds 1
CH1FreqOffset ds 1
CH1Pan ds 1
CH1Sweep ds 1
CH1NoteCount ds 1
CH1InsMode ds 1
CH1Ins1 ds 1
CH1Ins2 ds 1
CH2Ptr ds 2
CH2VolPtr ds 2
CH2PulsePtr ds 2
CH2ArpPtr ds 2
CH2VibPtr ds 2
CH2Pos ds 1
CH2VolPos ds 1
CH2PulsePos ds 1
CH2ArpPos ds 1
CH2VibPos ds 1
CH2VibDelay ds 1
CH2LoopPos ds 1
CH2RetPtr ds 2
CH2RetPos ds 1
CH2Tick ds 1
CH2Reset ds 1
CH2Note ds 1
CH2Transpose ds 1
CH2FreqOffset ds 1
CH2Pan ds 1
CH2NoteCount ds 1
CH2InsMode ds 1
CH2Ins1 ds 1
CH2Ins2 ds 1
CH3Ptr ds 2
CH3VolPtr ds 2
CH3WavePtr ds 2
CH3ArpPtr ds 2
CH3VibPtr ds 2
CH3Pos ds 1
CH3VolPos ds 1
CH3WavePos ds 1
CH3ArpPos ds 1
CH3VibPos ds 1
CH3VibDelay ds 1
CH3LoopPos ds 1
CH3RetPtr ds 2
CH3RetPos ds 1
CH3Tick ds 1
CH3Reset ds 1
CH3Note ds 1
CH3Transpose ds 1
CH3FreqOffset ds 1
CH3Vol ds 1
CH3Wave ds 1
CH3Pan ds 1
CH3NoteCount ds 1
CH3InsMode ds 1
CH3Ins1 ds 1
CH3Ins2 ds 1
CH4Ptr ds 2
CH4VolPtr ds 2
CH4NoisePtr ds 2
CH4Pos ds 1
CH4VolPos ds 1
CH4NoisePos ds 1
CH4LoopPos ds 1
CH4RetPtr ds 2
CH4RetPos ds 1
CH4Mode ds 1
CH4Tick ds 1
CH4Reset ds 1
CH4Transpose ds 1
CH4Pan ds 1
CH4NoteCount ds 1
CH4InsMode ds 1
CH4Ins1 ds 1
CH4Ins2 ds 1
DSVarsEnd
WaveBuffer ds 16
WavePos ds 1
WaveBufUpdateFlag ds 1
PWMEnabled ds 1
PWMVol ds 1
PWMSpeed ds 1
PWMTimer ds 1
PWMDir ds 1
RandomizerEnabled ds 1
RandomizerTimer ds 1
RandomizerSpeed ds 1
ArpBuffer ds 8
endc
|
base/mvdm/wow16/toolhelp/dllentry.asm | npocmaka/Windows-Server-2003 | 17 | 16831 | <gh_stars>10-100
PAGE,132
;***************************************************************************
;*
;* DLLENTRY.ASM
;*
;* TOOLHELP.DLL Entry code
;*
;* This module generates a code segment called INIT_TEXT.
;* It initializes the local heap if one exists and then calls
;* the C routine LibMain() which should have the form:
;* BOOL FAR PASCAL LibMain(HANDLE hInstance,
;* WORD wDataSeg,
;* WORD cbHeap,
;* LPSTR lpszCmdLine);
;*
;* The result of the call to LibMain is returned to Windows.
;* The C routine should return TRUE if it completes initialization
;* successfully, FALSE if some error occurs.
;*
;**************************************************************************
INCLUDE TOOLPRIV.INC
extrn LocalInit:FAR
extrn GlobalUnwire:FAR
sBegin CODE
assumes CS,CODE
externNP ToolHelpLibMain
externNP HelperReleaseSelector
externNP NotifyUnInit
externNP InterruptUnInit
?PLM=0
externA <_acrtused> ;Ensures that Win DLL startup code is linked
?PLM=1
; LibEntry
;
; KERNEL calls this when the TOOLHELP is loaded the first time
cProc LibEntry, <PUBLIC,FAR>
cBegin
push di ;Handle of the module instance
push ds ;Library data segment
push cx ;Heap size
push es ;Command line segment
push si ;Command line offset
;** If we have some heap then initialize it
jcxz callc ;Jump if no heap specified
;** Call the Windows function LocalInit() to set up the heap
;** LocalInit((LPSTR)start, WORD cbHeap);
xor ax,ax
cCall LocalInit <ds, ax, cx>
or ax,ax ;Did it do it ok ?
jz error ;Quit if it failed
;** Invoke our initialization routine
callc:
call ToolHelpLibMain ;Invoke the 'C' routine (result in AX)
jmp SHORT exit
error:
pop si ;Clean up stack on a LocalInit error
pop es
pop cx
pop ds
pop di
exit:
cEnd
; WEP
; Windows Exit Procedure
cProc WEP, <FAR,PUBLIC>, <si,di,ds>
parmW wState
cBegin
;** Make sure our DS is safe
mov ax,_DATA ;Get the DS value
lar cx,ax ;Is it OK?
jz @F
jmp SHORT WEP_Bad ;No
@@: and cx,8a00h ;Clear all but P, Code/Data, R/W bits
cmp cx,8200h ;Is it P, R/W, Code/Data?
jne WEP_Bad ;No
mov ax,_DATA ;Get our DS now
mov ds,ax
;** Uninstall the Register PTrace notifications if necessary
cmp wNotifyInstalled,0
jz @F
cCall NotifyUnInit
@@:
;** Release fault handlers
cmp wIntInstalled,0
jz @F
cCall InterruptUnInit
@@:
;** Release our roving selector
test wTHFlags, TH_WIN30STDMODE
jz @F
cCall HelperReleaseSelector, <wSel>
@@:
WEP_Bad:
mov ax,1
cEnd
sEnd
END LibEntry
|
dino/lcs/enemy/2C.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 25218 | copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
001248 move.l D2, ($2c,A6)
00124C tst.w D0 [enemy+2C, enemy+2E, etc+2C, etc+2E, item+2C, item+2E]
001298 move.l D2, ($2c,A6)
00129C tst.w D0 [enemy+2C, enemy+2E, item+2C, item+2E]
0016D2 move.l D1, ($2c,A6)
0016D6 or.w D0, D0 [enemy+2C, enemy+2E, etc+2C, etc+2E]
004D3E move.l D0, (A4)+
004D40 dbra D1, $4d38
02A79A tst.b ($2c,A6)
02A79E bne $2a7a6 [enemy+2C]
02A806 tst.b ($2c,A6)
02A80A bne $2a812 [enemy+2C]
02A924 tst.b ($2c,A6)
02A928 bne $2a930 [enemy+2C]
02AB16 tst.b ($2c,A6)
02AB1A bne $2ab22 [enemy+2C]
02ABB4 tst.b ($2c,A6)
02ABB8 bne $2abc0 [enemy+2C]
02AD30 tst.b ($2c,A6)
02AD34 bne $2ad3c [enemy+2C]
033D82 tst.b ($2c,A6)
033D86 bne $33da2 [enemy+2C]
033DE8 tst.b ($2c,A6)
033DEC bne $33df4 [enemy+2C]
042814 tst.b ($2c,A6) [enemy+80]
042818 beq $42822 [enemy+2C]
04281A clr.b ($2c,A6)
04281E bsr $42824 [enemy+2C]
0488D2 tst.b ($2c,A6)
0488D6 bne $4890a [enemy+2C]
0493C6 move.b ($2c,A6), D0
0493CA move.w ($16,PC,D0.w), D0 [enemy+2C]
04F3BE move.b ($2c,A6), D0
04F3C2 move.w ($16,PC,D0.w), D0 [enemy+2C]
0502FA tst.b ($2c,A6)
0502FE beq $50330 [enemy+2C]
05032C clr.b ($2c,A6)
050330 jsr $121e.l [enemy+2C]
057DF0 tst.b ($2c,A6) [enemy+ 4]
057DF4 beq $57dfc [enemy+2C]
057EB8 move.b ($2c,A3), D0
057EBC asl.w #3, D0 [enemy+2C]
057EC8 move.b ($2c,A3), D0
057ECC asl.w #3, D0 [enemy+2C]
05EEBC move.b ($2c,A0), D0
05EEC0 bmi $5efe8 [enemy+2C]
05EEE6 move.b ($2c,A0), D0
05EEEA add.w D0, D0 [enemy+2C]
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
|
UI Applescript Examples/UI Applescript Examples/AppDelegate.applescript | Iainmon/VPN-and-File-Server-Connection-Applescript | 0 | 4525 | --
-- AppDelegate.applescript
-- UI Applescript Examples
--
-- Created by <NAME> on 5/19/17.
-- Copyright © 2017 <NAME>. All rights reserved.
--
script AppDelegate
property parent : class "NSObject"
-- IBOutlets
property theWindow : missing value
property imageButton1 : missing value
property label1 : missing value
property progressBar : missing value
property progressWheel : missing value
property image1 : missing value
property MyProgressBar : missing value -- Progress Bar IB Outlet
property button3 : missing value
global variable1
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
on button1_(sender)
tell progressWheel to startAnimation_(sender)
repeat 5 times
set c to 0
repeat 100 times
set c to c + 1
delay 0.005
tell MyProgressBar to setDoubleValue_(c) -- Tells Progress bar the % to go to
if c > 99 then
exit repeat -- If current repeat is 100 or more then cancels adding more
end if
end repeat
end repeat
end button1_
on button2_(sender)
tell progressWheel to stopAnimation_(sender)
tell MyProgressBar to setDoubleValue_(0)
end button2_
on imageButton_(sender)
set newImage1 to current application's NSImage's imageNamed_("happy.png")
imageButton1's setImage_(newImage1)
label1's setStringValue_("I'm Happy!")
delay 1
label1's setStringValue_("4")
delay 1
label1's setStringValue_("3")
delay 1
label1's setStringValue_("2")
delay 1
label1's setStringValue_("1")
delay 1
label1's setStringValue_("I'm Sad, Click Me")
set newImage1 to current application's NSImage's imageNamed_("sad.png")
imageButton1's setImage_(newImage1)
end imageButton_
on button3_(sender)
set variable1 to 1
repeat 7 times
set variable1 to variable1 as string
set c to variable1 & ".png"
set newImage1 to current application's NSImage's imageNamed_(c)
image1's setImage_(newImage1)
set variable1 to variable1 + 1
delay 1
end repeat
end button3_
end script
|
editors/levee/dos.asm | ibara/LiteBSD-Ports | 14 | 101464 | name dos
page 55,80
title 'DOS.ASM -- assembly routines for the teeny-shell under DOS'
_TEXT segment byte public 'CODE'
assume cs:_TEXT
public _fail_criterr
;
; If we get a critical error, just fail it - dos 3.0 and up only, please!
;
_fail_criterr proc far
mov al, 3
iret
_fail_criterr endp
public _ignore_ctrlc
;
; If the user presses ^C, don't do any special handling of it.
;
_ignore_ctrlc proc far
iret
_ignore_ctrlc endp
_pexec endp
public _intr_on_ctrlc
;
; If the user presses ^C, terminate the current process.
;
_intr_on_ctrlc proc far
mov ah, 4ch
mov al, 0ffh
int 21h
_intr_on_ctrlc endp
public _crawcin
;
; get a character from standard input without any sort of magical
; processing.
;
_crawcin proc far
mov ah, 07h
int 21h
ret
_crawcin endp
_TEXT ends
end
|
src/arch/x86_64/boot.asm | fdidron/lisa | 0 | 7041 | <reponame>fdidron/lisa
global start
section .text
bits 32
start:
mov dword [0xb8000], 0x2f4b2f4f
hlt
|
oeis/141/A141194.asm | neoneye/loda-programs | 11 | 315 | <reponame>neoneye/loda-programs
; A141194: Primes of the form 16k+7.
; Submitted by <NAME>(s4)
; 7,23,71,103,151,167,199,263,311,359,439,487,503,599,631,647,727,743,823,839,887,919,967,983,1031,1063,1223,1303,1319,1367,1399,1447,1511,1543,1559,1607,1783,1831,1847,1879,2039,2087,2311,2423,2503,2551,2647,2663,2711,2791,2887,2903,2999,3079,3191,3271,3319,3463,3511,3527,3559,3607,3623,3671,3719,3767,3847,3863,3911,3943,4007,4231,4327,4391,4423,4519,4567,4583,4663,4679,4759,4871,4903,4919,4951,4967,4999,5303,5351,5399,5431,5479,5527,5591,5623,5639,5783,5879,5927,6007
mov $1,6
mov $2,$0
pow $2,2
lpb $2
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,16
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
add $0,1
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_421.asm | ljhsiun2/medusa | 9 | 171987 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x16258, %rax
nop
nop
nop
sub %rcx, %rcx
mov $0x6162636465666768, %r10
movq %r10, %xmm3
vmovups %ymm3, (%rax)
nop
inc %r15
lea addresses_WC_ht+0xdb28, %rsi
lea addresses_WT_ht+0x928, %rdi
nop
nop
cmp %r10, %r10
mov $95, %rcx
rep movsl
cmp %rsi, %rsi
lea addresses_UC_ht+0x10e08, %rcx
clflush (%rcx)
nop
nop
and $23866, %rbp
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
movups %xmm7, (%rcx)
nop
add $46472, %rbp
lea addresses_WT_ht+0x16dd0, %r15
nop
nop
nop
xor %rdi, %rdi
vmovups (%r15), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rax
nop
nop
nop
lfence
lea addresses_normal_ht+0x1409c, %rsi
lea addresses_normal_ht+0x6f28, %rdi
nop
and $29966, %rbp
mov $23, %rcx
rep movsw
cmp $22724, %r15
lea addresses_normal_ht+0x1e28, %rsi
lea addresses_D_ht+0x16aaf, %rdi
nop
nop
add $36951, %r14
mov $17, %rcx
rep movsb
nop
nop
nop
nop
cmp $47147, %rbp
lea addresses_A_ht+0x9328, %rsi
lea addresses_D_ht+0xdf28, %rdi
nop
nop
nop
nop
sub %r14, %r14
mov $43, %rcx
rep movsb
nop
xor %rdi, %rdi
lea addresses_WC_ht+0xf28, %rbp
and $471, %r15
mov (%rbp), %r10
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x1d728, %rcx
clflush (%rcx)
and %r14, %r14
movl $0x61626364, (%rcx)
nop
nop
nop
nop
inc %rdi
lea addresses_UC_ht+0xae7, %rbp
nop
nop
nop
nop
cmp %rcx, %rcx
movups (%rbp), %xmm3
vpextrq $0, %xmm3, %r10
nop
nop
nop
sub %r14, %r14
lea addresses_UC_ht+0x15068, %r15
nop
nop
nop
nop
nop
xor $45346, %rsi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
movups %xmm3, (%r15)
sub $32083, %rsi
lea addresses_WT_ht+0xdb14, %rax
nop
nop
nop
nop
nop
sub %rbp, %rbp
movl $0x61626364, (%rax)
nop
lfence
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %r9
push %rbp
push %rdi
// Faulty Load
lea addresses_WT+0x5328, %rdi
and %r11, %r11
mov (%rdi), %r13
lea oracles, %rdi
and $0xff, %r13
shlq $12, %r13
mov (%rdi,%r13,1), %r13
pop %rdi
pop %rbp
pop %r9
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_36_2036.asm | ljhsiun2/medusa | 9 | 172145 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1a9e1, %rbp
nop
cmp $22336, %r8
movb $0x61, (%rbp)
add %r15, %r15
lea addresses_UC_ht+0x17adf, %r11
nop
nop
inc %rax
movb (%r11), %cl
nop
sub %rax, %rax
lea addresses_WC_ht+0x1b1a1, %rsi
clflush (%rsi)
nop
nop
nop
sub $22498, %r15
movb $0x61, (%rsi)
nop
nop
nop
nop
nop
sub %r8, %r8
lea addresses_normal_ht+0x18ca1, %rax
nop
nop
nop
nop
nop
inc %rcx
movb $0x61, (%rax)
cmp $60375, %rsi
lea addresses_WC_ht+0x13201, %rsi
lea addresses_D_ht+0x3311, %rdi
clflush (%rdi)
nop
nop
sub %r15, %r15
mov $37, %rcx
rep movsb
nop
nop
nop
add %rdi, %rdi
lea addresses_normal_ht+0x101a1, %rsi
lea addresses_UC_ht+0xb9d9, %rdi
and $50349, %r15
mov $82, %rcx
rep movsq
nop
sub %r15, %r15
lea addresses_WC_ht+0xcea1, %r15
nop
cmp %r8, %r8
mov (%r15), %cx
sub $48852, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0xb1e1, %rcx
nop
cmp %r11, %r11
mov $0x5152535455565758, %rax
movq %rax, (%rcx)
nop
nop
nop
nop
dec %rcx
// REPMOV
lea addresses_normal+0x65a1, %rsi
lea addresses_WC+0x4061, %rdi
clflush (%rdi)
dec %r11
mov $47, %rcx
rep movsl
nop
nop
nop
nop
nop
and $7491, %rsi
// Store
mov $0x73d94f0000000ea1, %rsi
nop
nop
nop
and %r8, %r8
mov $0x5152535455565758, %r11
movq %r11, %xmm1
vmovups %ymm1, (%rsi)
nop
nop
nop
cmp $10956, %r14
// Store
lea addresses_normal+0x138a1, %rcx
nop
nop
nop
nop
nop
cmp $3268, %r14
mov $0x5152535455565758, %r8
movq %r8, %xmm3
vmovups %ymm3, (%rcx)
nop
nop
nop
nop
add $17455, %r11
// Faulty Load
lea addresses_RW+0xf4a1, %r12
nop
nop
add %rax, %rax
movups (%r12), %xmm0
vpextrq $1, %xmm0, %r11
lea oracles, %r12
and $0xff, %r11
shlq $12, %r11
mov (%r12,%r11,1), %r11
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_normal', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'32': 36}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
archive/agda-2/Oscar/Data/Term/ThickAndThin.agda | m0davis/oscar | 0 | 16365 | <filename>archive/agda-2/Oscar/Data/Term/ThickAndThin.agda
{-# OPTIONS --allow-unsolved-metas #-}
module Oscar.Data.Term.ThickAndThin {𝔣} (FunctionName : Set 𝔣) where
open import Oscar.Class.ThickAndThin
open import Oscar.Data.Term FunctionName
import Oscar.Data.Term.ThickAndThin.internal FunctionName as ⋆
instance ThickAndThinTerm : ThickAndThin Term
ThickAndThin.thin ThickAndThinTerm = ⋆.thin
ThickAndThin.thin-injective ThickAndThinTerm = ⋆.thin-injective
ThickAndThin.thick ThickAndThinTerm = ⋆.thick
ThickAndThin.thick∘thin=id ThickAndThinTerm = {!!}
ThickAndThin.check ThickAndThinTerm = {!!}
ThickAndThin.thin-check-id ThickAndThinTerm = {!!}
instance ThickAndThinTerms : ∀ {N} → ThickAndThin (Terms N)
ThickAndThin.thin ThickAndThinTerms x = ⋆.thins x
ThickAndThin.thin-injective ThickAndThinTerms y = ⋆.thins-injective y
ThickAndThin.thick ThickAndThinTerms = ⋆.thicks
ThickAndThin.thick∘thin=id ThickAndThinTerms = {!!}
ThickAndThin.check ThickAndThinTerms = {!!}
ThickAndThin.thin-check-id ThickAndThinTerms = {!!}
open import Oscar.Data.Fin
open import Oscar.Data.Fin.ThickAndThin
open import Oscar.Data.Maybe.properties
open import Oscar.Data.Nat
_for_ : ∀ {n} → Term n → Fin (suc n) → suc n ⊸ n
(t' for x) y = maybe i t' ((check x y))
|
programs/oeis/287/A287925.asm | jmorken/loda | 1 | 165571 | <reponame>jmorken/loda
; A287925: a(n) = prime(1)^4 + prime(n)^4
; 32,97,641,2417,14657,28577,83537,130337,279857,707297,923537,1874177,2825777,3418817,4879697,7890497,12117377,13845857,20151137,25411697,28398257,38950097,47458337,62742257,88529297,104060417,112550897,131079617,141158177
cal $0,40 ; The prime numbers.
pow $0,4
mov $1,$0
add $1,16
|
Data/ships/Chameleon.asm | ped7g/EliteNext | 0 | 80680 | <reponame>ped7g/EliteNext
Chameleon: DB $03, $0F, $A0
DW ChameleonEdges
DB ChameleonEdgesSize
DB $00, $1A
DB ChameleonVertSize
DB ChameleonEdgesCnt
DB $00, $C8
DB ChameleonNormalsSize
DB $0A, $64, $1D
DW ChameleonNormals
DB $01, $23
DW ChameleonVertices
DB 0,0 ; Type and Tactics
ChameleonVertices: DB $12, $00, $6E, $9F, $25, $01
DB $12, $00, $6E, $1F, $34, $01
DB $28, $00, $00, $9F, $8B, $25
DB $08, $18, $00, $9F, $68, $22
DB $08, $18, $00, $1F, $69, $33
DB $28, $00, $00, $1F, $9A, $34
DB $08, $18, $00, $5F, $7A, $44
DB $08, $18, $00, $DF, $7B, $55
DB $00, $18, $28, $1F, $36, $02
DB $00, $18, $28, $5F, $57, $14
DB $20, $00, $28, $BF, $BC, $88
DB $00, $18, $28, $3F, $9C, $68
DB $20, $00, $28, $3F, $AC, $99
DB $00, $18, $28, $7F, $BC, $7A
DB $08, $00, $28, $AA, $CC, $CC
DB $00, $08, $28, $2A, $CC, $CC
DB $08, $00, $28, $2A, $CC, $CC
DB $00, $08, $28, $6A, $CC, $CC
ChameleonVertSize: equ $ - ChameleonVertices
ChameleonEdges: DB $1F, $01, $00, $04
DB $1F, $02, $00, $20
DB $1F, $15, $00, $24
DB $1F, $03, $04, $20
DB $1F, $14, $04, $24
DB $1F, $34, $04, $14
DB $1F, $25, $00, $08
DB $1F, $26, $0C, $20
DB $1F, $36, $10, $20
DB $1F, $75, $1C, $24
DB $1F, $74, $18, $24
DB $1F, $39, $10, $14
DB $1F, $4A, $14, $18
DB $1F, $28, $08, $0C
DB $1F, $5B, $08, $1C
DB $1F, $8B, $08, $28
DB $1F, $9A, $14, $30
DB $1F, $68, $0C, $2C
DB $1F, $7B, $1C, $34
DB $1F, $69, $10, $2C
DB $1F, $7A, $18, $34
DB $1F, $8C, $28, $2C
DB $1F, $BC, $28, $34
DB $1F, $9C, $2C, $30
DB $1F, $AC, $30, $34
DB $0A, $CC, $38, $3C
DB $0A, $CC, $3C, $40
DB $0A, $CC, $40, $44
DB $0A, $CC, $44, $38
ChameleonEdgesSize: equ $ - ChameleonEdges
ChameleonEdgesCnt: equ ChameleonEdgesSize/4
ChameleonNormals: DB $1F, $00, $5A, $1F
DB $5F, $00, $5A, $1F
DB $9F, $39, $4C, $0B
DB $1F, $39, $4C, $0B
DB $5F, $39, $4C, $0B
DB $DF, $39, $4C, $0B
DB $1F, $00, $60, $00
DB $5F, $00, $60, $00
DB $BF, $39, $4C, $0B
DB $3F, $39, $4C, $0B
DB $7F, $39, $4C, $0B
DB $FF, $39, $4C, $0B
DB $3F, $00, $00, $60
ChameleonNormalsSize: equ $ - ChameleonNormals
ChameleonLen: equ $ - Chameleon
|
8051/14arith/add.asm | iamvk1437k/mpmc | 1 | 247561 | <gh_stars>1-10
MOV A,#20H ;Move 1st data to accumulator
MOV dptr,#4200H ;Load the address in dptr
MOV B,#54H ;Move 2nd data to accumulator
ADD A,B ;Add both data
MOVX @dptr,A ;Store the result in memory
HERE: SJMP HERE ;Stop the program |
gcc-gcc-7_3_0-release/gcc/ada/a-except.adb | best08618/asylo | 7 | 12759 | <filename>gcc-gcc-7_3_0-release/gcc/ada/a-except.adb
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- A D A . E X C E P T I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
pragma Style_Checks (All_Checks);
-- No subprogram ordering check, due to logical grouping
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- elaboration circularities with System.Exception_Tables.
with System; use System;
with System.Exceptions_Debug; use System.Exceptions_Debug;
with System.Standard_Library; use System.Standard_Library;
with System.Soft_Links; use System.Soft_Links;
package body Ada.Exceptions is
pragma Suppress (All_Checks);
-- We definitely do not want exceptions occurring within this unit, or we
-- are in big trouble. If an exceptional situation does occur, better that
-- it not be raised, since raising it can cause confusing chaos.
-----------------------
-- Local Subprograms --
-----------------------
-- Note: the exported subprograms in this package body are called directly
-- from C clients using the given external name, even though they are not
-- technically visible in the Ada sense.
procedure Process_Raise_Exception (E : Exception_Id);
pragma No_Return (Process_Raise_Exception);
-- This is the lowest level raise routine. It raises the exception
-- referenced by Current_Excep.all in the TSD, without deferring abort
-- (the caller must ensure that abort is deferred on entry).
procedure To_Stderr (S : String);
pragma Export (Ada, To_Stderr, "__gnat_to_stderr");
-- Little routine to output string to stderr that is also used in the
-- tasking run time.
procedure To_Stderr (C : Character);
pragma Inline (To_Stderr);
pragma Export (Ada, To_Stderr, "__gnat_to_stderr_char");
-- Little routine to output a character to stderr, used by some of the
-- separate units below.
package Exception_Data is
-----------------------------------
-- Exception Message Subprograms --
-----------------------------------
procedure Set_Exception_C_Msg
(Excep : EOA;
Id : Exception_Id;
Msg1 : System.Address;
Line : Integer := 0;
Column : Integer := 0;
Msg2 : System.Address := System.Null_Address);
-- This routine is called to setup the exception referenced by the
-- Current_Excep field in the TSD to contain the indicated Id value
-- and message. Msg1 is a null terminated string which is generated
-- as the exception message. If line is non-zero, then a colon and
-- the decimal representation of this integer is appended to the
-- message. Ditto for Column. When Msg2 is non-null, a space and this
-- additional null terminated string is added to the message.
procedure Set_Exception_Msg
(Excep : EOA;
Id : Exception_Id;
Message : String);
-- This routine is called to setup the exception referenced by the
-- Current_Excep field in the TSD to contain the indicated Id value and
-- message. Message is a string which is generated as the exception
-- message.
---------------------------------------
-- Exception Information Subprograms --
---------------------------------------
function Untailored_Exception_Information
(X : Exception_Occurrence) return String;
-- This is used by Stream_Attributes.EO_To_String to convert an
-- Exception_Occurrence to a String for the stream attributes.
-- String_To_EO understands the format, as documented here.
--
-- The format of the string is as follows:
--
-- raised <exception name> : <message>
-- (" : <message>" is present only if Exception_Message is not empty)
-- PID=nnnn (only if nonzero)
-- Call stack traceback locations: (only if at least one location)
-- <0xyyyyyyyy 0xyyyyyyyy ...> (is recorded)
--
-- The lines are separated by a ASCII.LF character.
-- The nnnn is the partition Id given as decimal digits.
-- The 0x... line represents traceback program counter locations, in
-- execution order with the first one being the exception location.
--
-- The Exception_Name and Message lines are omitted in the abort
-- signal case, since this is not really an exception.
--
-- Note: If the format of the generated string is changed, please note
-- that an equivalent modification to the routine String_To_EO must be
-- made to preserve proper functioning of the stream attributes.
function Exception_Information (X : Exception_Occurrence) return String;
-- This is the implementation of Ada.Exceptions.Exception_Information,
-- as defined in the Ada RM.
--
-- If no traceback decorator (see GNAT.Exception_Traces) is currently
-- in place, this is the same as Untailored_Exception_Information.
-- Otherwise, the decorator is used to produce a symbolic traceback
-- instead of hexadecimal addresses.
--
-- Note that unlike Untailored_Exception_Information, there is no need
-- to keep the output of Exception_Information stable for streaming
-- purposes, and in fact the output differs across platforms.
end Exception_Data;
package Exception_Traces is
-------------------------------------------------
-- Run-Time Exception Notification Subprograms --
-------------------------------------------------
-- These subprograms provide a common run-time interface to trigger the
-- actions required when an exception is about to be propagated (e.g.
-- user specified actions or output of exception information). They are
-- exported to be usable by the Ada exception handling personality
-- routine when the GCC 3 mechanism is used.
procedure Notify_Handled_Exception (Excep : EOA);
pragma Export
(C, Notify_Handled_Exception, "__gnat_notify_handled_exception");
-- This routine is called for a handled occurrence is about to be
-- propagated.
procedure Notify_Unhandled_Exception (Excep : EOA);
pragma Export
(C, Notify_Unhandled_Exception, "__gnat_notify_unhandled_exception");
-- This routine is called when an unhandled occurrence is about to be
-- propagated.
procedure Unhandled_Exception_Terminate (Excep : EOA);
pragma No_Return (Unhandled_Exception_Terminate);
-- This procedure is called to terminate program execution following an
-- unhandled exception. The exception information, including traceback
-- if available is output, and execution is then terminated. Note that
-- at the point where this routine is called, the stack has typically
-- been destroyed.
end Exception_Traces;
package Stream_Attributes is
----------------------------------
-- Stream Attribute Subprograms --
----------------------------------
function EId_To_String (X : Exception_Id) return String;
function String_To_EId (S : String) return Exception_Id;
-- Functions for implementing Exception_Id stream attributes
function EO_To_String (X : Exception_Occurrence) return String;
function String_To_EO (S : String) return Exception_Occurrence;
-- Functions for implementing Exception_Occurrence stream
-- attributes
end Stream_Attributes;
procedure Raise_Current_Excep (E : Exception_Id);
pragma No_Return (Raise_Current_Excep);
pragma Export (C, Raise_Current_Excep, "__gnat_raise_nodefer_with_msg");
-- This is a simple wrapper to Process_Raise_Exception.
--
-- This external name for Raise_Current_Excep is historical, and probably
-- should be changed but for now we keep it, because gdb and gigi know
-- about it.
procedure Raise_Exception_No_Defer
(E : Exception_Id;
Message : String := "");
pragma Export
(Ada, Raise_Exception_No_Defer,
"ada__exceptions__raise_exception_no_defer");
pragma No_Return (Raise_Exception_No_Defer);
-- Similar to Raise_Exception, but with no abort deferral
procedure Raise_With_Msg (E : Exception_Id);
pragma No_Return (Raise_With_Msg);
pragma Export (C, Raise_With_Msg, "__gnat_raise_with_msg");
-- Raises an exception with given exception id value. A message is
-- associated with the raise, and has already been stored in the exception
-- occurrence referenced by the Current_Excep in the TSD. Abort is deferred
-- before the raise call.
procedure Raise_With_Location_And_Msg
(E : Exception_Id;
F : System.Address;
L : Integer;
M : System.Address := System.Null_Address);
pragma No_Return (Raise_With_Location_And_Msg);
-- Raise an exception with given exception id value. A filename and line
-- number is associated with the raise and is stored in the exception
-- occurrence and in addition a string message M is appended to this
-- if M is not null.
procedure Raise_Constraint_Error
(File : System.Address;
Line : Integer);
pragma No_Return (Raise_Constraint_Error);
pragma Export
(C, Raise_Constraint_Error, "__gnat_raise_constraint_error");
-- Raise constraint error with file:line information
procedure Raise_Constraint_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address);
pragma No_Return (Raise_Constraint_Error_Msg);
pragma Export
(C, Raise_Constraint_Error_Msg, "__gnat_raise_constraint_error_msg");
-- Raise constraint error with file:line + msg information
procedure Raise_Program_Error
(File : System.Address;
Line : Integer);
pragma No_Return (Raise_Program_Error);
pragma Export
(C, Raise_Program_Error, "__gnat_raise_program_error");
-- Raise program error with file:line information
procedure Raise_Program_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address);
pragma No_Return (Raise_Program_Error_Msg);
pragma Export
(C, Raise_Program_Error_Msg, "__gnat_raise_program_error_msg");
-- Raise program error with file:line + msg information
procedure Raise_Storage_Error
(File : System.Address;
Line : Integer);
pragma No_Return (Raise_Storage_Error);
pragma Export
(C, Raise_Storage_Error, "__gnat_raise_storage_error");
-- Raise storage error with file:line information
procedure Raise_Storage_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address);
pragma No_Return (Raise_Storage_Error_Msg);
pragma Export
(C, Raise_Storage_Error_Msg, "__gnat_raise_storage_error_msg");
-- Raise storage error with file:line + reason msg information
-- The exception raising process and the automatic tracing mechanism rely
-- on some careful use of flags attached to the exception occurrence. The
-- graph below illustrates the relations between the Raise_ subprograms
-- and identifies the points where basic flags such as Exception_Raised
-- are initialized.
--
-- (i) signs indicate the flags initialization points. R stands for Raise,
-- W for With, and E for Exception.
--
-- R_No_Msg R_E R_Pe R_Ce R_Se
-- | | | | |
-- +--+ +--+ +---+ | +---+
-- | | | | |
-- R_E_No_Defer(i) R_W_Msg(i) R_W_Loc
-- | | | |
-- +------------+ | +-----------+ +--+
-- | | | |
-- | | | Set_E_C_Msg(i)
-- | | |
-- Raise_Current_Excep
procedure Reraise;
pragma No_Return (Reraise);
pragma Export (C, Reraise, "__gnat_reraise");
-- Reraises the exception referenced by the Current_Excep field of the TSD
-- (all fields of this exception occurrence are set). Abort is deferred
-- before the reraise operation.
procedure Transfer_Occurrence
(Target : Exception_Occurrence_Access;
Source : Exception_Occurrence);
pragma Export (C, Transfer_Occurrence, "__gnat_transfer_occurrence");
-- Called from System.Tasking.RendezVous.Exceptional_Complete_RendezVous
-- to setup Target from Source as an exception to be propagated in the
-- caller task. Target is expected to be a pointer to the fixed TSD
-- occurrence for this task.
--------------------------------
-- Run-Time Check Subprograms --
--------------------------------
-- These subprograms raise a specific exception with a reason message
-- attached. The parameters are the file name and line number in each
-- case. The names are defined by Exp_Ch11.Get_RT_Exception_Name.
-- Note on ordering of these subprograms. Normally in the Ada.Exceptions
-- units we do not care about the ordering of entries for Rcheck
-- subprograms, and the normal approach is to keep them in the same
-- order as declarations in Types.
-- This section is an IMPORTANT EXCEPTION. It is required by the .Net
-- runtime that the routine Rcheck_PE_Finalize_Raise_Exception is at the
-- end of the list (for reasons that are documented in the exceptmsg.awk
-- script which takes care of generating the required exception data).
procedure Rcheck_CE_Access_Check -- 00
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Null_Access_Parameter -- 01
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Discriminant_Check -- 02
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Divide_By_Zero -- 03
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Explicit_Raise -- 04
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Index_Check -- 05
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Invalid_Data -- 06
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Length_Check -- 07
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Null_Exception_Id -- 08
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Null_Not_Allowed -- 09
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Overflow_Check -- 10
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Partition_Check -- 11
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Range_Check -- 12
(File : System.Address; Line : Integer);
procedure Rcheck_CE_Tag_Check -- 13
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Access_Before_Elaboration -- 14
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Accessibility_Check -- 15
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Address_Of_Intrinsic -- 16
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Aliased_Parameters -- 17
(File : System.Address; Line : Integer);
procedure Rcheck_PE_All_Guards_Closed -- 18
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Bad_Predicated_Generic_Type -- 19
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Current_Task_In_Entry_Body -- 20
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Duplicated_Entry_Address -- 21
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Explicit_Raise -- 22
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Implicit_Return -- 24
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Misaligned_Address_Value -- 25
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Missing_Return -- 26
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Overlaid_Controlled_Object -- 27
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Potentially_Blocking_Operation -- 28
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Stubbed_Subprogram_Called -- 29
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Unchecked_Union_Restriction -- 30
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Non_Transportable_Actual -- 31
(File : System.Address; Line : Integer);
procedure Rcheck_SE_Empty_Storage_Pool -- 32
(File : System.Address; Line : Integer);
procedure Rcheck_SE_Explicit_Raise -- 33
(File : System.Address; Line : Integer);
procedure Rcheck_SE_Infinite_Recursion -- 34
(File : System.Address; Line : Integer);
procedure Rcheck_SE_Object_Too_Large -- 35
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Stream_Operation_Not_Allowed -- 36
(File : System.Address; Line : Integer);
procedure Rcheck_PE_Finalize_Raised_Exception -- 23
(File : System.Address; Line : Integer);
-- This routine is separated out because it has quite different behavior
-- from the others. This is the "finalize/adjust raised exception". This
-- subprogram is always called with abort deferred, unlike all other
-- Rcheck_* subprograms, it needs to call Raise_Exception_No_Defer.
pragma Export (C, Rcheck_CE_Access_Check,
"__gnat_rcheck_CE_Access_Check");
pragma Export (C, Rcheck_CE_Null_Access_Parameter,
"__gnat_rcheck_CE_Null_Access_Parameter");
pragma Export (C, Rcheck_CE_Discriminant_Check,
"__gnat_rcheck_CE_Discriminant_Check");
pragma Export (C, Rcheck_CE_Divide_By_Zero,
"__gnat_rcheck_CE_Divide_By_Zero");
pragma Export (C, Rcheck_CE_Explicit_Raise,
"__gnat_rcheck_CE_Explicit_Raise");
pragma Export (C, Rcheck_CE_Index_Check,
"__gnat_rcheck_CE_Index_Check");
pragma Export (C, Rcheck_CE_Invalid_Data,
"__gnat_rcheck_CE_Invalid_Data");
pragma Export (C, Rcheck_CE_Length_Check,
"__gnat_rcheck_CE_Length_Check");
pragma Export (C, Rcheck_CE_Null_Exception_Id,
"__gnat_rcheck_CE_Null_Exception_Id");
pragma Export (C, Rcheck_CE_Null_Not_Allowed,
"__gnat_rcheck_CE_Null_Not_Allowed");
pragma Export (C, Rcheck_CE_Overflow_Check,
"__gnat_rcheck_CE_Overflow_Check");
pragma Export (C, Rcheck_CE_Partition_Check,
"__gnat_rcheck_CE_Partition_Check");
pragma Export (C, Rcheck_CE_Range_Check,
"__gnat_rcheck_CE_Range_Check");
pragma Export (C, Rcheck_CE_Tag_Check,
"__gnat_rcheck_CE_Tag_Check");
pragma Export (C, Rcheck_PE_Access_Before_Elaboration,
"__gnat_rcheck_PE_Access_Before_Elaboration");
pragma Export (C, Rcheck_PE_Accessibility_Check,
"__gnat_rcheck_PE_Accessibility_Check");
pragma Export (C, Rcheck_PE_Address_Of_Intrinsic,
"__gnat_rcheck_PE_Address_Of_Intrinsic");
pragma Export (C, Rcheck_PE_Aliased_Parameters,
"__gnat_rcheck_PE_Aliased_Parameters");
pragma Export (C, Rcheck_PE_All_Guards_Closed,
"__gnat_rcheck_PE_All_Guards_Closed");
pragma Export (C, Rcheck_PE_Bad_Predicated_Generic_Type,
"__gnat_rcheck_PE_Bad_Predicated_Generic_Type");
pragma Export (C, Rcheck_PE_Current_Task_In_Entry_Body,
"__gnat_rcheck_PE_Current_Task_In_Entry_Body");
pragma Export (C, Rcheck_PE_Duplicated_Entry_Address,
"__gnat_rcheck_PE_Duplicated_Entry_Address");
pragma Export (C, Rcheck_PE_Explicit_Raise,
"__gnat_rcheck_PE_Explicit_Raise");
pragma Export (C, Rcheck_PE_Finalize_Raised_Exception,
"__gnat_rcheck_PE_Finalize_Raised_Exception");
pragma Export (C, Rcheck_PE_Implicit_Return,
"__gnat_rcheck_PE_Implicit_Return");
pragma Export (C, Rcheck_PE_Misaligned_Address_Value,
"__gnat_rcheck_PE_Misaligned_Address_Value");
pragma Export (C, Rcheck_PE_Missing_Return,
"__gnat_rcheck_PE_Missing_Return");
pragma Export (C, Rcheck_PE_Non_Transportable_Actual,
"__gnat_rcheck_PE_Non_Transportable_Actual");
pragma Export (C, Rcheck_PE_Overlaid_Controlled_Object,
"__gnat_rcheck_PE_Overlaid_Controlled_Object");
pragma Export (C, Rcheck_PE_Potentially_Blocking_Operation,
"__gnat_rcheck_PE_Potentially_Blocking_Operation");
pragma Export (C, Rcheck_PE_Stream_Operation_Not_Allowed,
"__gnat_rcheck_PE_Stream_Operation_Not_Allowed");
pragma Export (C, Rcheck_PE_Stubbed_Subprogram_Called,
"__gnat_rcheck_PE_Stubbed_Subprogram_Called");
pragma Export (C, Rcheck_PE_Unchecked_Union_Restriction,
"__gnat_rcheck_PE_Unchecked_Union_Restriction");
pragma Export (C, Rcheck_SE_Empty_Storage_Pool,
"__gnat_rcheck_SE_Empty_Storage_Pool");
pragma Export (C, Rcheck_SE_Explicit_Raise,
"__gnat_rcheck_SE_Explicit_Raise");
pragma Export (C, Rcheck_SE_Infinite_Recursion,
"__gnat_rcheck_SE_Infinite_Recursion");
pragma Export (C, Rcheck_SE_Object_Too_Large,
"__gnat_rcheck_SE_Object_Too_Large");
-- None of these procedures ever returns (they raise an exception). By
-- using pragma No_Return, we ensure that any junk code after the call,
-- such as normal return epilogue stuff, can be eliminated).
pragma No_Return (Rcheck_CE_Access_Check);
pragma No_Return (Rcheck_CE_Null_Access_Parameter);
pragma No_Return (Rcheck_CE_Discriminant_Check);
pragma No_Return (Rcheck_CE_Divide_By_Zero);
pragma No_Return (Rcheck_CE_Explicit_Raise);
pragma No_Return (Rcheck_CE_Index_Check);
pragma No_Return (Rcheck_CE_Invalid_Data);
pragma No_Return (Rcheck_CE_Length_Check);
pragma No_Return (Rcheck_CE_Null_Exception_Id);
pragma No_Return (Rcheck_CE_Null_Not_Allowed);
pragma No_Return (Rcheck_CE_Overflow_Check);
pragma No_Return (Rcheck_CE_Partition_Check);
pragma No_Return (Rcheck_CE_Range_Check);
pragma No_Return (Rcheck_CE_Tag_Check);
pragma No_Return (Rcheck_PE_Access_Before_Elaboration);
pragma No_Return (Rcheck_PE_Accessibility_Check);
pragma No_Return (Rcheck_PE_Address_Of_Intrinsic);
pragma No_Return (Rcheck_PE_Aliased_Parameters);
pragma No_Return (Rcheck_PE_All_Guards_Closed);
pragma No_Return (Rcheck_PE_Bad_Predicated_Generic_Type);
pragma No_Return (Rcheck_PE_Current_Task_In_Entry_Body);
pragma No_Return (Rcheck_PE_Duplicated_Entry_Address);
pragma No_Return (Rcheck_PE_Explicit_Raise);
pragma No_Return (Rcheck_PE_Implicit_Return);
pragma No_Return (Rcheck_PE_Misaligned_Address_Value);
pragma No_Return (Rcheck_PE_Missing_Return);
pragma No_Return (Rcheck_PE_Overlaid_Controlled_Object);
pragma No_Return (Rcheck_PE_Non_Transportable_Actual);
pragma No_Return (Rcheck_PE_Potentially_Blocking_Operation);
pragma No_Return (Rcheck_PE_Stream_Operation_Not_Allowed);
pragma No_Return (Rcheck_PE_Stubbed_Subprogram_Called);
pragma No_Return (Rcheck_PE_Unchecked_Union_Restriction);
pragma No_Return (Rcheck_PE_Finalize_Raised_Exception);
pragma No_Return (Rcheck_SE_Empty_Storage_Pool);
pragma No_Return (Rcheck_SE_Explicit_Raise);
pragma No_Return (Rcheck_SE_Infinite_Recursion);
pragma No_Return (Rcheck_SE_Object_Too_Large);
-- For compatibility with previous version of GNAT, to preserve bootstrap
procedure Rcheck_00 (File : System.Address; Line : Integer);
procedure Rcheck_01 (File : System.Address; Line : Integer);
procedure Rcheck_02 (File : System.Address; Line : Integer);
procedure Rcheck_03 (File : System.Address; Line : Integer);
procedure Rcheck_04 (File : System.Address; Line : Integer);
procedure Rcheck_05 (File : System.Address; Line : Integer);
procedure Rcheck_06 (File : System.Address; Line : Integer);
procedure Rcheck_07 (File : System.Address; Line : Integer);
procedure Rcheck_08 (File : System.Address; Line : Integer);
procedure Rcheck_09 (File : System.Address; Line : Integer);
procedure Rcheck_10 (File : System.Address; Line : Integer);
procedure Rcheck_11 (File : System.Address; Line : Integer);
procedure Rcheck_12 (File : System.Address; Line : Integer);
procedure Rcheck_13 (File : System.Address; Line : Integer);
procedure Rcheck_14 (File : System.Address; Line : Integer);
procedure Rcheck_15 (File : System.Address; Line : Integer);
procedure Rcheck_16 (File : System.Address; Line : Integer);
procedure Rcheck_17 (File : System.Address; Line : Integer);
procedure Rcheck_18 (File : System.Address; Line : Integer);
procedure Rcheck_19 (File : System.Address; Line : Integer);
procedure Rcheck_20 (File : System.Address; Line : Integer);
procedure Rcheck_21 (File : System.Address; Line : Integer);
procedure Rcheck_22 (File : System.Address; Line : Integer);
procedure Rcheck_23 (File : System.Address; Line : Integer);
procedure Rcheck_24 (File : System.Address; Line : Integer);
procedure Rcheck_25 (File : System.Address; Line : Integer);
procedure Rcheck_26 (File : System.Address; Line : Integer);
procedure Rcheck_27 (File : System.Address; Line : Integer);
procedure Rcheck_28 (File : System.Address; Line : Integer);
procedure Rcheck_29 (File : System.Address; Line : Integer);
procedure Rcheck_30 (File : System.Address; Line : Integer);
procedure Rcheck_31 (File : System.Address; Line : Integer);
procedure Rcheck_32 (File : System.Address; Line : Integer);
procedure Rcheck_33 (File : System.Address; Line : Integer);
procedure Rcheck_34 (File : System.Address; Line : Integer);
procedure Rcheck_35 (File : System.Address; Line : Integer);
procedure Rcheck_36 (File : System.Address; Line : Integer);
pragma Export (C, Rcheck_00, "__gnat_rcheck_00");
pragma Export (C, Rcheck_01, "__gnat_rcheck_01");
pragma Export (C, Rcheck_02, "__gnat_rcheck_02");
pragma Export (C, Rcheck_03, "__gnat_rcheck_03");
pragma Export (C, Rcheck_04, "__gnat_rcheck_04");
pragma Export (C, Rcheck_05, "__gnat_rcheck_05");
pragma Export (C, Rcheck_06, "__gnat_rcheck_06");
pragma Export (C, Rcheck_07, "__gnat_rcheck_07");
pragma Export (C, Rcheck_08, "__gnat_rcheck_08");
pragma Export (C, Rcheck_09, "__gnat_rcheck_09");
pragma Export (C, Rcheck_10, "__gnat_rcheck_10");
pragma Export (C, Rcheck_11, "__gnat_rcheck_11");
pragma Export (C, Rcheck_12, "__gnat_rcheck_12");
pragma Export (C, Rcheck_13, "__gnat_rcheck_13");
pragma Export (C, Rcheck_14, "__gnat_rcheck_14");
pragma Export (C, Rcheck_15, "__gnat_rcheck_15");
pragma Export (C, Rcheck_16, "__gnat_rcheck_16");
pragma Export (C, Rcheck_17, "__gnat_rcheck_17");
pragma Export (C, Rcheck_18, "__gnat_rcheck_18");
pragma Export (C, Rcheck_19, "__gnat_rcheck_19");
pragma Export (C, Rcheck_20, "__gnat_rcheck_20");
pragma Export (C, Rcheck_21, "__gnat_rcheck_21");
pragma Export (C, Rcheck_22, "__gnat_rcheck_22");
pragma Export (C, Rcheck_23, "__gnat_rcheck_23");
pragma Export (C, Rcheck_24, "__gnat_rcheck_24");
pragma Export (C, Rcheck_25, "__gnat_rcheck_25");
pragma Export (C, Rcheck_26, "__gnat_rcheck_26");
pragma Export (C, Rcheck_27, "__gnat_rcheck_27");
pragma Export (C, Rcheck_28, "__gnat_rcheck_28");
pragma Export (C, Rcheck_29, "__gnat_rcheck_29");
pragma Export (C, Rcheck_30, "__gnat_rcheck_30");
pragma Export (C, Rcheck_31, "__gnat_rcheck_31");
pragma Export (C, Rcheck_32, "__gnat_rcheck_32");
pragma Export (C, Rcheck_33, "__gnat_rcheck_33");
pragma Export (C, Rcheck_34, "__gnat_rcheck_34");
pragma Export (C, Rcheck_35, "__gnat_rcheck_35");
pragma Export (C, Rcheck_36, "__gnat_rcheck_36");
-- None of these procedures ever returns (they raise an exception). By
-- using pragma No_Return, we ensure that any junk code after the call,
-- such as normal return epilogue stuff, can be eliminated).
pragma No_Return (Rcheck_00);
pragma No_Return (Rcheck_01);
pragma No_Return (Rcheck_02);
pragma No_Return (Rcheck_03);
pragma No_Return (Rcheck_04);
pragma No_Return (Rcheck_05);
pragma No_Return (Rcheck_06);
pragma No_Return (Rcheck_07);
pragma No_Return (Rcheck_08);
pragma No_Return (Rcheck_09);
pragma No_Return (Rcheck_10);
pragma No_Return (Rcheck_11);
pragma No_Return (Rcheck_12);
pragma No_Return (Rcheck_13);
pragma No_Return (Rcheck_14);
pragma No_Return (Rcheck_15);
pragma No_Return (Rcheck_16);
pragma No_Return (Rcheck_17);
pragma No_Return (Rcheck_18);
pragma No_Return (Rcheck_19);
pragma No_Return (Rcheck_20);
pragma No_Return (Rcheck_21);
pragma No_Return (Rcheck_22);
pragma No_Return (Rcheck_23);
pragma No_Return (Rcheck_24);
pragma No_Return (Rcheck_25);
pragma No_Return (Rcheck_26);
pragma No_Return (Rcheck_27);
pragma No_Return (Rcheck_28);
pragma No_Return (Rcheck_29);
pragma No_Return (Rcheck_30);
pragma No_Return (Rcheck_32);
pragma No_Return (Rcheck_33);
pragma No_Return (Rcheck_34);
pragma No_Return (Rcheck_35);
pragma No_Return (Rcheck_36);
---------------------------------------------
-- Reason Strings for Run-Time Check Calls --
---------------------------------------------
-- These strings are null-terminated and are used by Rcheck_nn. The
-- strings correspond to the definitions for Types.RT_Exception_Code.
use ASCII;
Rmsg_00 : constant String := "access check failed" & NUL;
Rmsg_01 : constant String := "access parameter is null" & NUL;
Rmsg_02 : constant String := "discriminant check failed" & NUL;
Rmsg_03 : constant String := "divide by zero" & NUL;
Rmsg_04 : constant String := "explicit raise" & NUL;
Rmsg_05 : constant String := "index check failed" & NUL;
Rmsg_06 : constant String := "invalid data" & NUL;
Rmsg_07 : constant String := "length check failed" & NUL;
Rmsg_08 : constant String := "null Exception_Id" & NUL;
Rmsg_09 : constant String := "null-exclusion check failed" & NUL;
Rmsg_10 : constant String := "overflow check failed" & NUL;
Rmsg_11 : constant String := "partition check failed" & NUL;
Rmsg_12 : constant String := "range check failed" & NUL;
Rmsg_13 : constant String := "tag check failed" & NUL;
Rmsg_14 : constant String := "access before elaboration" & NUL;
Rmsg_15 : constant String := "accessibility check failed" & NUL;
Rmsg_16 : constant String := "attempt to take address of" &
" intrinsic subprogram" & NUL;
Rmsg_17 : constant String := "aliased parameters" & NUL;
Rmsg_18 : constant String := "all guards closed" & NUL;
Rmsg_19 : constant String := "improper use of generic subtype" &
" with predicate" & NUL;
Rmsg_20 : constant String := "Current_Task referenced in entry" &
" body" & NUL;
Rmsg_21 : constant String := "duplicated entry address" & NUL;
Rmsg_22 : constant String := "explicit raise" & NUL;
Rmsg_23 : constant String := "finalize/adjust raised exception" & NUL;
Rmsg_24 : constant String := "implicit return with No_Return" & NUL;
Rmsg_25 : constant String := "misaligned address value" & NUL;
Rmsg_26 : constant String := "missing return" & NUL;
Rmsg_27 : constant String := "overlaid controlled object" & NUL;
Rmsg_28 : constant String := "potentially blocking operation" & NUL;
Rmsg_29 : constant String := "stubbed subprogram called" & NUL;
Rmsg_30 : constant String := "unchecked union restriction" & NUL;
Rmsg_31 : constant String := "actual/returned class-wide" &
" value not transportable" & NUL;
Rmsg_32 : constant String := "empty storage pool" & NUL;
Rmsg_33 : constant String := "explicit raise" & NUL;
Rmsg_34 : constant String := "infinite recursion" & NUL;
Rmsg_35 : constant String := "object too large" & NUL;
Rmsg_36 : constant String := "stream operation not allowed" & NUL;
-----------------------
-- Polling Interface --
-----------------------
type Unsigned is mod 2 ** 32;
Counter : Unsigned := 0;
pragma Warnings (Off, Counter);
-- This counter is provided for convenience. It can be used in Poll to
-- perform periodic but not systematic operations.
procedure Poll is separate;
-- The actual polling routine is separate, so that it can easily be
-- replaced with a target dependent version.
-------------------
-- EId_To_String --
-------------------
function EId_To_String (X : Exception_Id) return String
renames Stream_Attributes.EId_To_String;
------------------
-- EO_To_String --
------------------
-- We use the null string to represent the null occurrence, otherwise we
-- output the Untailored_Exception_Information string for the occurrence.
function EO_To_String (X : Exception_Occurrence) return String
renames Stream_Attributes.EO_To_String;
------------------------
-- Exception_Identity --
------------------------
function Exception_Identity
(X : Exception_Occurrence) return Exception_Id
is
begin
-- Note that the following test used to be here for the original Ada 95
-- semantics, but these were modified by AI-241 to require returning
-- Null_Id instead of raising Constraint_Error.
-- if X.Id = Null_Id then
-- raise Constraint_Error;
-- end if;
return X.Id;
end Exception_Identity;
---------------------------
-- Exception_Information --
---------------------------
function Exception_Information (X : Exception_Occurrence) return String is
begin
if X.Id = Null_Id then
raise Constraint_Error;
else
return Exception_Data.Exception_Information (X);
end if;
end Exception_Information;
-----------------------
-- Exception_Message --
-----------------------
function Exception_Message (X : Exception_Occurrence) return String is
begin
if X.Id = Null_Id then
raise Constraint_Error;
end if;
return X.Msg (1 .. X.Msg_Length);
end Exception_Message;
--------------------
-- Exception_Name --
--------------------
function Exception_Name (Id : Exception_Id) return String is
begin
if Id = null then
raise Constraint_Error;
end if;
return To_Ptr (Id.Full_Name) (1 .. Id.Name_Length - 1);
end Exception_Name;
function Exception_Name (X : Exception_Occurrence) return String is
begin
return Exception_Name (X.Id);
end Exception_Name;
---------------------------
-- Exception_Name_Simple --
---------------------------
function Exception_Name_Simple (X : Exception_Occurrence) return String is
Name : constant String := Exception_Name (X);
P : Natural;
begin
P := Name'Length;
while P > 1 loop
exit when Name (P - 1) = '.';
P := P - 1;
end loop;
-- Return result making sure lower bound is 1
declare
subtype Rname is String (1 .. Name'Length - P + 1);
begin
return Rname (Name (P .. Name'Length));
end;
end Exception_Name_Simple;
--------------------
-- Exception_Data --
--------------------
package body Exception_Data is separate;
-- This package can be easily dummied out if we do not want the basic
-- support for exception messages (such as in Ada 83).
----------------------
-- Exception_Traces --
----------------------
package body Exception_Traces is separate;
-- Depending on the underlying support for IO the implementation will
-- differ. Moreover we would like to dummy out this package in case we do
-- not want any exception tracing support. This is why this package is
-- separated.
-----------------------
-- Stream Attributes --
-----------------------
package body Stream_Attributes is separate;
-- This package can be easily dummied out if we do not want the
-- support for streaming Exception_Ids and Exception_Occurrences.
-----------------------------
-- Process_Raise_Exception --
-----------------------------
procedure Process_Raise_Exception (E : Exception_Id) is
pragma Inspection_Point (E);
-- This is so the debugger can reliably inspect the parameter
Jumpbuf_Ptr : constant Address := Get_Jmpbuf_Address.all;
Excep : constant EOA := Get_Current_Excep.all;
procedure builtin_longjmp (buffer : Address; Flag : Integer);
pragma No_Return (builtin_longjmp);
pragma Import (C, builtin_longjmp, "_gnat_builtin_longjmp");
begin
-- WARNING: There should be no exception handler for this body because
-- this would cause gigi to prepend a setup for a new jmpbuf to the
-- sequence of statements in case of built-in sjljl. We would then
-- always get this new buf in Jumpbuf_Ptr instead of the one for the
-- exception we are handling, which would completely break the whole
-- design of this procedure.
-- If the jump buffer pointer is non-null, transfer control using it.
-- Otherwise announce an unhandled exception (note that this means that
-- we have no finalizations to do other than at the outer level).
-- Perform the necessary notification tasks in both cases.
if Jumpbuf_Ptr /= Null_Address then
if not Excep.Exception_Raised then
Excep.Exception_Raised := True;
Exception_Traces.Notify_Handled_Exception (Excep);
end if;
builtin_longjmp (Jumpbuf_Ptr, 1);
else
Exception_Traces.Notify_Unhandled_Exception (Excep);
Exception_Traces.Unhandled_Exception_Terminate (Excep);
end if;
end Process_Raise_Exception;
----------------------------
-- Raise_Constraint_Error --
----------------------------
procedure Raise_Constraint_Error
(File : System.Address;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Constraint_Error_Def'Access, File, Line);
end Raise_Constraint_Error;
--------------------------------
-- Raise_Constraint_Error_Msg --
--------------------------------
procedure Raise_Constraint_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address)
is
begin
Raise_With_Location_And_Msg
(Constraint_Error_Def'Access, File, Line, Msg);
end Raise_Constraint_Error_Msg;
-------------------------
-- Raise_Current_Excep --
-------------------------
procedure Raise_Current_Excep (E : Exception_Id) is
pragma Inspection_Point (E);
-- This is so the debugger can reliably inspect the parameter when
-- inserting a breakpoint at the start of this procedure.
Id : Exception_Id := E;
pragma Volatile (Id);
pragma Warnings (Off, Id);
-- In order to provide support for breakpoints on unhandled exceptions,
-- the debugger will also need to be able to inspect the value of E from
-- another (inner) frame. So we need to make sure that if E is passed in
-- a register, its value is also spilled on stack. For this, we store
-- the parameter value in a local variable, and add a pragma Volatile to
-- make sure it is spilled. The pragma Warnings (Off) is needed because
-- the compiler knows that Id is not referenced and that this use of
-- pragma Volatile is peculiar.
begin
Debug_Raise_Exception (E => SSL.Exception_Data_Ptr (E), Message => "");
Process_Raise_Exception (E);
end Raise_Current_Excep;
---------------------
-- Raise_Exception --
---------------------
procedure Raise_Exception
(E : Exception_Id;
Message : String := "")
is
EF : Exception_Id := E;
Excep : constant EOA := Get_Current_Excep.all;
begin
-- Raise CE if E = Null_ID (AI-446)
if E = null then
EF := Constraint_Error'Identity;
end if;
-- Go ahead and raise appropriate exception
Exception_Data.Set_Exception_Msg (Excep, EF, Message);
Abort_Defer.all;
Raise_Current_Excep (EF);
end Raise_Exception;
----------------------------
-- Raise_Exception_Always --
----------------------------
procedure Raise_Exception_Always
(E : Exception_Id;
Message : String := "")
is
Excep : constant EOA := Get_Current_Excep.all;
begin
Exception_Data.Set_Exception_Msg (Excep, E, Message);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_Exception_Always;
------------------------------
-- Raise_Exception_No_Defer --
------------------------------
procedure Raise_Exception_No_Defer
(E : Exception_Id;
Message : String := "")
is
Excep : constant EOA := Get_Current_Excep.all;
begin
Exception_Data.Set_Exception_Msg (Excep, E, Message);
-- Do not call Abort_Defer.all, as specified by the spec
Raise_Current_Excep (E);
end Raise_Exception_No_Defer;
-------------------------------------
-- Raise_From_Controlled_Operation --
-------------------------------------
procedure Raise_From_Controlled_Operation
(X : Ada.Exceptions.Exception_Occurrence)
is
Prefix : constant String := "adjust/finalize raised ";
Orig_Msg : constant String := Exception_Message (X);
Orig_Prefix_Length : constant Natural :=
Integer'Min (Prefix'Length, Orig_Msg'Length);
Orig_Prefix : String renames Orig_Msg
(Orig_Msg'First .. Orig_Msg'First + Orig_Prefix_Length - 1);
begin
-- Message already has proper prefix, just re-reraise
if Orig_Prefix = Prefix then
Raise_Exception_No_Defer
(E => Program_Error'Identity,
Message => Orig_Msg);
else
declare
New_Msg : constant String := Prefix & Exception_Name (X);
begin
-- No message present, just provide our own
if Orig_Msg = "" then
Raise_Exception_No_Defer
(E => Program_Error'Identity,
Message => New_Msg);
-- Message present, add informational prefix
else
Raise_Exception_No_Defer
(E => Program_Error'Identity,
Message => New_Msg & ": " & Orig_Msg);
end if;
end;
end if;
end Raise_From_Controlled_Operation;
-------------------------------
-- Raise_From_Signal_Handler --
-------------------------------
procedure Raise_From_Signal_Handler
(E : Exception_Id;
M : System.Address)
is
Excep : constant EOA := Get_Current_Excep.all;
begin
Exception_Data.Set_Exception_C_Msg (Excep, E, M);
Abort_Defer.all;
Process_Raise_Exception (E);
end Raise_From_Signal_Handler;
-------------------------
-- Raise_Program_Error --
-------------------------
procedure Raise_Program_Error
(File : System.Address;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Program_Error_Def'Access, File, Line);
end Raise_Program_Error;
-----------------------------
-- Raise_Program_Error_Msg --
-----------------------------
procedure Raise_Program_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address)
is
begin
Raise_With_Location_And_Msg
(Program_Error_Def'Access, File, Line, Msg);
end Raise_Program_Error_Msg;
-------------------------
-- Raise_Storage_Error --
-------------------------
procedure Raise_Storage_Error
(File : System.Address;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Storage_Error_Def'Access, File, Line);
end Raise_Storage_Error;
-----------------------------
-- Raise_Storage_Error_Msg --
-----------------------------
procedure Raise_Storage_Error_Msg
(File : System.Address;
Line : Integer;
Msg : System.Address)
is
begin
Raise_With_Location_And_Msg
(Storage_Error_Def'Access, File, Line, Msg);
end Raise_Storage_Error_Msg;
---------------------------------
-- Raise_With_Location_And_Msg --
---------------------------------
procedure Raise_With_Location_And_Msg
(E : Exception_Id;
F : System.Address;
L : Integer;
M : System.Address := System.Null_Address)
is
Excep : constant EOA := Get_Current_Excep.all;
begin
Exception_Data.Set_Exception_C_Msg (Excep, E, F, L, Msg2 => M);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_With_Location_And_Msg;
--------------------
-- Raise_With_Msg --
--------------------
procedure Raise_With_Msg (E : Exception_Id) is
Excep : constant EOA := Get_Current_Excep.all;
begin
Excep.Exception_Raised := False;
Excep.Id := E;
Excep.Num_Tracebacks := 0;
Excep.Pid := Local_Partition_ID;
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_With_Msg;
-----------------------------------------
-- Calls to Run-Time Check Subprograms --
-----------------------------------------
procedure Rcheck_CE_Access_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_00'Address);
end Rcheck_CE_Access_Check;
procedure Rcheck_CE_Null_Access_Parameter
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_01'Address);
end Rcheck_CE_Null_Access_Parameter;
procedure Rcheck_CE_Discriminant_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_02'Address);
end Rcheck_CE_Discriminant_Check;
procedure Rcheck_CE_Divide_By_Zero
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_03'Address);
end Rcheck_CE_Divide_By_Zero;
procedure Rcheck_CE_Explicit_Raise
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_04'Address);
end Rcheck_CE_Explicit_Raise;
procedure Rcheck_CE_Index_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_05'Address);
end Rcheck_CE_Index_Check;
procedure Rcheck_CE_Invalid_Data
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_06'Address);
end Rcheck_CE_Invalid_Data;
procedure Rcheck_CE_Length_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_07'Address);
end Rcheck_CE_Length_Check;
procedure Rcheck_CE_Null_Exception_Id
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_08'Address);
end Rcheck_CE_Null_Exception_Id;
procedure Rcheck_CE_Null_Not_Allowed
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_09'Address);
end Rcheck_CE_Null_Not_Allowed;
procedure Rcheck_CE_Overflow_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_10'Address);
end Rcheck_CE_Overflow_Check;
procedure Rcheck_CE_Partition_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_11'Address);
end Rcheck_CE_Partition_Check;
procedure Rcheck_CE_Range_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_12'Address);
end Rcheck_CE_Range_Check;
procedure Rcheck_CE_Tag_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Constraint_Error_Msg (File, Line, Rmsg_13'Address);
end Rcheck_CE_Tag_Check;
procedure Rcheck_PE_Access_Before_Elaboration
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_14'Address);
end Rcheck_PE_Access_Before_Elaboration;
procedure Rcheck_PE_Accessibility_Check
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_15'Address);
end Rcheck_PE_Accessibility_Check;
procedure Rcheck_PE_Address_Of_Intrinsic
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_16'Address);
end Rcheck_PE_Address_Of_Intrinsic;
procedure Rcheck_PE_Aliased_Parameters
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_17'Address);
end Rcheck_PE_Aliased_Parameters;
procedure Rcheck_PE_All_Guards_Closed
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_18'Address);
end Rcheck_PE_All_Guards_Closed;
procedure Rcheck_PE_Bad_Predicated_Generic_Type
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_19'Address);
end Rcheck_PE_Bad_Predicated_Generic_Type;
procedure Rcheck_PE_Current_Task_In_Entry_Body
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_20'Address);
end Rcheck_PE_Current_Task_In_Entry_Body;
procedure Rcheck_PE_Duplicated_Entry_Address
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_21'Address);
end Rcheck_PE_Duplicated_Entry_Address;
procedure Rcheck_PE_Explicit_Raise
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_22'Address);
end Rcheck_PE_Explicit_Raise;
procedure Rcheck_PE_Implicit_Return
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_24'Address);
end Rcheck_PE_Implicit_Return;
procedure Rcheck_PE_Misaligned_Address_Value
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_25'Address);
end Rcheck_PE_Misaligned_Address_Value;
procedure Rcheck_PE_Missing_Return
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_26'Address);
end Rcheck_PE_Missing_Return;
procedure Rcheck_PE_Overlaid_Controlled_Object
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_27'Address);
end Rcheck_PE_Overlaid_Controlled_Object;
procedure Rcheck_PE_Potentially_Blocking_Operation
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_28'Address);
end Rcheck_PE_Potentially_Blocking_Operation;
procedure Rcheck_PE_Stubbed_Subprogram_Called
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_29'Address);
end Rcheck_PE_Stubbed_Subprogram_Called;
procedure Rcheck_PE_Unchecked_Union_Restriction
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_30'Address);
end Rcheck_PE_Unchecked_Union_Restriction;
procedure Rcheck_PE_Non_Transportable_Actual
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_31'Address);
end Rcheck_PE_Non_Transportable_Actual;
procedure Rcheck_SE_Empty_Storage_Pool
(File : System.Address; Line : Integer)
is
begin
Raise_Storage_Error_Msg (File, Line, Rmsg_32'Address);
end Rcheck_SE_Empty_Storage_Pool;
procedure Rcheck_SE_Explicit_Raise
(File : System.Address; Line : Integer)
is
begin
Raise_Storage_Error_Msg (File, Line, Rmsg_33'Address);
end Rcheck_SE_Explicit_Raise;
procedure Rcheck_SE_Infinite_Recursion
(File : System.Address; Line : Integer)
is
begin
Raise_Storage_Error_Msg (File, Line, Rmsg_34'Address);
end Rcheck_SE_Infinite_Recursion;
procedure Rcheck_SE_Object_Too_Large
(File : System.Address; Line : Integer)
is
begin
Raise_Storage_Error_Msg (File, Line, Rmsg_35'Address);
end Rcheck_SE_Object_Too_Large;
procedure Rcheck_PE_Stream_Operation_Not_Allowed
(File : System.Address; Line : Integer)
is
begin
Raise_Program_Error_Msg (File, Line, Rmsg_36'Address);
end Rcheck_PE_Stream_Operation_Not_Allowed;
procedure Rcheck_PE_Finalize_Raised_Exception
(File : System.Address; Line : Integer)
is
E : constant Exception_Id := Program_Error_Def'Access;
Excep : constant EOA := Get_Current_Excep.all;
begin
-- This is "finalize/adjust raised exception". This subprogram is always
-- called with abort deferred, unlike all other Rcheck_* subprograms,
-- itneeds to call Raise_Exception_No_Defer.
-- This is consistent with Raise_From_Controlled_Operation
Exception_Data.Set_Exception_C_Msg (Excep, E, File, Line, 0,
Rmsg_23'Address);
Raise_Current_Excep (E);
end Rcheck_PE_Finalize_Raised_Exception;
procedure Rcheck_00 (File : System.Address; Line : Integer)
renames Rcheck_CE_Access_Check;
procedure Rcheck_01 (File : System.Address; Line : Integer)
renames Rcheck_CE_Null_Access_Parameter;
procedure Rcheck_02 (File : System.Address; Line : Integer)
renames Rcheck_CE_Discriminant_Check;
procedure Rcheck_03 (File : System.Address; Line : Integer)
renames Rcheck_CE_Divide_By_Zero;
procedure Rcheck_04 (File : System.Address; Line : Integer)
renames Rcheck_CE_Explicit_Raise;
procedure Rcheck_05 (File : System.Address; Line : Integer)
renames Rcheck_CE_Index_Check;
procedure Rcheck_06 (File : System.Address; Line : Integer)
renames Rcheck_CE_Invalid_Data;
procedure Rcheck_07 (File : System.Address; Line : Integer)
renames Rcheck_CE_Length_Check;
procedure Rcheck_08 (File : System.Address; Line : Integer)
renames Rcheck_CE_Null_Exception_Id;
procedure Rcheck_09 (File : System.Address; Line : Integer)
renames Rcheck_CE_Null_Not_Allowed;
procedure Rcheck_10 (File : System.Address; Line : Integer)
renames Rcheck_CE_Overflow_Check;
procedure Rcheck_11 (File : System.Address; Line : Integer)
renames Rcheck_CE_Partition_Check;
procedure Rcheck_12 (File : System.Address; Line : Integer)
renames Rcheck_CE_Range_Check;
procedure Rcheck_13 (File : System.Address; Line : Integer)
renames Rcheck_CE_Tag_Check;
procedure Rcheck_14 (File : System.Address; Line : Integer)
renames Rcheck_PE_Access_Before_Elaboration;
procedure Rcheck_15 (File : System.Address; Line : Integer)
renames Rcheck_PE_Accessibility_Check;
procedure Rcheck_16 (File : System.Address; Line : Integer)
renames Rcheck_PE_Address_Of_Intrinsic;
procedure Rcheck_17 (File : System.Address; Line : Integer)
renames Rcheck_PE_Aliased_Parameters;
procedure Rcheck_18 (File : System.Address; Line : Integer)
renames Rcheck_PE_All_Guards_Closed;
procedure Rcheck_19 (File : System.Address; Line : Integer)
renames Rcheck_PE_Bad_Predicated_Generic_Type;
procedure Rcheck_20 (File : System.Address; Line : Integer)
renames Rcheck_PE_Current_Task_In_Entry_Body;
procedure Rcheck_21 (File : System.Address; Line : Integer)
renames Rcheck_PE_Duplicated_Entry_Address;
procedure Rcheck_22 (File : System.Address; Line : Integer)
renames Rcheck_PE_Explicit_Raise;
procedure Rcheck_23 (File : System.Address; Line : Integer)
renames Rcheck_PE_Finalize_Raised_Exception;
procedure Rcheck_24 (File : System.Address; Line : Integer)
renames Rcheck_PE_Implicit_Return;
procedure Rcheck_25 (File : System.Address; Line : Integer)
renames Rcheck_PE_Misaligned_Address_Value;
procedure Rcheck_26 (File : System.Address; Line : Integer)
renames Rcheck_PE_Missing_Return;
procedure Rcheck_27 (File : System.Address; Line : Integer)
renames Rcheck_PE_Overlaid_Controlled_Object;
procedure Rcheck_28 (File : System.Address; Line : Integer)
renames Rcheck_PE_Potentially_Blocking_Operation;
procedure Rcheck_29 (File : System.Address; Line : Integer)
renames Rcheck_PE_Stubbed_Subprogram_Called;
procedure Rcheck_30 (File : System.Address; Line : Integer)
renames Rcheck_PE_Unchecked_Union_Restriction;
procedure Rcheck_31 (File : System.Address; Line : Integer)
renames Rcheck_PE_Non_Transportable_Actual;
procedure Rcheck_32 (File : System.Address; Line : Integer)
renames Rcheck_SE_Empty_Storage_Pool;
procedure Rcheck_33 (File : System.Address; Line : Integer)
renames Rcheck_SE_Explicit_Raise;
procedure Rcheck_34 (File : System.Address; Line : Integer)
renames Rcheck_SE_Infinite_Recursion;
procedure Rcheck_35 (File : System.Address; Line : Integer)
renames Rcheck_SE_Object_Too_Large;
procedure Rcheck_36 (File : System.Address; Line : Integer)
renames Rcheck_PE_Stream_Operation_Not_Allowed;
-------------
-- Reraise --
-------------
procedure Reraise is
Excep : constant EOA := Get_Current_Excep.all;
begin
Abort_Defer.all;
Raise_Current_Excep (Excep.Id);
end Reraise;
--------------------------------------
-- Reraise_Library_Exception_If_Any --
--------------------------------------
procedure Reraise_Library_Exception_If_Any is
LE : Exception_Occurrence;
begin
if Library_Exception_Set then
LE := Library_Exception;
Raise_From_Controlled_Operation (LE);
end if;
end Reraise_Library_Exception_If_Any;
------------------------
-- Reraise_Occurrence --
------------------------
procedure Reraise_Occurrence (X : Exception_Occurrence) is
begin
if X.Id /= null then
Abort_Defer.all;
Save_Occurrence (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end if;
end Reraise_Occurrence;
-------------------------------
-- Reraise_Occurrence_Always --
-------------------------------
procedure Reraise_Occurrence_Always (X : Exception_Occurrence) is
begin
Abort_Defer.all;
Save_Occurrence (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end Reraise_Occurrence_Always;
---------------------------------
-- Reraise_Occurrence_No_Defer --
---------------------------------
procedure Reraise_Occurrence_No_Defer (X : Exception_Occurrence) is
begin
Save_Occurrence (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end Reraise_Occurrence_No_Defer;
---------------------
-- Save_Occurrence --
---------------------
procedure Save_Occurrence
(Target : out Exception_Occurrence;
Source : Exception_Occurrence)
is
begin
Target.Id := Source.Id;
Target.Msg_Length := Source.Msg_Length;
Target.Num_Tracebacks := Source.Num_Tracebacks;
Target.Pid := Source.Pid;
Target.Msg (1 .. Target.Msg_Length) :=
Source.Msg (1 .. Target.Msg_Length);
Target.Tracebacks (1 .. Target.Num_Tracebacks) :=
Source.Tracebacks (1 .. Target.Num_Tracebacks);
end Save_Occurrence;
function Save_Occurrence (Source : Exception_Occurrence) return EOA is
Target : constant EOA := new Exception_Occurrence;
begin
Save_Occurrence (Target.all, Source);
return Target;
end Save_Occurrence;
-------------------
-- String_To_EId --
-------------------
function String_To_EId (S : String) return Exception_Id
renames Stream_Attributes.String_To_EId;
------------------
-- String_To_EO --
------------------
function String_To_EO (S : String) return Exception_Occurrence
renames Stream_Attributes.String_To_EO;
---------------
-- To_Stderr --
---------------
procedure To_Stderr (C : Character) is
type int is new Integer;
procedure put_char_stderr (C : int);
pragma Import (C, put_char_stderr, "put_char_stderr");
begin
put_char_stderr (Character'Pos (C));
end To_Stderr;
procedure To_Stderr (S : String) is
begin
for J in S'Range loop
if S (J) /= ASCII.CR then
To_Stderr (S (J));
end if;
end loop;
end To_Stderr;
-------------------------
-- Transfer_Occurrence --
-------------------------
procedure Transfer_Occurrence
(Target : Exception_Occurrence_Access;
Source : Exception_Occurrence)
is
begin
Save_Occurrence (Target.all, Source);
end Transfer_Occurrence;
------------------------
-- Triggered_By_Abort --
------------------------
function Triggered_By_Abort return Boolean is
Ex : constant Exception_Occurrence_Access := Get_Current_Excep.all;
begin
return Ex /= null
and then Exception_Identity (Ex.all) = Standard'Abort_Signal'Identity;
end Triggered_By_Abort;
end Ada.Exceptions;
|
oeis/246/A246923.asm | neoneye/loda-programs | 11 | 3626 | ; A246923: G.f.: 1 / AGM(1-9*x, sqrt((1-x)*(1-81*x))).
; Submitted by <NAME>
; 1,25,1089,60025,3690241,241025625,16359689025,1140463805625,81081830657025,5852177325225625,427465780890020929,31528177440967935225,2344153069158724611841,175473167541934734763225,13211212029033949825064769,999630716942846408773325625,75966992310311576135500673025,5795247077241777131651666105625,443600966249763118969430099369025,34058741734634371280316203278325625,2622083368452607811311290777079842561,202363321362667198691611594960676360025,15652581628007796094483554530069904972609
seq $0,84771 ; Coefficients of expansion of 1/sqrt(1 - 10*x + 9*x^2); also, a(n) is the central coefficient of (1 + 5*x + 4*x^2)^n.
pow $0,2
|
alloy4fun_models/trashltl/models/5/E6fcZ6H7Go8n7sEJ7.als | Kaixi26/org.alloytools.alloy | 0 | 2343 | open main
pred idE6fcZ6H7Go8n7sEJ7_prop6 {
some f : File | always f in Trash since eventually f in Trash
}
pred __repair { idE6fcZ6H7Go8n7sEJ7_prop6 }
check __repair { idE6fcZ6H7Go8n7sEJ7_prop6 <=> prop6o } |
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2_notsx.log_1226_550.asm | ljhsiun2/medusa | 9 | 26135 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xa8d6, %rbx
nop
nop
nop
add $55301, %rsi
movb (%rbx), %al
nop
nop
nop
cmp $42374, %rdi
lea addresses_normal_ht+0x42d6, %rsi
lea addresses_UC_ht+0x12d93, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
add $39825, %r10
mov $68, %rcx
rep movsq
sub %rax, %rax
lea addresses_WC_ht+0x82d6, %rsi
lea addresses_WT_ht+0xba96, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
add %rbp, %rbp
mov $126, %rcx
rep movsw
nop
nop
nop
xor %rbx, %rbx
lea addresses_normal_ht+0x22d6, %rsi
lea addresses_UC_ht+0x116d6, %rdi
nop
nop
xor %r14, %r14
mov $63, %rcx
rep movsb
nop
xor $39203, %r14
lea addresses_D_ht+0x9d98, %rsi
lea addresses_WC_ht+0x91d6, %rdi
nop
dec %rax
mov $74, %rcx
rep movsq
nop
nop
nop
inc %rsi
lea addresses_normal_ht+0x11656, %rsi
lea addresses_D_ht+0x12d6, %rdi
clflush (%rdi)
nop
cmp %rbp, %rbp
mov $60, %rcx
rep movsl
dec %rbp
lea addresses_D_ht+0x1dcb0, %rsi
nop
nop
nop
nop
and %rbp, %rbp
mov (%rsi), %cx
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0x1a50e, %r10
nop
nop
nop
nop
nop
and %rbp, %rbp
vmovups (%r10), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %r14
nop
nop
inc %r14
lea addresses_UC_ht+0x7b98, %rsi
lea addresses_WC_ht+0x32d6, %rdi
inc %rax
mov $115, %rcx
rep movsq
nop
xor $51913, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r8
push %rax
push %rcx
push %rsi
// Load
lea addresses_WT+0x3ad6, %r14
nop
sub %r11, %r11
mov (%r14), %ax
nop
add $9503, %r14
// Store
lea addresses_A+0x2ad6, %r11
nop
add $40553, %rcx
movb $0x51, (%r11)
nop
sub $56260, %r8
// Store
lea addresses_WT+0xf92e, %r8
nop
nop
nop
add %r14, %r14
movb $0x51, (%r8)
nop
nop
nop
nop
nop
dec %rax
// Store
lea addresses_WT+0x3ad6, %r8
nop
nop
nop
nop
xor $11071, %rcx
mov $0x5152535455565758, %r13
movq %r13, (%r8)
sub $15811, %rax
// Store
lea addresses_WC+0xb46e, %r8
nop
nop
nop
inc %r11
mov $0x5152535455565758, %r14
movq %r14, (%r8)
add %r13, %r13
// Store
lea addresses_WT+0x13a56, %r13
nop
nop
sub $50839, %rsi
mov $0x5152535455565758, %r11
movq %r11, (%r13)
xor %rax, %rax
// Load
lea addresses_PSE+0x130d6, %r14
nop
nop
nop
nop
nop
sub $2779, %r11
movups (%r14), %xmm1
vpextrq $1, %xmm1, %rsi
nop
nop
nop
nop
nop
add $5830, %rcx
// Store
lea addresses_WT+0x6436, %rsi
nop
nop
nop
and %r14, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm4
movups %xmm4, (%rsi)
nop
add $22932, %rcx
// Faulty Load
lea addresses_WT+0x3ad6, %rsi
nop
nop
nop
nop
and $65079, %rax
mov (%rsi), %r8w
lea oracles, %rsi
and $0xff, %r8
shlq $12, %r8
mov (%rsi,%r8,1), %r8
pop %rsi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}}
{'58': 1226}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
Cubical/Foundations/GroupoidLaws.agda | cj-xu/cubical | 0 | 12544 | {-
This file proves the higher groupoid structure of types
for homogeneous and heterogeneous paths
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.GroupoidLaws where
open import Cubical.Foundations.Prelude
private
variable
ℓ : Level
A : Type ℓ
x y z w : A
_⁻¹ : (x ≡ y) → (y ≡ x)
x≡y ⁻¹ = sym x≡y
infix 40 _⁻¹
-- homogeneous groupoid laws
symInvo : (p : x ≡ y) → p ≡ p ⁻¹ ⁻¹
symInvo p = refl
rUnit : (p : x ≡ y) → p ≡ p ∙ refl
rUnit p j i = compPath-filler p refl j i
-- The filler of left unit: lUnit-filler p =
-- PathP (λ i → PathP (λ j → PathP (λ k → A) x (p (~ j ∨ i)))
-- (refl i) (λ j → compPath-filler refl p i j)) (λ k i → (p (~ k ∧ i ))) (lUnit p)
lUnit-filler : {x y : A} (p : x ≡ y) → I → I → I → A
lUnit-filler {x = x} p j k i =
hfill (λ j → λ { (i = i0) → x
; (i = i1) → p (~ k ∨ j )
; (k = i0) → p i
-- ; (k = i1) → compPath-filler refl p j i
}) (inS (p (~ k ∧ i ))) j
lUnit : (p : x ≡ y) → p ≡ refl ∙ p
lUnit p j i = lUnit-filler p i1 j i
symRefl : refl {x = x} ≡ refl ⁻¹
symRefl i = refl
compPathRefl : refl {x = x} ≡ refl ∙ refl
compPathRefl = rUnit refl
-- The filler of right cancellation: rCancel-filler p =
-- PathP (λ i → PathP (λ j → PathP (λ k → A) x (p (~ j ∧ ~ i)))
-- (λ j → compPath-filler p (p ⁻¹) i j) (refl i)) (λ j i → (p (i ∧ ~ j))) (rCancel p)
rCancel-filler : ∀ {x y : A} (p : x ≡ y) → (k j i : I) → A
rCancel-filler {x = x} p k j i =
hfill (λ k → λ { (i = i0) → x
; (i = i1) → p (~ k ∧ ~ j)
-- ; (j = i0) → compPath-filler p (p ⁻¹) k i
; (j = i1) → x
}) (inS (p (i ∧ ~ j))) k
rCancel : (p : x ≡ y) → p ∙ p ⁻¹ ≡ refl
rCancel {x = x} p j i = rCancel-filler p i1 j i
lCancel : (p : x ≡ y) → p ⁻¹ ∙ p ≡ refl
lCancel p = rCancel (p ⁻¹)
-- The filler of the three-out-of-four identification: 3outof4-filler α p β =
-- PathP (λ i → PathP (λ j → PathP (λ k → A) (α i i0) (α i i1))
-- (λ j → α i j) (λ j → β i j)) (λ j i → α i0 i) (3outof4 α p β)
3outof4-filler : (α : I → I → A) → (p : α i1 i0 ≡ α i1 i1) →
(β : PathP (λ j → Path A (α j i0) (α j i1)) (λ i → α i0 i) p) → I → I → I → A
3outof4-filler α p β k j i =
hfill (λ k → λ { (i = i0) → α k i0
; (i = i1) → α k i1
; (j = i0) → α k i
; (j = i1) → β k i
}) (inS (α i0 i)) k
3outof4 : (α : I → I → A) → (p : α i1 i0 ≡ α i1 i1) →
(β : PathP (λ j → Path A (α j i0) (α j i1)) (λ i → α i0 i) p) → (λ i → α i1 i) ≡ p
3outof4 α p β j i = 3outof4-filler α p β i1 j i
-- The filler of the pre-associative square: preassoc p q r =
-- PathP (λ i → PathP (λ j → PathP (λ k → A) x (compPath-filler q r i j))
-- (refl i) (λ j → compPath-filler (p ∙ q) r i j)) (λ j i → compPath-filler p q j i) (preassoc p q r)
preassoc-filler : {x y z w : A} (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) → I → I → I → A
preassoc-filler {x = x} p q r k j i =
hfill (λ k → λ { (i = i0) → x
; (i = i1) → compPath-filler q r k j
; (j = i0) → p i
-- ; (j = i1) → compPath-filler (p ∙ q) r k i
}) (inS (compPath-filler p q j i)) k
preassoc : (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) →
PathP (λ j → Path A x ((q ∙ r) j)) p ((p ∙ q) ∙ r)
preassoc {x = x} p q r j i = preassoc-filler p q r i1 j i
assoc : (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) →
p ∙ q ∙ r ≡ (p ∙ q) ∙ r
assoc p q r = 3outof4 (compPath-filler p (q ∙ r)) ((p ∙ q) ∙ r) (preassoc p q r)
-- heterogeneous groupoid laws
symInvoP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) →
PathP (λ j → PathP (λ i → symInvo (λ i → A i) j i) x y) p (symP (symP p))
symInvoP p = refl
rUnitP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) →
PathP (λ j → PathP (λ i → rUnit (λ i → A i) j i) x y) p (compPathP p refl)
rUnitP p j i = compPathP-filler p refl i j
lUnitP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) →
PathP (λ j → PathP (λ i → lUnit (λ i → A i) j i) x y) p (compPathP refl p)
lUnitP {A = A} {x = x} p k i =
comp (λ j → lUnit-filler (λ i → A i) j k i)
(λ j → λ { (i = i0) → x
; (i = i1) → p (~ k ∨ j )
; (k = i0) → p i
}) (p (~ k ∧ i ))
rCancelP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) →
PathP (λ j → PathP (λ i → rCancel (λ i → A i) j i) x x) (compPathP p (symP p)) refl
rCancelP {A = A} {x = x} p j i =
comp (λ k → rCancel-filler (λ i → A i) k j i)
(λ k → λ { (i = i0) → x
; (i = i1) → p (~ k ∧ ~ j)
; (j = i1) → x
}) (p (i ∧ ~ j))
lCancelP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) →
PathP (λ j → PathP (λ i → lCancel (λ i → A i) j i) y y) (compPathP (symP p) p) refl
lCancelP p = rCancelP (symP p)
3outof4P : {A : I → I → Type ℓ} {P : (A i0 i1) ≡ (A i1 i1)}
{B : PathP (λ j → Path (Type ℓ) (A i0 j) (A i1 j)) (λ i → A i i0) P}
(α : ∀ (i j : I) → A j i)
(p : PathP (λ i → P i) (α i1 i0) (α i1 i1)) →
(β : PathP (λ j → PathP (λ i → B j i) (α j i0) (α j i1)) (λ i → α i0 i) p) →
PathP (λ j → PathP (λ i → 3outof4 (λ j i → A i j) P B j i) (α i1 i0) (α i1 i1)) (λ i → α i1 i) p
3outof4P {A = A} {P} {B} α p β j i =
comp (λ k → 3outof4-filler (λ j i → A i j) P B k j i)
(λ k → λ { (i = i0) → α k i0
; (i = i1) → α k i1
; (j = i0) → α k i
; (j = i1) → β k i
}) (α i0 i)
preassocP : {A : I → Type ℓ} {x : A i0} {y : A i1} {B_i1 : Type ℓ} {B : (A i1) ≡ B_i1} {z : B i1}
{C_i1 : Type ℓ} {C : (B i1) ≡ C_i1} {w : C i1} (p : PathP A x y) (q : PathP (λ i → B i) y z) (r : PathP (λ i → C i) z w) →
PathP (λ j → PathP (λ i → preassoc (λ i → A i) B C j i) x ((compPathP q r) j)) p (compPathP (compPathP p q) r)
preassocP {A = A} {x = x} {B = B} {C = C} p q r j i =
comp (λ k → preassoc-filler (λ i → A i) B C k j i)
(λ k → λ { (i = i0) → x
; (i = i1) → compPathP-filler q r j k
; (j = i0) → p i
-- ; (j = i1) → compPathP-filler (compPathP p q) r i k
}) (compPathP-filler p q i j)
assocP : {A : I → Type ℓ} {x : A i0} {y : A i1} {B_i1 : Type ℓ} {B : (A i1) ≡ B_i1} {z : B i1}
{C_i1 : Type ℓ} {C : (B i1) ≡ C_i1} {w : C i1} (p : PathP A x y) (q : PathP (λ i → B i) y z) (r : PathP (λ i → C i) z w) →
PathP (λ j → PathP (λ i → assoc (λ i → A i) B C j i) x w) (compPathP p (compPathP q r)) (compPathP (compPathP p q) r)
assocP p q r =
3outof4P (λ i j → compPathP-filler p (compPathP q r) j i) (compPathP (compPathP p q) r) (preassocP p q r)
-- Loic's code below
-- simultaneaous composition on both sides of a path
doubleCompPath-filler : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z →
I → I → A
doubleCompPath-filler p q r i =
hfill (λ t → λ { (i = i0) → p (~ t)
; (i = i1) → r t })
(inS (q i))
doubleCompPath : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z → w ≡ z
doubleCompPath p q r i = doubleCompPath-filler p q r i i1
_∙∙_∙∙_ : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z → w ≡ z
p ∙∙ q ∙∙ r = doubleCompPath p q r
-- some exchange law for doubleCompPath and refl
rhombus-filler : {ℓ : Level} {A : Type ℓ} {x y z : A} (p : x ≡ y) (q : y ≡ z) → I → I → A
rhombus-filler p q i j =
hcomp (λ t → λ { (i = i0) → p (~ t ∨ j)
; (i = i1) → q (t ∧ j)
; (j = i0) → p (~ t ∨ i)
; (j = i1) → q (t ∧ i) })
(p i1)
leftright : {ℓ : Level} {A : Type ℓ} {x y z : A} (p : x ≡ y) (q : y ≡ z) →
(refl ∙∙ p ∙∙ q) ≡ (p ∙∙ q ∙∙ refl)
leftright p q i j =
hcomp (λ t → λ { (j = i0) → p (i ∧ (~ t))
; (j = i1) → q (t ∨ i) })
(rhombus-filler p q i j)
-- equating doubleCompPath and a succession of two compPath
split-leftright : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) →
(p ∙∙ q ∙∙ r) ≡ (refl ∙∙ (p ∙∙ q ∙∙ refl) ∙∙ r)
split-leftright p q r i j =
hcomp (λ t → λ { (j = i0) → p (~ i ∧ ~ t)
; (j = i1) → r t })
(doubleCompPath-filler p q refl j i)
split-leftright' : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) →
(p ∙∙ q ∙∙ r) ≡ (p ∙∙ (refl ∙∙ q ∙∙ r) ∙∙ refl)
split-leftright' p q r i j =
hcomp (λ t → λ { (j = i0) → p (~ t)
; (j = i1) → r (i ∨ t) })
(doubleCompPath-filler refl q r j i)
doubleCompPath-elim : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y)
(r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ (p ∙ q) ∙ r
doubleCompPath-elim p q r = (split-leftright p q r) ∙ (λ i → (leftright p q (~ i)) ∙ r)
doubleCompPath-elim' : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y)
(r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ p ∙ (q ∙ r)
doubleCompPath-elim' p q r = (split-leftright' p q r) ∙ (sym (leftright p (q ∙ r)))
-- deducing associativity for compPath
-- assoc : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) →
-- (p ∙ q) ∙ r ≡ p ∙ (q ∙ r)
-- assoc p q r = (sym (doubleCompPath-elim p q r)) ∙ (doubleCompPath-elim' p q r)
hcomp-unique : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) →
(h2 : ∀ i → A [ (φ ∨ ~ i) ↦ (\ { (φ = i1) → u i 1=1; (i = i0) → outS u0}) ])
→ (hcomp u (outS u0) ≡ outS (h2 i1)) [ φ ↦ (\ { (φ = i1) → (\ i → u i1 1=1)}) ]
hcomp-unique {φ = φ} u u0 h2 = inS (\ i → hcomp (\ k → \ { (φ = i1) → u k 1=1
; (i = i1) → outS (h2 k) })
(outS u0))
lid-unique : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) →
(h1 h2 : ∀ i → A [ (φ ∨ ~ i) ↦ (\ { (φ = i1) → u i 1=1; (i = i0) → outS u0}) ])
→ (outS (h1 i1) ≡ outS (h2 i1)) [ φ ↦ (\ { (φ = i1) → (\ i → u i1 1=1)}) ]
lid-unique {φ = φ} u u0 h1 h2 = inS (\ i → hcomp (\ k → \ { (φ = i1) → u k 1=1
; (i = i0) → outS (h1 k)
; (i = i1) → outS (h2 k) })
(outS u0))
transp-hcomp : ∀ {ℓ} (φ : I) {A' : Set ℓ}
(A : (i : I) → Set ℓ [ φ ↦ (λ _ → A') ]) (let B = \ (i : I) → outS (A i))
→ ∀ {ψ} (u : I → Partial ψ (B i0)) → (u0 : B i0 [ ψ ↦ u i0 ]) →
(transp B φ (hcomp u (outS u0)) ≡ hcomp (\ i o → transp B φ (u i o)) (transp B φ (outS u0)))
[ ψ ↦ (\ { (ψ = i1) → (\ i → transp B φ (u i1 1=1))}) ]
transp-hcomp φ A u u0 = inS (sym (outS (hcomp-unique
((\ i o → transp B φ (u i o))) (inS (transp B φ (outS u0)))
\ i → inS (transp B φ (hfill u u0 i)))))
where
B = \ (i : I) → outS (A i)
hcomp-cong : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) →
(u' : I → Partial φ A) → (u0' : A [ φ ↦ u' i0 ]) →
(ueq : ∀ i → PartialP φ (\ o → u i o ≡ u' i o)) → (outS u0 ≡ outS u0') [ φ ↦ (\ { (φ = i1) → ueq i0 1=1}) ]
→ (hcomp u (outS u0) ≡ hcomp u' (outS u0')) [ φ ↦ (\ { (φ = i1) → ueq i1 1=1 }) ]
hcomp-cong u u0 u' u0' ueq 0eq = inS (\ j → hcomp (\ i o → ueq i o j) (outS 0eq j))
squeezeSq≡
: ∀{w x y z : A}
→ (p : w ≡ y) (q : w ≡ x) (r : y ≡ z) (s : x ≡ z)
→ (q ≡ p ∙∙ r ∙∙ sym s) ≡ (Square p q r s)
squeezeSq≡ p q r s k
= Square
(λ j → p (j ∧ k))
q
(λ j → doubleCompPath-filler p r (sym s) j (~ k))
(λ j → s (j ∧ k))
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0.log_104_1340.asm | ljhsiun2/medusa | 9 | 163421 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %r8
push %rcx
lea addresses_UC_ht+0x15eff, %r12
clflush (%r12)
nop
nop
nop
nop
nop
add %r11, %r11
movb (%r12), %r13b
nop
nop
nop
nop
nop
sub $30829, %r14
lea addresses_WC_ht+0x14327, %r8
nop
nop
and $5786, %r13
mov (%r8), %ecx
nop
nop
nop
nop
nop
add %r12, %r12
pop %rcx
pop %r8
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r15
push %r8
push %rdi
push %rdx
// Store
lea addresses_PSE+0x64ff, %rdx
nop
cmp $21012, %r8
movw $0x5152, (%rdx)
nop
nop
add %r10, %r10
// Store
lea addresses_WC+0x7aff, %rdx
xor $6380, %r13
movl $0x51525354, (%rdx)
add $29159, %r13
// Load
lea addresses_A+0x442f, %r14
nop
nop
nop
inc %rdi
vmovups (%r14), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %r10
nop
nop
nop
add %rdx, %rdx
// Load
lea addresses_RW+0x11eff, %rdi
nop
nop
nop
nop
add %r15, %r15
mov (%rdi), %r13
nop
dec %r14
// Store
lea addresses_WC+0xeb27, %r10
clflush (%r10)
nop
sub %rdx, %rdx
movl $0x51525354, (%r10)
nop
nop
nop
nop
nop
dec %rdx
// Faulty Load
lea addresses_PSE+0x64ff, %r8
nop
nop
nop
nop
add %r13, %r13
mov (%r8), %r14w
lea oracles, %r8
and $0xff, %r14
shlq $12, %r14
mov (%r8,%r14,1), %r14
pop %rdx
pop %rdi
pop %r8
pop %r15
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC', 'AVXalign': False, 'size': 4}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_A', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_RW', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC', 'AVXalign': False, 'size': 4}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'}
{'52': 104}
52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
*/
|
source/nodes/program-nodes-select_statements.adb | optikos/oasis | 0 | 9053 | -- Copyright (c) 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Select_Statements is
function Create
(Select_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Paths : not null Program.Elements.Select_Paths
.Select_Path_Vector_Access;
Then_Token : Program.Lexical_Elements.Lexical_Element_Access;
Abort_Token : Program.Lexical_Elements.Lexical_Element_Access;
Then_Abort_Statements : Program.Element_Vectors.Element_Vector_Access;
Else_Token : Program.Lexical_Elements.Lexical_Element_Access;
Else_Statements : Program.Element_Vectors.Element_Vector_Access;
End_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Select_Token_2 : not null Program.Lexical_Elements
.Lexical_Element_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Select_Statement is
begin
return Result : Select_Statement :=
(Select_Token => Select_Token, Paths => Paths,
Then_Token => Then_Token, Abort_Token => Abort_Token,
Then_Abort_Statements => Then_Abort_Statements,
Else_Token => Else_Token, Else_Statements => Else_Statements,
End_Token => End_Token, Select_Token_2 => Select_Token_2,
Semicolon_Token => Semicolon_Token, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Paths : not null Program.Elements.Select_Paths
.Select_Path_Vector_Access;
Then_Abort_Statements : Program.Element_Vectors.Element_Vector_Access;
Else_Statements : Program.Element_Vectors.Element_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Select_Statement is
begin
return Result : Implicit_Select_Statement :=
(Paths => Paths, Then_Abort_Statements => Then_Abort_Statements,
Else_Statements => Else_Statements,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Paths
(Self : Base_Select_Statement)
return not null Program.Elements.Select_Paths
.Select_Path_Vector_Access is
begin
return Self.Paths;
end Paths;
overriding function Then_Abort_Statements
(Self : Base_Select_Statement)
return Program.Element_Vectors.Element_Vector_Access is
begin
return Self.Then_Abort_Statements;
end Then_Abort_Statements;
overriding function Else_Statements
(Self : Base_Select_Statement)
return Program.Element_Vectors.Element_Vector_Access is
begin
return Self.Else_Statements;
end Else_Statements;
overriding function Select_Token
(Self : Select_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Select_Token;
end Select_Token;
overriding function Then_Token
(Self : Select_Statement)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Then_Token;
end Then_Token;
overriding function Abort_Token
(Self : Select_Statement)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Abort_Token;
end Abort_Token;
overriding function Else_Token
(Self : Select_Statement)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Else_Token;
end Else_Token;
overriding function End_Token
(Self : Select_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.End_Token;
end End_Token;
overriding function Select_Token_2
(Self : Select_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Select_Token_2;
end Select_Token_2;
overriding function Semicolon_Token
(Self : Select_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Select_Statement)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Select_Statement)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Select_Statement)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : aliased in out Base_Select_Statement'Class) is
begin
for Item in Self.Paths.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
for Item in Self.Then_Abort_Statements.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
for Item in Self.Else_Statements.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Select_Statement_Element
(Self : Base_Select_Statement)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Select_Statement_Element;
overriding function Is_Statement_Element
(Self : Base_Select_Statement)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Statement_Element;
overriding procedure Visit
(Self : not null access Base_Select_Statement;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Select_Statement (Self);
end Visit;
overriding function To_Select_Statement_Text
(Self : aliased in out Select_Statement)
return Program.Elements.Select_Statements.Select_Statement_Text_Access is
begin
return Self'Unchecked_Access;
end To_Select_Statement_Text;
overriding function To_Select_Statement_Text
(Self : aliased in out Implicit_Select_Statement)
return Program.Elements.Select_Statements.Select_Statement_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Select_Statement_Text;
end Program.Nodes.Select_Statements;
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_486.asm | ljhsiun2/medusa | 9 | 175522 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x2bc1, %r15
nop
nop
add $16756, %rbx
movl $0x61626364, (%r15)
nop
nop
nop
nop
nop
cmp $15107, %rbp
lea addresses_D_ht+0x6d61, %rsi
lea addresses_normal_ht+0x9971, %rdi
nop
nop
nop
and %r13, %r13
mov $42, %rcx
rep movsq
nop
nop
nop
cmp %r12, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
// Store
lea addresses_WC+0x15d41, %rcx
nop
nop
nop
and %rax, %rax
movw $0x5152, (%rcx)
nop
nop
nop
add $13214, %rbx
// Store
lea addresses_WC+0x15d41, %r15
nop
nop
nop
nop
add %rdi, %rdi
mov $0x5152535455565758, %rbx
movq %rbx, (%r15)
nop
nop
nop
sub %rbx, %rbx
// Store
lea addresses_PSE+0xeb41, %rbx
nop
nop
nop
nop
nop
and %r13, %r13
mov $0x5152535455565758, %rdi
movq %rdi, %xmm7
movups %xmm7, (%rbx)
nop
nop
nop
nop
nop
inc %rdi
// Faulty Load
lea addresses_WC+0x15d41, %rax
clflush (%rax)
nop
nop
nop
cmp %r13, %r13
mov (%rax), %ecx
lea oracles, %rdi
and $0xff, %rcx
shlq $12, %rcx
mov (%rdi,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}}
{'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
*/
|
programs/oeis/153/A153465.asm | neoneye/loda | 22 | 178868 | ; A153465: 9*4^n - 2.
; 34,142,574,2302,9214,36862,147454,589822,2359294,9437182,37748734,150994942,603979774,2415919102,9663676414,38654705662,154618822654,618475290622,2473901162494,9895604649982,39582418599934,158329674399742,633318697598974,2533274790395902,10133099161583614,40532396646334462,162129586585337854,648518346341351422,2594073385365405694,10376293541461622782,41505174165846491134,166020696663385964542,664082786653543858174,2656331146614175432702,10625324586456701730814,42501298345826806923262,170005193383307227693054,680020773533228910772222,2720083094132915643088894,10880332376531662572355582,43521329506126650289422334,174085318024506601157689342,696341272098026404630757374,2785365088392105618523029502,11141460353568422474092118014,44565841414273689896368472062,178263365657094759585473888254,713053462628379038341895553022,2852213850513516153367582212094,11408855402054064613470328848382,45635421608216258453881315393534,182541686432865033815525261574142,730166745731460135262101046296574,2920666982925840541048404185186302,11682667931703362164193616740745214,46730671726813448656774466962980862,186922686907253794627097867851923454,747690747629015178508391471407693822
mov $1,4
pow $1,$0
div $1,3
mul $1,108
add $1,34
mov $0,$1
|
expr/Expr.g4 | go-sqlparser/go-antlr-practices | 0 | 3569 | grammar Expr;
@parser::header {
import (
"os"
)
}
@parser::members {
func eval(left int, op antlr.Token, right int) int {
if (op.GetTokenType() == ExprParserMUL) {
return left * right
} else if (op.GetTokenType() == ExprParserDIV) {
return left / right
} else if (op.GetTokenType() == ExprParserADD) {
return left + right
} else if (op.GetTokenType() == ExprParserSUB) {
return left - right
} else {
return 0
}
}
}
stat returns [int v]
: a=e NEWLINE {$v = $a.v}
| NEWLINE {$v = 0}
;
e returns [int v]
: a=e op=('*'|'/') b=e {
$v = eval($a.v, $op, $b.v)
// fmt.Fprintf(os.Stdout, "%d %s %d = %d\n", $a.v, $op.GetText(), $b.v, $v)
}
| a=e op=('+'|'-') b=e {
$v = eval($a.v, $op, $b.v)
// fmt.Fprintf(os.Stdout, "%d %s %d = %d\n", $a.v, $op.GetText(), $b.v, $v)
}
| INT {
$v = $INT.int
// fmt.Fprintf(os.Stdout, "got number=%d\n", $v)
}
;
MUL : '*' ;
DIV : '/' ;
ADD : '+' ;
SUB : '-' ;
ID : [a-zA-Z]+ ; // match identifiers
INT : [0-9]+ ; // match integers
NEWLINE:'\r'? '\n' ; // return newlines to parser (is end-statement signal)
WS : [ \t]+ -> skip ; // toss out whitespace
|
oeis/138/A138814.asm | neoneye/loda-programs | 11 | 17946 | ; A138814: Divisors of 4064 (half the 4th perfect number).
; Submitted by <NAME>
; 1,2,4,8,16,32,127,254,508,1016,2032,4064
mov $1,2
pow $1,$0
mod $0,6
mul $1,2
mov $2,2
pow $2,$0
sub $1,$2
mov $0,$1
|
Correlation/correlation.adb | veyselharun/ABench2020 | 0 | 26515 | --
-- ABench2020 Benchmark Suite
--
-- Sample Correlation Coefficient Calculation Program
--
-- Licensed under the MIT License. See LICENSE file in the ABench root
-- directory for license information.
--
-- Uncomment the line below to print the result.
-- with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions;
procedure Correlation is
type Float_Array is array (1..10) of Float;
function Calc_Coefficient (Sample_X, Sample_Y : in Float_Array) return Float is
Coefficient : Float := 0.0;
Sum_X, Sum_Y, Sum_XY : Float := 0.0;
Square_Sum_X, Square_Sum_Y : Float := 0.0;
Avg_X, Avg_Y : Float := 0.0;
begin
for I in Sample_X'First..Sample_X'Last loop
Sum_X := Sum_X + Sample_X (I);
end loop;
Avg_X := Sum_X / Float(Sample_X'Length);
for I in Sample_Y'First..Sample_Y'Last loop
Sum_Y := Sum_Y + Sample_Y (I);
end loop;
Avg_Y := Sum_Y / Float(Sample_Y'Length);
for I in Sample_X'First..Sample_X'Last loop
Sum_XY := Sum_XY + ((Sample_X (I) - Avg_X) * (Sample_Y (I) - Avg_Y));
end loop;
for I in Sample_X'First..Sample_X'Last loop
Square_Sum_X := Square_Sum_X + ((Sample_X (I) - Avg_X) * (Sample_X (I) - Avg_X));
Square_Sum_Y := Square_Sum_Y + ((Sample_Y (I) - Avg_Y) * (Sample_Y (I) - Avg_Y));
end loop;
Coefficient := Sum_XY / Sqrt (Square_Sum_X * Square_Sum_Y);
return Coefficient;
end;
Result : Float;
Sample_X : Float_Array := (15.0, 18.0, 21.0, 23.0, 27.0, 33.4, 4.7, 21.2,
15.0, 34.2);
Sample_Y : Float_Array := (25.0, 12.1, 27.0, 31.0, 32.0, 1.1, 6.5, 23.0,
4.4, 6.2);
begin
Result := Calc_Coefficient (Sample_X, Sample_Y);
-- Uncomment the line below to print the result.
-- Put_Line (Float'Image (Result));
end;
|
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___h2uint.asm | Frodevan/z88dk | 0 | 175984 | <gh_stars>0
SECTION code_fp_math16
PUBLIC ___h2uint
PUBLIC _f16_u16_f16
EXTERN cm16_sdcc___h2uint
defc ___h2uint = cm16_sdcc___h2uint
defc _f16_u16_f16 = cm16_sdcc___h2uint
|
CoinductiveCK.agda | goodlyrottenapple/coinductiveCK | 0 | 8413 | <reponame>goodlyrottenapple/coinductiveCK
module CoinductiveCK where
open import Data.Product
open import Data.Sum
open import Data.Empty
open import Data.Nat
open import Data.Bool using (Bool; if_then_else_; true; false)
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_; _≢_; refl; sym; cong; subst)
open PropEq.≡-Reasoning
open import Relation.Nullary
open import Relation.Nullary.Negation using (¬∃⟶∀¬; Excluded-Middle)
open import Function using (_$_; _∘_)
open import Relation.Binary.Core using (IsEquivalence) renaming (Rel to RelL)
open import Level as L using () renaming (_⊔_ to _⊔L_)
-- to be classical, we need the law of excluded middle
-- the following defns. were adapted from:
-- http://stackoverflow.com/questions/36669072/law-of-excluded-middle-in-agda
postulate LEM : ∀ {ℓ} (A : Set ℓ) → Dec A
¬¬A⇒A : ∀ {ℓ} {A : Set ℓ} → ¬ (¬ A) → A
¬¬A⇒A {_} {A} ¬¬p with LEM A
... | yes p = p
... | no ¬p = ⊥-elim (¬¬p ¬p)
¬∀⟶∃¬ : ∀ {ℓ ℓ'} {A : Set ℓ} {B : A → Set ℓ'} → ¬ (∀ a → B a) → ∃ λ a → ¬ (B a)
¬∀⟶∃¬ {A = A} {B} ¬∀ with LEM (∃ λ a → ¬ B a)
... | (yes p) = p
... | (no ¬p) = ⊥-elim $ ¬∀ (¬¬A⇒A ∘ ¬∃⟶∀¬ ¬p)
postulate State : Set
Event : ∀ {ℓ} → Set (L.suc ℓ)
Event {ℓ} = State → Set ℓ
_∧_ : ∀ {ℓ ℓ'} → Event {ℓ} → Event {ℓ'} → Event
e1 ∧ e2 = λ w → e1 w × e2 w
_∨_ : ∀ {ℓ ℓ'} → Event {ℓ} → Event {ℓ'} → Event
e1 ∨ e2 = λ w → e1 w ⊎ e2 w
_⟶_ : ∀ {ℓ ℓ'} → Event {ℓ} → Event {ℓ'} → Event
e1 ⟶ e2 = λ w → e1 w → e2 w
_⇒_ : ∀ {ℓ ℓ'} → Event {ℓ} → Event {ℓ'} → Set _
e1 ⇒ e2 = ∀ w → e1 w → e2 w
~_ : ∀ {ℓ} → Event {ℓ} → Event
~ e = λ w → e w → ⊥
All : ∀ {ℓ} → Event {ℓ} → Set _
All e = ∀ w → e w
⇒All⟶ : ∀ {ℓ ℓ'} (e1 : Event {ℓ}) (e2 : Event {ℓ'}) → e1 ⇒ e2 → All (e1 ⟶ e2)
⇒All⟶ e1 e2 e1⇒e2 w e1w = e1⇒e2 w e1w
mapE : ∀ {ℓ ℓ' ℓ''} {X : Set ℓ} → (Event {ℓ'} → Event {ℓ''}) → (X → Event) → X → Event {ℓ''}
mapE K E = λ n → K (E n)
_⊂_ : ∀ {ℓ ℓ' ℓ''} {X : Set ℓ} → (X → Event {ℓ'}) → Event {ℓ''} → Set (ℓ ⊔L ℓ' ⊔L ℓ'')
_⊂_ {X = X} E e = ∀ w → (∀ (x : X) → E x w) → e w
⇒Trans : ∀ {ℓ ℓ' ℓ''} {e1 : Event {ℓ}} {e2 : Event {ℓ'}} {e3 : Event {ℓ''}} → e1 ⇒ e2 → e2 ⇒ e3 → e1 ⇒ e3
⇒Trans e1⇒e2 e2⇒e3 w e1w = e2⇒e3 w (e1⇒e2 w e1w)
⊂Trans : ∀ {ℓ ℓ' ℓ'' ℓ'''} {X : Set ℓ} {E : X → Event {ℓ'}} {e1 : Event {ℓ''}} {e2 : Event {ℓ'''}} →
E ⊂ e1 → e1 ⇒ e2 → E ⊂ e2
⊂Trans E⊂e1 e1⇒e2 w ∀xExw = e1⇒e2 w (E⊂e1 w ∀xExw)
-- Definition of preservation of semantic implication.
Sem⊂ : ∀ {ℓ ℓ' ℓ''} → (Event {ℓ'} → Event {ℓ''}) → Set (L.suc (ℓ ⊔L ℓ') ⊔L ℓ'')
Sem⊂ {ℓ} {ℓ'} {ℓ''} K = ∀ {X : Set ℓ} {E : X → Event {ℓ'}} {e : Event {ℓ'}} → _⊂_ {ℓ} {ℓ'} {ℓ'} E e → (mapE K E) ⊂ K e
-- Knowledge Operators
record KOp {ℓ ℓ'} (K : Event {ℓ} → Event {ℓ}) : Set (L.suc (ℓ ⊔L ℓ')) where
field
axiomN : ∀ {e} → All e → All (K e)
axiomK : ∀ {e1 e2} → K (e1 ⟶ e2) ⇒ (K e1 ⟶ K e2)
axiomT : ∀ {e} → K e ⇒ e
axiom4 : ∀ {e} → K e ⇒ K (K e)
axiom5 : ∀ {e} → (~ K e) ⇒ K (~ K e)
-- Infinitary deduction
axiomInf : Sem⊂ {ℓ'} K
-- axiomN follows from axiomInf, using the empty family
emptyFam : ∀ {ℓ} → ⊥ → Event {ℓ}
emptyFam ()
All_emptyFam : ∀ {ℓ ℓ'} (e : Event {ℓ}) → All e → (emptyFam {ℓ'}) ⊂ e
All_emptyFam e Alle w ∀xExw = Alle w
emptyFam_All : ∀ {ℓ ℓ'} (e : Event {ℓ}) → (emptyFam {ℓ'}) ⊂ e → All e
emptyFam_All e emptyFam⊂e w = emptyFam⊂e w (λ x → ⊥-elim x)
infN : ∀ {ℓ ℓ'} → (K : Event {ℓ} → Event {ℓ'}) → Sem⊂ K → ∀ e → All e → All (K e)
infN {ℓ} K Sem⊂K e Alle = emptyFam_All (K e) aux
where
aux : (emptyFam {ℓ}) ⊂ (K e)
aux w _ = Sem⊂K (All_emptyFam e Alle) w (λ x → ⊥-elim x)
-- Similarly, axiomK follows from axiomInf using a family with two members:
-- A "modus ponens" family.
mpFam : ∀ {ℓ ℓ'} (e1 : Event {ℓ ⊔L ℓ'}) (e2 : Event {ℓ'}) → Bool → Event {ℓ ⊔L ℓ'}
mpFam e1 e2 = λ b → if b then (e1 ⟶ e2) else e1
infK : ∀ {ℓ} → (K : Event {ℓ} → Event {ℓ}) → Sem⊂ K →
∀ (e1 : Event {ℓ}) (e2 : Event {ℓ}) → K (e1 ⟶ e2) ⇒ (K e1 ⟶ K e2)
infK {ℓ} K Sem⊂K e1 e2 w Ke1⟶e2w Ke1w = Sem⊂K {E = mpFam {ℓ} e1 e2} aux₁ w aux₂
where
aux₁ : mpFam {ℓ} e1 e2 ⊂ e2
aux₁ w ∀x⦃e1⟶e2,e1⦄xw = ∀x⦃e1⟶e2,e1⦄xw true (∀x⦃e1⟶e2,e1⦄xw false)
aux₂ : (x : Bool) → mapE K (mpFam {ℓ} e1 e2) x w
aux₂ true = Ke1⟶e2w
aux₂ false = Ke1w
natK : ∀ {ℓ ℓ'} {X : Set ℓ'} {K : Event {ℓ} → Event {ℓ}} → KOp {ℓ} {ℓ'} K →
∀ {E : X → Event} {e} → E ⊂ e → (mapE K E) ⊂ (K e)
natK KOpK E⊂e = KOp.axiomInf KOpK E⊂e
K⇒ : ∀ {ℓ ℓ'} {K : Event {ℓ} → Event {ℓ}} → KOp {ℓ} {ℓ'} K →
∀ {e1 e2} → e1 ⇒ e2 → (K e1) ⇒ (K e2)
K⇒ KOpK {e1} {e2} e1⇒e2 w Ke1w = KOp.axiomK KOpK {e1} {e2} w (KOp.axiomN KOpK e1⇒e2 w) Ke1w
~e⇒K~Ke : ∀ {ℓ ℓ'} {K : Event {ℓ} → Event {ℓ}} → KOp {ℓ} {ℓ'} K →
∀ {e} → (~ e) ⇒ K (~ K e)
~e⇒K~Ke KOpK {e} w ~ew = KOp.axiom5 KOpK w (λ Kew → ~ew (KOp.axiomT KOpK {e} w Kew))
-- COINDUCTIVE DEFINITION OF COMMON KNOWLEDGE
postulate Agent : Set
postulate an_agent : Agent
postulate 𝕂 : ∀ {ℓ} → Agent → Event {ℓ} → Event {ℓ}
postulate 𝕂KOp : ∀ {ℓ ℓ'} a → KOp {ℓ} {ℓ'} (𝕂 a)
𝕂⇒ : ∀ {ℓ} {e1 : Event {ℓ}} {e2 : Event {ℓ}} {i : Agent} → e1 ⇒ e2 → 𝕂 i e1 ⇒ 𝕂 i e2
𝕂⇒ {ℓ} {e1} {e2} {i} e1⇒e2 w 𝕂ie1w =
KOp.axiomK (𝕂KOp {ℓ} {ℓ} i) {e1} {e2} w (KOp.axiomN (𝕂KOp {ℓ} {ℓ} i) e1⇒e2 w) 𝕂ie1w
-- Everybody Knows
EK : ∀ {ℓ ℓ'} {K : Agent → Event {ℓ} → Event {ℓ'}} → Event → Event
EK {ℓ} {ℓ'} {K} e = λ w → ∀ {i : Agent} → K i e w
E𝕂 : ∀ {ℓ} → Event {ℓ} → Event {ℓ}
E𝕂 = EK {K = 𝕂}
-- Common Knowledge
-- Coinductive Definition
record cCK {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} (e : Event {ℓ}) (w : State) : Set ℓ where
coinductive
field
intro : (EK {ℓ} {ℓ} {K} e ∧ cCK {ℓ} {K} (EK {ℓ} {ℓ} {K} e)) w
cC𝕂 : ∀ {ℓ} → Event {ℓ} → Event {ℓ}
cC𝕂 = cCK {K = 𝕂}
cCK⇒EK : ∀ {ℓ} {e : Event {ℓ}} {K : Agent → Event {ℓ} → Event {ℓ}} →
cCK {K = K} e ⇒ EK {K = K} e
cCK⇒EK w cCKe = proj₁ (cCK.intro cCKe)
cCK⇒cCKEK : ∀ {ℓ} {e : Event {ℓ}} {K : Agent → Event {ℓ} → Event {ℓ}} →
cCK {K = K} e ⇒ cCK {K = K} (EK {K = K} e)
cCK⇒cCKEK w cCKe = proj₂ (cCK.intro cCKe)
-- knowledge operator properties of E𝕂
E𝕂axiomInf : ∀ {ℓ ℓ'} → Sem⊂ {ℓ'} (E𝕂 {ℓ})
E𝕂axiomInf {X = X} {E} {e} E⊂e w ∀xEKExw {i} =
KOp.axiomInf (𝕂KOp i) {X} {E} {e} E⊂e w (λ x → ∀xEKExw x)
E𝕂axiomN : ∀ {ℓ} {e : Event {ℓ}} →
All e → All (E𝕂 e)
E𝕂axiomN {ℓ} Alle w {i} = KOp.axiomN (𝕂KOp {ℓ} {ℓ} i) Alle w
E𝕂axiomK : ∀ {ℓ} {e1 e2 : Event {ℓ}} →
E𝕂 (e1 ⟶ e2) ⇒ (E𝕂 e1 ⟶ E𝕂 e2)
E𝕂axiomK {ℓ} {e1 = e1} {e2} w E𝕂e1⟶e2w E𝕂e1w {i} =
KOp.axiomK (𝕂KOp {ℓ} {ℓ} i) {e1} w E𝕂e1⟶e2w E𝕂e1w
E𝕂axiomT : ∀ {ℓ} {e : Event {ℓ}} → E𝕂 e ⇒ e
E𝕂axiomT {ℓ} w E𝕂ew = KOp.axiomT (𝕂KOp {ℓ} {ℓ} an_agent) w E𝕂ew
E𝕂⇒ : ∀ {ℓ} {e1 e2 : Event {ℓ}} → e1 ⇒ e2 → E𝕂 e1 ⇒ E𝕂 e2
E𝕂⇒ e1⇒e2 w E𝕂e1w = 𝕂⇒ e1⇒e2 w E𝕂e1w
-- EK_axiom4 doesn't hold - if it did, (EK e) would imply (EK (EK e)),
-- and applying this ad infinitum would imply (cCK e)
E𝕂cC𝕂 : ∀ {ℓ} {e : Event {ℓ}} → e ⇒ E𝕂 e → e ⇒ cC𝕂 e
cCK.intro (E𝕂cC𝕂 {e} e⇒E𝕂e w ew) = e⇒E𝕂e w ew , E𝕂cC𝕂 (E𝕂⇒ e⇒E𝕂e) w (e⇒E𝕂e w ew)
~K⇒~EK : ∀ {ℓ} {e : Event {ℓ}} {K : Agent → Event {ℓ} → Event {ℓ}} {a} →
(~ K a e) ⇒ (~ EK {K = K} e)
~K⇒~EK w ~Kae EKew = ~Kae EKew
𝕂~𝕂⇒𝕂~E𝕂 : ∀ {ℓ} {e : Event {ℓ}} {a} → 𝕂 a (~ 𝕂 a e) ⇒ 𝕂 a (~ E𝕂 e)
𝕂~𝕂⇒𝕂~E𝕂 = 𝕂⇒ (~K⇒~EK {K = 𝕂})
~e⇒E𝕂~E𝕂 : ∀ {ℓ} {e : Event {ℓ}} → (~ e) ⇒ E𝕂 (~ E𝕂 e)
~e⇒E𝕂~E𝕂 {ℓ} w ~ew {i} = 𝕂~𝕂⇒𝕂~E𝕂 w (~e⇒K~Ke (𝕂KOp {ℓ} {ℓ} i) w ~ew)
-- cCK equivalent of recursive EK
recEK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} → Event {ℓ} → ℕ → Event {ℓ}
recEK {K = K} e zero = EK {K = K} e
recEK {K = K} e (suc n) = EK {K = K} (recEK {K = K} e n)
recE𝕂 : ∀ {ℓ} → Event {ℓ} → ℕ → Event {ℓ}
recE𝕂 = recEK {K = 𝕂}
recEK-EK≡EK-recEK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} (e : Event {ℓ}) n →
recEK {K = K} (EK {K = K} e) n ≡ EK {K = K} (recEK {K = K} e n)
recEK-EK≡EK-recEK _ zero = refl
recEK-EK≡EK-recEK {K = K} e (suc n) = cong (EK {K = K}) (recEK-EK≡EK-recEK {K = K} e n)
cCK⇒recEK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} (e : Event {ℓ}) n →
cCK {K = K} e ⇒ recEK {K = K} e n
cCK⇒recEK e zero w cCKew {i} = proj₁ (cCK.intro cCKew)
cCK⇒recEK {K = K} e (suc n) =
⇒Trans {e2 = cCK {K = K} (EK {K = K} e)} cCK⇒cCKEK
(⇒Trans {e2 = recEK {K = K} (EK {K = K} e) n} ih aux)
where
ih : cCK {K = K} (EK {K = K} e) ⇒ recEK {K = K} (EK {K = K} e) n
ih = cCK⇒recEK (EK {K = K} e) n
aux : recEK {K = K} (EK {K = K} e) n ⇒ recEK {K = K} e (suc n)
aux rewrite recEK-EK≡EK-recEK {K = K} e n = λ w EKrecEKenw {i} → EKrecEKenw
recEK⊂cCK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} (e : Event {ℓ}) →
(recEK {K = K} e) ⊂ (cCK {K = K} e)
cCK.intro (recEK⊂cCK {K = K} e w ∀xrecEKexw) =
∀xrecEKexw zero , ih w (λ n → subst (λ P → P) (aux n) (∀xrecEKexw (suc n)))
where
ih : (recEK {K = K} (EK {K = K} e)) ⊂ (cCK {K = K} (EK {K = K} e))
ih = recEK⊂cCK (EK {K = K} e)
aux : ∀ n → (EK {K = K} (recEK {K = K} e n)) w ≡ (recEK {K = K} (EK {K = K} e) n) w
aux n = cong (λ P → P w) {EK {K = K} (recEK {K = K} e n)} {recEK {K = K} (EK {K = K} e) n}
(sym (recEK-EK≡EK-recEK e n))
-- knowledge operator properties of cCK
E𝕂cC𝕂⇒cC𝕂E𝕂 : ∀ {ℓ} (e : Event {ℓ}) → E𝕂 (cC𝕂 e) ⇒ cC𝕂 (E𝕂 e)
E𝕂cC𝕂⇒cC𝕂E𝕂 e w E𝕂cC𝕂ew = cCK⇒cCKEK w (E𝕂axiomT w E𝕂cC𝕂ew)
cCKEK⇒EKcCK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} {KOpK : ∀ a -> KOp {ℓ} {L.zero} (K a)} (e : Event {ℓ}) →
cCK {K = K} (EK {K = K} e) ⇒ EK {K = K} (cCK {K = K} e)
cCKEK⇒EKcCK {K = K} {KOpK} e w cCKEKew {i} =
natK {X = ℕ} (KOpK i) (recEK⊂cCK e) w
(λ n → aux n w (subst (λ P → P w)
{recEK {K = K} (EK {K = K} e) n}
{EK {K = K} (recEK {K = K} e n)}
(recEK-EK≡EK-recEK e n)
(cCK⇒recEK (EK {K = K} e) n w cCKEKew)))
where
aux : ∀ n → EK {K = K} (recEK {K = K} e n) ⇒ mapE (K i) (recEK {K = K} e) n
aux n w EKrecEKen = EKrecEKen
cCK⇒EKcCK : ∀ {ℓ} {K : Agent → Event {ℓ} → Event {ℓ}} (KOpK : ∀ a -> KOp {ℓ} {L.zero} (K a)) (e : Event {ℓ}) →
cCK {K = K} e ⇒ EK {K = K} (cCK {K = K} e)
cCK⇒EKcCK {K = K} KOpK e = ⇒Trans {e2 = cCK {K = K} (EK {K = K} e)} cCK⇒cCKEK (cCKEK⇒EKcCK {K = K} {KOpK} e)
E𝕂recE𝕂 : ∀ {ℓ} (e1 e2 : Event {ℓ}) n → e1 ⇒ E𝕂 e2 → recE𝕂 e1 n ⇒ recE𝕂 e2 (suc n)
E𝕂recE𝕂 e1 e2 zero e1⇒E𝕂e2 w recE𝕂e1nw {i} = E𝕂⇒ {e1 = e1} e1⇒E𝕂e2 w recE𝕂e1nw
E𝕂recE𝕂 e1 e2 (suc n) e1⇒E𝕂e2 w recE𝕂e1nw {i} = E𝕂⇒ {e1 = recEK e1 n} ih w recE𝕂e1nw
where
ih : recE𝕂 e1 n ⇒ recE𝕂 e2 (suc n)
ih = E𝕂recE𝕂 e1 e2 n e1⇒E𝕂e2
cC𝕂⇒recE𝕂cC𝕂 : ∀ {ℓ} (e : Event {ℓ}) n → cC𝕂 e ⇒ recE𝕂 (cC𝕂 e) n
cC𝕂⇒recE𝕂cC𝕂 e zero = cCK⇒EKcCK 𝕂KOp e
cC𝕂⇒recE𝕂cC𝕂 e (suc n) = ⇒Trans {e2 = E𝕂 (cC𝕂 e)} (cCK⇒EKcCK 𝕂KOp e) ih
where
ih : E𝕂 (cC𝕂 e) ⇒ E𝕂 (recE𝕂 (cC𝕂 e) n)
ih = E𝕂⇒ (cC𝕂⇒recE𝕂cC𝕂 e n)
cC𝕂axiomInf : ∀ {ℓ ℓ'} → Sem⊂ {ℓ} {ℓ'} {ℓ'} cC𝕂
cCK.intro (cC𝕂axiomInf {X = X} {E} {e} E⊂e w mapEcC𝕂E) =
E𝕂axiomInf {X = X} {E} E⊂e w (λ x → cCK⇒EK w (mapEcC𝕂E x)) ,
cC𝕂axiomInf {E = λ x → E𝕂 (E x)} (E𝕂axiomInf {X = X} {E} E⊂e) w (λ x → cCK⇒cCKEK w (mapEcC𝕂E x))
cC𝕂axiom4 : ∀ {ℓ} {e : Event {ℓ}} → cC𝕂 e ⇒ cC𝕂 (cC𝕂 e)
cC𝕂axiom4 {e = e} w cC𝕂e = recEK⊂cCK (cC𝕂 e) w ((λ n → cC𝕂⇒recE𝕂cC𝕂 e n w cC𝕂e))
cC𝕂axiomN : ∀ {ℓ} {e : Event {ℓ}} → All e → All (cC𝕂 e)
cC𝕂axiomN {e = e} = infN cC𝕂 cC𝕂axiomInf e
cC𝕂axiomT : ∀ {ℓ} {e : Event {ℓ}} → cC𝕂 e ⇒ e
cC𝕂axiomT w cC𝕂ew = E𝕂axiomT w (proj₁ (cCK.intro cC𝕂ew))
cC𝕂axiomK : ∀ {ℓ} {e1 e2 : Event {ℓ}} → cC𝕂 (e1 ⟶ e2) ⇒ (cC𝕂 e1 ⟶ cC𝕂 e2)
cC𝕂axiomK {_} {e1} {e2} = infK cC𝕂 cC𝕂axiomInf e1 e2
~cC𝕂⇒E𝕂~cC𝕂 : ∀ {ℓ} {e : Event {ℓ}} → (~ cC𝕂 e) ⇒ E𝕂 (~ cC𝕂 e)
~cC𝕂⇒E𝕂~cC𝕂 {e = e} w ~cC𝕂ew = cut (λ ∀nrecE𝕂enw → ~cC𝕂ew (recEK⊂cCK e w ∀nrecE𝕂enw))
where
cut : (¬(∀ n → recE𝕂 e n w)) → E𝕂 (~ cC𝕂 e) w
cut ¬∀nrecE𝕂enw = E𝕂⇒ {e1 = ~ recE𝕂 e (suc n)}
(λ w ~recE𝕂eSn cC𝕂ew → ~recE𝕂eSn (cCK⇒recEK e (suc n) w cC𝕂ew))
w
(~e⇒E𝕂~E𝕂 w ¬recE𝕂enw)
where
neg : ∃ (λ n → ¬ (recE𝕂 e n w))
neg = ¬∀⟶∃¬ ¬∀nrecE𝕂enw
n = proj₁ neg
¬recE𝕂enw = proj₂ neg
cC𝕂axiom5 : ∀ {ℓ} {e : Event {ℓ}} → (~ cC𝕂 e) ⇒ cC𝕂 (~ cC𝕂 e)
cC𝕂axiom5 = E𝕂cC𝕂 ~cC𝕂⇒E𝕂~cC𝕂
cC𝕂KOp : ∀ {ℓ ℓ'} → KOp {ℓ} {ℓ'} cC𝕂
cC𝕂KOp = record {
axiomN = cC𝕂axiomN
; axiomK = cC𝕂axiomK
; axiomT = cC𝕂axiomT
; axiom4 = cC𝕂axiom4
; axiom5 = cC𝕂axiom5
; axiomInf = cC𝕂axiomInf
}
-- Equivalence Relations
RelToK : ∀ {ℓ ℓ'} → RelL State ℓ → Event {ℓ'} → Event {ℓ ⊔L ℓ'}
RelToK R e w = ∀ v → R w v → e v
KtoRel : ∀ {ℓ} → (Event → Event {ℓ}) → RelL State (L.suc ℓ)
KtoRel K w v = ∀ e → K e w → K e v
-- Proof that RelToK on an equivalence relation yields a K satisfying S5 *)
axiomN' : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R →
∀ {e : Event {ℓ'}} → All e → All ((RelToK R) e)
axiomN' _ _ Alle _ v _ = Alle v
axiomK' : ∀ {ℓ ℓ' ℓ''} → (R : RelL State ℓ) → IsEquivalence R →
∀ {e1 : Event {ℓ'}} {e2 : Event {ℓ''}} → (RelToK R) (e1 ⟶ e2) ⇒ ((RelToK R) e1 ⟶ (RelToK R) e2)
axiomK' R _ {e1} {e2} w Ke1⟶e2 Ke1w = λ v Rwv → Ke1⟶e2 v Rwv (Ke1w v Rwv)
axiomT' : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R →
∀ {e : Event {ℓ'}} → (RelToK R) e ⇒ e
axiomT' R IsEqR {e} w Kew = Kew w (IsEquivalence.refl IsEqR)
axiom4' : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R →
∀ {e : Event {ℓ'}} → (RelToK R) e ⇒ (RelToK R) ((RelToK R) e)
axiom4' R IsEqR {e} w Kew v Rwv u Rvu = Kew u (IsEquivalence.trans IsEqR Rwv Rvu)
axiom5' : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R →
∀ {e : Event {ℓ'}} → (~ (RelToK R) e) ⇒ (RelToK R) (~ ((RelToK R) e))
axiom5' R IsEqR {e} w ~Kew v Rwv Kev =
~Kew (λ u Rwu → Kev u (IsEquivalence.trans IsEqR (IsEquivalence.sym IsEqR Rwv) Rwu))
axiomInf' : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R → Sem⊂ {ℓ'} {ℓ} (RelToK R)
axiomInf' R IsEqR E⊂e w ∀x v Rwv = E⊂e v (λ x → ∀x x v Rwv)
KOpRelToK : ∀ {ℓ ℓ'} → (R : RelL State ℓ) → IsEquivalence R → KOp {ℓ} {ℓ'} (RelToK R)
KOpRelToK R IsEqR = record {
axiomN = axiomN' R IsEqR
; axiomK = axiomK' R IsEqR
; axiomT = axiomT' R IsEqR
; axiom4 = axiom4' R IsEqR
; axiom5 = axiom5' R IsEqR
; axiomInf = axiomInf' R IsEqR
}
-- Proof that K_to_Rel on a K satisfying S5 yields an equivalence relation
eqRefl' : ∀ {ℓ ℓ'} → (K : Event {ℓ} → Event) → KOp {ℓ} {ℓ'} K →
∀ {w : State} → (KtoRel K) w w
eqRefl' K KopK = λ e Kew → Kew
eqSym' : ∀ {ℓ ℓ'} → (K : Event {ℓ} → Event) → KOp {ℓ} {ℓ'} K →
∀ {w v : State} → (KtoRel K) w v → (KtoRel K) v w
eqSym' K KOpK {w} {v} Rwv e Kev = ¬¬A⇒A (λ ¬Kew →
KOp.axiomT KOpK {~ K e} v (Rwv (~ K e) (KOp.axiom5 KOpK {e} w ¬Kew)) Kev)
eqTrans' : ∀ {ℓ ℓ'} → (K : Event {ℓ} → Event) → KOp {ℓ} {ℓ'} K →
∀ {w v u : State} → (KtoRel K) w v → (KtoRel K) v u → (KtoRel K) w u
eqTrans' K _ {w} {v} {u} Rwv Rvu e Kew = Rvu e (Rwv e Kew)
EqRelKtoRel : ∀ {ℓ ℓ'} → (K : Event {ℓ} → Event) → KOp {ℓ} {ℓ'} K → IsEquivalence (KtoRel K)
EqRelKtoRel K KOpK = record { refl = eqRefl' K KOpK ; sym = eqSym' K KOpK ; trans = eqTrans' K KOpK }
-- The two transformations are an isomorphism
EqRelKIso1 : ∀ {ℓ ℓ'} → {K : Event → Event {ℓ}} → KOp {ℓ} {ℓ'} K →
∀ (e : Event {ℓ}) → (K e) ⇒ (RelToK (KtoRel K) e)
EqRelKIso1 {K = K} KOpK e w Kew v Rwv = KOp.axiomT KOpK v (Rwv e Kew)
data Indexed {ℓ ℓ'} (K : Event {ℓ} → Event {ℓ'}) (w : State) : Set (L.suc (ℓ ⊔L ℓ')) where
index : ∀ (e : Event) → K e w → Indexed K w
KFam : ∀ {ℓ} {K : Event {ℓ} → Event {ℓ}} {w : State} → Indexed K w → Event {ℓ}
KFam {K = K} (index e Kew) = K e
Rew→KFam⊂e : ∀ {ℓ} → {K : Event → Event {ℓ}} →
∀ (e : Event {ℓ}) w → RelToK (KtoRel K) e w → (KFam {K = K} {w}) ⊂ e
Rew→KFam⊂e {ℓ} {K} e w R2K-K2Rew v ∀xKFamxv =
R2K-K2Rew v (λ e' Ke'w → ∀xKFamxv (index e' Ke'w))
EqRelKIso2 : ∀ {ℓ} → {K : Event → Event {ℓ}} → KOp {ℓ} {L.suc ℓ} K →
∀ (e : Event {ℓ}) → (RelToK (KtoRel K) e) ⇒ (K e)
EqRelKIso2 {ℓ} {K} KOpK e w R2K-K2Rew = KOp.axiomInf KOpK aux w aux₁
where
aux : _⊂_ {L.suc ℓ} {ℓ} {ℓ} (KFam {ℓ} {K} {w}) e
aux = Rew→KFam⊂e e w R2K-K2Rew
aux₁ : (x : Indexed K w) → K (KFam x) w
aux₁ (index e Kew) = KOp.axiom4 KOpK w Kew
KeqRelIso1 : ∀ {ℓ} → (R : RelL State ℓ) → IsEquivalence R →
∀ w v → R w v → KtoRel {ℓ} (RelToK R) w v
KeqRelIso1 R IsEqR w v Rwv e R2Kew u Rvu = R2Kew u (IsEquivalence.trans IsEqR Rwv Rvu)
KeqRelIso2 : ∀ {ℓ} → (R : RelL State ℓ) → IsEquivalence R →
∀ w v → KtoRel {ℓ} (RelToK R) w v → R w v
KeqRelIso2 R IsEqR w v K2R-R2Kwv = K2R-R2Kwv (R w) (λ v₁ z → z) v (IsEquivalence.refl IsEqR)
-- RELATIONAL DEFINITION OF COMMON KNOWLEDGE
postulate 𝕂R : ∀ {ℓ} → Agent → RelL State ℓ
postulate IsEq𝕂R : ∀ {ℓ} a → IsEquivalence (𝕂R {ℓ} a)
𝕂ᵣ : ∀ {ℓ} (i : Agent) → Event {ℓ} → Event {ℓ}
𝕂ᵣ {ℓ} i = RelToK (𝕂R {ℓ} i)
𝕂ᵣKOp : ∀ {ℓ ℓ'} i -> KOp {ℓ} {ℓ'} (𝕂ᵣ i)
𝕂ᵣKOp i = KOpRelToK (𝕂R i) (IsEq𝕂R i)
𝕂ᵣe→e : ∀ {ℓ} i (e : Event {ℓ}) w → 𝕂ᵣ i e w → e w
𝕂ᵣe→e i e w 𝕂ᵣiew = 𝕂ᵣiew w (IsEquivalence.refl (IsEq𝕂R i))
𝕂ᵣe→𝕂ᵣ𝕂ᵣe : ∀ {ℓ} i (e : Event {ℓ}) w → 𝕂ᵣ i e w → 𝕂ᵣ i (𝕂ᵣ i e) w
𝕂ᵣe→𝕂ᵣ𝕂ᵣe i e w 𝕂ᵣiew v 𝕂Riwv u 𝕂Rivu =
𝕂ᵣiew u (IsEquivalence.trans (IsEq𝕂R i) 𝕂Riwv 𝕂Rivu)
E𝕂ᵣ : ∀ {ℓ} → Event {ℓ} → Event {ℓ}
E𝕂ᵣ = EK {K = 𝕂ᵣ}
cC𝕂ᵣ : ∀ {ℓ} → Event {ℓ} → Event {ℓ}
cC𝕂ᵣ = cCK {K = 𝕂ᵣ}
cC𝕂ᵣ→E𝕂ᵣcC𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → cC𝕂ᵣ e w -> E𝕂ᵣ (cC𝕂ᵣ e) w
cC𝕂ᵣ→E𝕂ᵣcC𝕂ᵣ {ℓ} {e} {w} = cCK⇒EKcCK {K = 𝕂ᵣ} 𝕂ᵣKOp e w
data C𝕂R {ℓ} : RelL State ℓ where
base : ∀ i w v -> 𝕂R {ℓ} i w v -> C𝕂R w v
trans : ∀ {w v u} -> C𝕂R {ℓ} w v -> C𝕂R {ℓ} v u -> C𝕂R {ℓ} w u
C𝕂Rrefl : ∀ {ℓ} → Relation.Binary.Core.Reflexive (C𝕂R {ℓ})
C𝕂Rrefl {x = w} = base an_agent w w (IsEquivalence.refl (IsEq𝕂R an_agent))
C𝕂Rsym : ∀ {ℓ} → Relation.Binary.Core.Symmetric (C𝕂R {ℓ})
C𝕂Rsym (base i w v 𝕂Riwv) = base i v w (IsEquivalence.sym (IsEq𝕂R i) 𝕂Riwv)
C𝕂Rsym (trans C𝕂Rwv C𝕂Rvu) = trans (C𝕂Rsym C𝕂Rvu) (C𝕂Rsym C𝕂Rwv)
EqRelC𝕂R : ∀ {ℓ} → IsEquivalence (C𝕂R {ℓ})
EqRelC𝕂R = record { refl = C𝕂Rrefl ; sym = C𝕂Rsym ; trans = trans }
C𝕂ᵣ : ∀ {ℓ} → Event {ℓ} → Event {ℓ}
C𝕂ᵣ {ℓ} = RelToK (C𝕂R {ℓ})
C𝕂ᵣ→E𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → C𝕂ᵣ e w -> E𝕂ᵣ e w
C𝕂ᵣ→E𝕂ᵣ {_} {e} {w} C𝕂ᵣew {i} v 𝕂Riwv = C𝕂ᵣew v (base i w v 𝕂Riwv)
C𝕂ᵣ→E𝕂ᵣC𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → C𝕂ᵣ e w -> E𝕂ᵣ (C𝕂ᵣ e) w
C𝕂ᵣ→E𝕂ᵣC𝕂ᵣ {_} {e} {w} C𝕂ᵣew {i} v 𝕂Riwv u C𝕂Rvu =
C𝕂ᵣew u (trans (base i w v 𝕂Riwv) C𝕂Rvu)
C𝕂ᵣ→C𝕂ᵣE𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → C𝕂ᵣ e w -> C𝕂ᵣ (E𝕂ᵣ e) w
C𝕂ᵣ→C𝕂ᵣE𝕂ᵣ {_} {e} {w} C𝕂ᵣew v C𝕂Rwv {i} u 𝕂Rivu =
C𝕂ᵣew u (trans C𝕂Rwv (base i v u 𝕂Rivu))
C𝕂ᵣ→cC𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → C𝕂ᵣ e w -> cC𝕂ᵣ e w
cCK.intro (C𝕂ᵣ→cC𝕂ᵣ {ℓ} {e} {w} C𝕂ᵣew) = C𝕂ᵣ→E𝕂ᵣ C𝕂ᵣew , C𝕂ᵣ→cC𝕂ᵣ (C𝕂ᵣ→C𝕂ᵣE𝕂ᵣ C𝕂ᵣew)
C𝕂transport : ∀ {ℓ} {e : Event {ℓ}} {w v : State} → cC𝕂ᵣ e w -> C𝕂R {ℓ} w v -> cC𝕂ᵣ e v
C𝕂transport {_} {e} cC𝕂ᵣew (base i w v 𝕂Riwv) = record { intro =
proj₁ (cCK.intro (proj₂ (cCK.intro cC𝕂ᵣew))) v 𝕂Riwv ,
aux v 𝕂Riwv
}
where
aux : E𝕂ᵣ (cC𝕂ᵣ (E𝕂ᵣ e)) w
aux = cC𝕂ᵣ→E𝕂ᵣcC𝕂ᵣ (record { intro = cCK.intro (proj₂ (cCK.intro cC𝕂ᵣew)) })
C𝕂transport cC𝕂ᵣew (trans C𝕂Rwv C𝕂Rvu) =
C𝕂transport (C𝕂transport cC𝕂ᵣew C𝕂Rwv) C𝕂Rvu
cC𝕂ᵣ→C𝕂ᵣ : ∀ {ℓ} {e : Event {ℓ}} {w : State} → cC𝕂ᵣ e w -> C𝕂ᵣ e w
cC𝕂ᵣ→C𝕂ᵣ {ℓ} {e} cC𝕂ᵣew v (base i w .v x) = proj₁ (cCK.intro cC𝕂ᵣew) v x
cC𝕂ᵣ→C𝕂ᵣ {ℓ} {e} {w} cC𝕂ᵣew v (trans {v = v'} C𝕂Rwv' C𝕂Rv'v) =
cC𝕂ᵣ→C𝕂ᵣ (C𝕂transport cC𝕂ᵣew C𝕂Rwv') v C𝕂Rv'v
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_1017_549.asm | ljhsiun2/medusa | 9 | 25552 | <filename>Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_1017_549.asm<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x151fb, %rsi
lea addresses_WT_ht+0x1dc7b, %rdi
nop
nop
nop
nop
nop
and $28067, %rax
mov $121, %rcx
rep movsq
nop
nop
and %r13, %r13
lea addresses_A_ht+0x13baf, %r12
cmp %r11, %r11
vmovups (%r12), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rax
nop
add %rcx, %rcx
lea addresses_WT_ht+0x105fb, %rcx
nop
nop
nop
nop
xor $32924, %r11
vmovups (%rcx), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %r13
nop
sub $20860, %r12
lea addresses_D_ht+0xb4fb, %rsi
lea addresses_normal_ht+0x146bb, %rdi
nop
nop
nop
nop
and $53213, %r8
mov $73, %rcx
rep movsb
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_UC_ht+0x139fb, %rsi
lea addresses_UC_ht+0x173fb, %rdi
nop
nop
nop
and $38294, %r13
mov $66, %rcx
rep movsb
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_WT_ht+0xabfb, %rsi
lea addresses_normal_ht+0x3ffb, %rdi
nop
nop
nop
xor $48917, %r8
mov $30, %rcx
rep movsl
xor %r12, %r12
lea addresses_UC_ht+0x3bfb, %rsi
lea addresses_WT_ht+0x93fb, %rdi
nop
nop
nop
nop
add $9258, %r12
mov $65, %rcx
rep movsq
nop
nop
add %rcx, %rcx
lea addresses_A_ht+0xb1fb, %rsi
nop
nop
nop
nop
and %r11, %r11
movb (%rsi), %r12b
nop
and %r11, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r8
push %rcx
push %rsi
// Faulty Load
lea addresses_normal+0x191fb, %r13
nop
nop
nop
sub $14654, %rsi
movntdqa (%r13), %xmm1
vpextrq $0, %xmm1, %r11
lea oracles, %r8
and $0xff, %r11
shlq $12, %r11
mov (%r8,%r11,1), %r11
pop %rsi
pop %rcx
pop %r8
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'00': 1017}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/aof-core-objects.adb | glencornell/ada-object-framework | 0 | 9066 | -- Copyright (C) 2020 <NAME> <<EMAIL>>
--
-- This program is free software: you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see
-- <http://www.gnu.org/licenses/>.
package body Aof.Core.Objects is
use type Object_List.Cursor;
use type Ada.Strings.Unbounded.Unbounded_String;
function Get_Name (This : in Object'Class) return String is
begin
return Ada.Strings.Unbounded.To_String(This.Name.Get);
end;
procedure Set_Name
(This : in out Object'Class;
Name : in String) is
begin
This.Name.Set(Ada.Strings.Unbounded.To_Unbounded_String(Name));
end;
function Get_Parent (This : in Object'Class) return Access_Object is
begin
return This.Parent;
end;
procedure Set_Parent
(This : in out Object'Class;
Parent : in not null Access_Object) is
This_Ptr : Access_Object := This'Unchecked_Access;
begin
-- If the parent is found in this objects list of children(recursively), then fail
if This.Contains(Parent) or This_Ptr = Parent then
raise Circular_Reference_Exception;
end if;
-- unlink this from its existing parent
if This.Parent /= null then
This.Parent.Delete_Child(This_Ptr);
end if;
-- add the object "This" to the "Children" container belonging
-- to the object "Parent"
Parent.Children.Append(New_Item => This_Ptr);
This.Parent := Parent;
end;
function Get_Children
(This : in Object'Class) return Object_List.List is
begin
return This.Children;
end;
function Find_Child
(This : in Object'Class;
Name : in Ada.Strings.Unbounded.Unbounded_String;
Options : in Find_Child_Options := Find_Children_Recursively) return Access_Object is
begin
for Obj of This.Children loop
if Name = Obj.Name.Get then
return Obj;
end if;
if Options = Find_Children_Recursively then
return Obj.Find_Child(Name, Options);
end if;
end loop;
return null;
end;
function Find_Child
(This : in Object'Class;
Name : in String;
Options : in Find_Child_Options := Find_Children_Recursively)
return Access_Object is
The_Name : constant Ada.Strings.Unbounded.Unbounded_String :=
Ada.Strings.Unbounded.To_Unbounded_String(Name);
begin
return This.Find_Child(The_Name, Options);
end;
function Find_Children
(This : in Object'Class;
Name : in Ada.Strings.Unbounded.Unbounded_String;
Options : in Find_Child_Options := Find_Children_Recursively)
return Object_List.List is
Obj_List : Object_List.List;
begin
for Obj of This.Children loop
if Name = Obj.Name.Get then
Obj_List.Append(Obj);
end if;
if Options = Find_Children_Recursively then
declare
Children : Object_List.List := Obj.Find_Children(Name, Options);
begin
Obj_List.Splice(Before => Object_List.No_Element,
Source => Children);
end;
end if;
end loop;
return Obj_List;
end;
function Find_Children
(This : in Object'Class;
Name : in String;
Options : in Find_Child_Options := Find_Children_Recursively)
return Object_List.List is
The_Name : constant Ada.Strings.Unbounded.Unbounded_String :=
Ada.Strings.Unbounded.To_Unbounded_String(Name);
begin
return This.Find_Children(The_Name, Options);
end;
procedure Iterate
(This : in Access_Object;
Options : in Find_Child_Options := Find_Children_Recursively) is
begin
for Child of This.Children loop
if Options = Find_Children_Recursively then
Iterate(This => Child, Options => Options);
end if;
Proc(Child);
end loop;
end;
function Contains
(This : in out Object'Class;
Child : in not null Access_Object)
return Boolean is
This_Ptr : constant Access_Object := This'Unchecked_Access;
Obj : Access_Object := Child.Parent;
begin
while Obj /= null loop
if Obj = This_Ptr then
return True;
end if;
Obj := Obj.Parent;
end loop;
return False;
end;
procedure Delete_Child
(This : in out Object'Class;
Child : in out not null Access_Object;
Options : in Find_Child_Options := Find_Children_Recursively) is
I : Object_List.Cursor := This.Children.First;
Obj : Access_Object := null;
begin
loop
Obj := Object_List.Element(I);
if Obj = Child then
Obj.Parent := null;
This.Children.Delete(I);
return;
end if;
if Options = Find_Children_Recursively then
Obj.Delete_Child(Child, Options);
end if;
exit when I = This.Children.Last;
I := Object_List.Next(I);
end loop;
end;
procedure Finalize (This : in out Public_Part) is
begin
This.Destroyed.Emit(This'Unchecked_Access);
end Finalize;
procedure Finalize (This : in out Object) is
begin
-- TODO: delete all children?
null;
end Finalize;
end Aof.Core.Objects;
|
programs/oeis/008/A008595.asm | karttu/loda | 0 | 95526 | ; A008595: Multiples of 13.
; 0,13,26,39,52,65,78,91,104,117,130,143,156,169,182,195,208,221,234,247,260,273,286,299,312,325,338,351,364,377,390,403,416,429,442,455,468,481,494,507,520,533,546,559,572,585,598,611,624,637,650,663,676,689,702,715,728,741,754,767,780,793,806,819,832,845,858,871,884,897,910,923,936,949,962,975,988,1001,1014,1027,1040,1053,1066,1079,1092,1105,1118,1131,1144,1157,1170,1183,1196,1209,1222,1235,1248,1261,1274,1287,1300,1313,1326,1339,1352,1365,1378,1391,1404,1417,1430,1443,1456,1469,1482,1495,1508,1521,1534,1547,1560,1573,1586,1599,1612,1625,1638,1651,1664,1677,1690,1703,1716,1729,1742,1755,1768,1781,1794,1807,1820,1833,1846,1859,1872,1885,1898,1911,1924,1937,1950,1963,1976,1989,2002,2015,2028,2041,2054,2067,2080,2093,2106,2119,2132,2145,2158,2171,2184,2197,2210,2223,2236,2249,2262,2275,2288,2301,2314,2327,2340,2353,2366,2379,2392,2405,2418,2431,2444,2457,2470,2483,2496,2509,2522,2535,2548,2561,2574,2587,2600
mov $1,$0
mul $1,13
|
ACSL.g4 | mmenshchikov/acsl-grammar | 0 | 1222 | /*
* ACSL language grammar based on official specification 1.13.
* Meant for use with ANTLR.
* Copyright belongs to original authors.
*
* Built up by <NAME>.
*
* This work is licensed under the Creative Commons Attribution 4.0
* International License. To view a copy of this license,
* visit http://creativecommons.org/licenses/by/4.0/ or send a letter
* to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
*/
grammar ACSL;
import C;
// Edit to get rid of dependency upon ANTLR C++ target.
@parser::preinclude {
#include "CParser.h"
}
// own additions --- start
@lexer::members {
bool skipCommentSymbols;
}
// own additions --- end
id
: Identifier
;
string
: StringLiteral+
;
// term.tex
literal
: '\\true' # true_constant
| '\\false' # false_constant
// let's use C classes
| Constant # trivial_constant
| string # string_constant
;
bin_op
: '+' | '-' | '*' | '/' | '%' | '<<' | '>>'
| '==' | '!=' | '<=' | '>=' | '>' | '<'
| '&&' | '||' | '^^'
| '&' | '|' | '-->' | '<-->' | '^'
;
unary_op
: '+' | '-'
| '!'
| '-'
| '*'
| '&'
;
term
: literal # literal_term
| poly_id # variable_term
| unary_op term # unary_op_term
| term bin_op term # binary_op_term
| term '[' term ']' # array_access_term
| '{' term '\\with' '[' term ']' '=' term '}' # array_func_modifier_term
| term '.' id # structure_field_access_term
| '{' term '\\with' '.' id '=' term '}' # field_func_modifier_term
| term '->' id # pointer_structure_field_access_term
| '(' type_expr ')' term # cast_term
| poly_id '(' term (',' term)* ')' # func_application_term
| '(' term ')' # parentheses_term
| term '?' term ':' term # ternary_cond_term
| '\\let' id '=' term ';' term # local_binding_term
| 'sizeof' '(' term ')' # sizeof_term
| 'sizeof' '(' typeName ')' # sizeof_type_term
| id ':' term # syntactic_naming_term
| string ':' term # syntactic_naming_term
// oldandresult.tex
| '\\old' '(' term ')' # old_term
| '\\result' # result_term
// memory.tex:
| '\\null' # null_term
| '\\base_addr' one_label? '(' term ')' # base_addr_term
| '\\block_length' one_label? '(' term ')' # block_length_term
// start of own addition
| '\\length' one_label? '(' term ')' # length_term
// end of own addition
| '\\offset' one_label? '(' term ')' # offset_term
| '{' '\\allocation' '}' one_label? '(' term ')' # allocation_term
// exitbehavior.tex
| '\\exit_status' # exit_status_term
// at.tex
| '\\at' '(' term ',' label_id ')' # at_term
// own additions - start
| '\\internal' # internal_term
// own additions - end
;
poly_id
: Identifier
;
// predicate.tex
rel_op
: '==' | '!=' | '<=' | '>=' | '>' | '<'
;
pred
: '\\true' # logical_true_pred
| '\\false' # logical_false_pred
| term (rel_op term)+ # comparison_pred
| ident '(' term (',' term)* ')' # predicate_application_pred
| '(' pred ')' # parentheses_pred
| pred '&&' pred # conjunction_pred
| pred '||' pred # disjunction_pred
| pred '==>' pred # implication_pred
| pred '<==>' pred # equivalence_pred
| '!' pred # negation_pred
| pred '^^' pred # exclusive_or_pred
| term '?' pred ':' pred # ternary_condition_term_pred
| pred '?' pred ':' pred # ternary_condition_pred
| '\\let' id '=' term ';' pred # local_binding_pred
| '\\let' id '=' pred ';' pred # local_binding_pred
| '\\forall' binders ';' pred # universal_quantification_pred
| '\\exists' binders ';' pred # existential_quantification_pred
| id ':' pred # syntactic_naming_pred
| string ':' pred # syntactic_naming_pred
// oldandresult.tex
| '\\old' '(' pred ')' # old_pred
// loc.tex
| '\\subset' '(' tset ',' tset ')' # set_inclusion_pred
| term '\\in' tset # set_membership_pred
// memory.tex:
| '\\allocable' one_label? '(' term ')' # allocable_pred
| '\\freeable' one_label? '(' term ')' # freeable_pred
| '\\fresh' two_labels? '(' term ',' term ')' # fresh_pred
| '\\valid' one_label? '(' location_address ')' # valid_pred
| '\\initialized' one_label? '(' location_address ')' # initialized_pred
| '\\valid_read' one_label? '(' location_address ')' # valid_read_pred
| '\\separated' '(' location_address ',' location_addresses ')' # separated_pred
| '\\context_tagged' '(' strings ')' # context_tagged_pred
// own additions:
| '\\report' '(' pred ',' string ')' # report_pred
// end of own additions
;
ident
: id
;
// binders.tex
binders
: binder (',' binder)*
;
binder
: type_expr variable_ident (',' variable_ident)*
;
type_expr
: logic_type_expr | typeName
;
logic_type_expr
: built_in_logic_type | id
;
built_in_logic_type
: 'boolean' | 'integer' | 'real'
;
variable_ident
: id
| '*' variable_ident
| variable_ident '[]'
| '(' variable_ident ')'
;
// fn_behavior.tex
function_contract
: requires_clause* terminates_clause? decreases_clause? simple_clause* named_behavior* completeness_clause*
;
requires_clause
: 'requires' pred ';'
;
terminates_clause
: 'terminates' pred ';'
;
decreases_clause
: 'decreases' term ('for' id)? ';'
;
simple_clause
: assigns_clause | ensures_clause
| allocation_clause | abrupt_clause
| locks_clause | unlocks_clause // author's additions
| async_clause | joins_clause // author's additions
| sleeps_clause | interleaves_clause // author's additions
| threaded_clause | shares_clause // author's additions
| tagged_clause | tags_clause // author's additions
| forks_clause | executes_clause // author's additions
| report_clause // author's additions
;
// Author's additions: 'report pre failure as' clause
report_pre_failure_clause
: 'report' 'pre' 'failure' 'as' string ';'
;
// Author's additions: 'report post failure as' clause
report_post_failure_clause
: 'report' 'post' 'failure' 'as' string ';'
;
// Author's additions: 'report match as' clause
report_match_clause
: 'report' 'match' 'as' string ';'
;
// Author's additions: report * clause
report_clause
: report_pre_failure_clause
| report_post_failure_clause
| report_match_clause
;
assigns_clause
: 'assigns' locations ';'
;
// Author's additions: 'forks' clause
forks_clause
: 'forks' ';'
;
// Author's additions: 'executes' clause
executes_clause
: 'executes' term ';'
;
// Author's additions: 'locks' clause
locks_clause
: 'locks' locations ';'
;
// Author's additions: 'unlocks' clause
unlocks_clause
: 'unlocks' locations ';'
;
// Author's additions: 'async' clause
async_clause
: 'async' location '->' location ';'
;
// Author's additions: 'joins' clause
joins_clause
: 'joins' locations ';'
;
// Author's additions: 'sleeps' clause
sleeps_clause
: 'sleeps' term ';'
;
// Author's additions: 'interleaves' clause
interleaves_clause
: 'interleaves' 'with' locations ';'
;
// Author's additions: 'threaded' clause
threaded_clause
: 'threaded' ';'
;
// Author's additions: 'shares' clause
shares_clause
: 'shares' locations ';'
;
// Author's additions: 'tagged' clause
tagged_clause
: 'tagged' strings ';'
;
// Author's additions: 'tags' clause
tags_clause
: 'tags' string '->' location ';'
;
strings
: string (',' string)*
;
locations
: location (',' location)* | '\\nothing'
;
location
: tset
;
ensures_clause
: 'ensures' pred ';'
;
named_behavior
: 'behavior' id ':' behavior_body
;
behavior_body
: assumes_clause* requires_clause* simple_clause*
;
assumes_clause
: 'assumes' pred ';'
;
completeness_clause
: 'complete' 'behaviors' (id ',' (',' id)*)? ';'
| 'disjoint' 'behaviors' (id ',' (',' id)*)? ';'
;
// loc.tex
tset
: '\\empty' # tset_empty
| tset '->' id # tset_pointer_access
| tset '.' id # tset_member_access
| '*' tset # tset_deref
| '&' tset # tset_addr
| tset '[' tset ']' # tset_array_access
| term? '..' term? # tset_range
| '\\union' ( tset (',' tset)* ) # tset_union
| '\\inter' ( tset (',' tset)* ) # tset_intersection
| tset '+' tset # tset_plus
| '(' tset ')' # tset_paren
| '{' tset '|' binders (':' pred)? '}' # tset_binders
| '{' (tset (',' tset)*)? '}' # tset_set
| term # tset_term
;
c_compound_statement
: '{' declaration* statement* assertion+ '}'
;
c_statement
: assertion c_statement
;
assertion
: '/*@' 'assert' pred ';' '*/'
| '/*@' 'for' id (',' id)* ':' 'assert' pred ';' '*/'
;
// allocation.tex
allocation_clause
: 'allocates' dyn_allocation_addresses ';' # allocates_clause
| 'frees' dyn_allocation_addresses ';' # frees_clause
;
loop_allocation
: 'loop' 'allocates' dyn_allocation_addresses ';'
| 'loop' 'frees' dyn_allocation_addresses ';'
;
dyn_allocation_addresses
: location_addresses
| '\\nothing'
;
// memory.tex
one_label
: '{' label_id '}'
;
two_labels
: '{' label_id ',' label_id '}'
;
location_addresses
: location_address (',' location_address)*
;
location_address
: tset
;
// exitbehaviour.tex
abrupt_clause
: exits_clause
;
exits_clause
: 'exits' pred ';'
;
abrupt_clause_stmt
: breaks_clause | continues_clause | returns_clause
;
breaks_clause
: 'breaks' pred ';'
;
continues_clause
: 'continues' pred ';'
;
returns_clause
: 'returns' pred ';'
;
// at.tex
label_id
: 'Here' | 'Old' | 'Pre' | 'Post'
| 'LoopEntry' | 'LoopCurrent' | 'Init'
| id
;
// loops.tex
loop_annot
: loop_clause* loop_behavior* loop_variant?
;
loop_clause
: loop_invariant | loop_assigns | loop_allocation
;
loop_invariant
: 'loop' 'invariant' pred ';'
;
loop_assigns
: 'loop' 'assigns' locations ';'
;
loop_behavior
: 'for' id (',' id)* ':' loop_clause+
;
loop_variant
: 'loop' 'variant' term ';'
| 'loop' 'variant' term 'for' id ';'
;
// st_contracts.tex
statement_contract
: ('for' id (',' id)* ':')? requires_clause* simple_clause_stmt* named_behavior_stmt* completeness_clause*
;
simple_clause_stmt
: simple_clause | abrupt_clause_stmt
;
named_behavior_stmt
: 'behavior' id ':' behavior_body_stmt
;
behavior_body_stmt
: assumes_clause* requires_clause* simple_clause_stmt*
;
// own additions --- start
AcslCommentStart
: '/*@' {skipCommentSymbols = true;}
;
AcslCommentEnd
: '*/' {skipCommentSymbols = false;}
;
AcslCommentIntermediate
: '@' { if (skipCommentSymbols) skip(); }
;
acsl_comment_contract
: AcslCommentStart Newline* function_contract AcslCommentEnd Newline*
;
acsl_comment_assertion
: Newline* assertion Newline*
;
acsl_comment_loop_annot
: AcslCommentStart Newline* loop_annot AcslCommentEnd Newline*
;
acsl_comment_statement_contract
: AcslCommentStart Newline* statement_contract AcslCommentEnd Newline*
;
acsl_comment
: acsl_comment_contract
| acsl_comment_assertion
| acsl_comment_loop_annot
| acsl_comment_statement_contract
;
// own additions --- end |
nicolai/thesis/Truncation_Level_Criteria.agda | nicolaikraus/HoTT-Agda | 1 | 7853 | <filename>nicolai/thesis/Truncation_Level_Criteria.agda
{-# OPTIONS --without-K #-}
module Truncation_Level_Criteria where
open import lib.Basics hiding (_⊔_)
open import lib.NType2
open import lib.types.Nat hiding (_+_)
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.Unit
open import lib.types.Empty
open import lib.types.TLevel
open import Preliminaries
open import Pointed
-- Chapter 3: Truncation Level Criteria
-- Chapter 3.1: Hedberg's Theorem Revisited
-- Proposition 3.1.1 is below.
-- Definition 3.1.2
const : ∀{i j} {X : Type i} {Y : Type j} → (f : X → Y) → Type (i ⊔ j)
const {X = X} f = (x₁ x₂ : X) → (f x₁) == (f x₂)
coll : ∀{i} → Type i → Type i
coll X = Σ (X → X) const
pathColl : ∀ {i} → Type i → Type i
pathColl X = (x₁ x₂ : X) → coll (x₁ == x₂)
-- Lemma 3.1.3
discr→pathColl : ∀ {i} {X : Type i} → has-dec-eq X → pathColl X
discr→pathColl dec x₁ x₂ with (dec x₁ x₂)
discr→pathColl dec x₁ x₂ | inl p = (λ _ → p) , (λ _ _ → idp)
discr→pathColl dec x₁ x₂ | inr np = idf _ , λ p → Empty-elim (np p)
-- Lemma 3.1.4
pathColl→isSet : ∀ {i} {X : Type i} → pathColl X → is-set X
pathColl→isSet {X = X} pc x₁ x₂ = all-paths-is-prop paths-equal where
claim : (y₁ y₂ : X) → (p : y₁ == y₂) → p == ! (fst (pc _ _) idp) ∙ fst (pc _ _) p
claim x₁ .x₁ idp = ! (!-inv-l (fst (pc x₁ x₁) idp))
paths-equal : (p₁ p₂ : x₁ == x₂) → p₁ == p₂
paths-equal p₁ p₂ =
p₁ =⟨ claim _ _ p₁ ⟩
! (fst (pc _ _) idp) ∙ fst (pc _ _) p₁ =⟨ ap (λ q → (! (fst (pc x₁ x₁) idp)) ∙ q) (snd (pc _ _) p₁ p₂) ⟩ -- whiskering
! (fst (pc _ _) idp) ∙ fst (pc _ _) p₂ =⟨ ! (claim _ _ p₂) ⟩
p₂ ∎
-- Proposition 3.1.1
hedberg : ∀ {i} {X : Type i} → has-dec-eq X → is-set X
hedberg = pathColl→isSet ∘ discr→pathColl
-- Definition 3.1.5
stable : ∀ {i} → Type i → Type i
stable X = ¬ (¬ X) → X
separated : ∀ {i} → Type i → Type i
separated X = (x₁ x₂ : X) → stable (x₁ == x₂)
-- Proposition 3.1.6
sep→set : ∀ {i} {X : Type i} → (separated X) → is-set X
sep→set {X = X} sep = pathColl→isSet isPc where
isPc : pathColl X
isPc x₁ x₂ = f , c where
f : x₁ == x₂ → x₁ == x₂
f = (sep x₁ x₂) ∘ (λ p np → np p)
c : const f
c p₁ p₂ =
f p₁ =⟨ idp ⟩
(sep x₁ x₂) (λ np → np p₁) =⟨ ap (sep x₁ x₂)
(λ= λ np → Empty-elim {P = λ _ → np p₁ == np p₂} (np p₁)) ⟩
(sep x₁ x₂) (λ np → np p₂) =⟨ idp ⟩
f p₂ ∎
-- Lemma 3.1.7
-- first: definition of 'reflexive propositional relation that implies identity'
rel-ref-id : ∀ {i} → Type i → Type (lsucc i)
rel-ref-id {i} X = Σ (X → X → Type i)
λ R →
((x : X) → R x x)
× ((x₁ x₂ : X) → (R x₁ x₂) → x₁ == x₂)
× ((x₁ x₂ : X) → is-prop (R x₁ x₂))
-- the actual Lemma 3.1.7
module lem317 {i : _} (X : Type i) (Rrip : rel-ref-id X) where
R : X → X → Type i
R = fst Rrip
ref : (x : X) → R x x
ref = fst (snd (Rrip)) -- fst (fst (snd Rrip))
ii : (x₁ x₂ : X) → (R x₁ x₂) → x₁ == x₂
ii = fst (snd (snd (Rrip))) -- snd (fst (snd Rrip))
pr : (x₁ x₂ : X) → is-prop (R x₁ x₂)
pr = snd (snd (snd Rrip))
f : (x₁ x₂ : X) → x₁ == x₂ → R x₁ x₂
f x₁ .x₁ idp = ref x₁
id↔R : (x₁ x₂ : X) → (x₁ == x₂) ↔ R x₁ x₂
id↔R x₁ x₂ = f _ _ , ii _ _
pc : pathColl X
pc x₁ x₂ = ii _ _ ∘ f _ _ , λ p₁ p₂ → ap (ii x₁ x₂) (prop-has-all-paths (pr x₁ x₂) _ _)
isSet : is-set X
isSet = pathColl→isSet pc
open wtrunc
-- Definition 3.1.9
splitSup : ∀ {i} → (X : Type i) → Type i
splitSup X = ∣∣ X ∣∣ → X
hSeparated : ∀ {i} → (X : Type i) → Type i
hSeparated X = (x₁ x₂ : X) → splitSup (x₁ == x₂)
-- Proposition 3.1.10
-- we show "2->1", "1->3", "3->2" as in the thesis.
-- for the last part, we show "1->4" and "4->3
set-characterisations : ∀ {i} → (X : Type i) →
(pathColl X → is-set X)
× (is-set X → rel-ref-id X)
× (rel-ref-id X → pathColl X)
× (is-set X → hSeparated X)
× (hSeparated X → rel-ref-id X)
set-characterisations X =
pathColl→isSet ,
(λ ss → _==_ , (λ _ → idp) , (λ _ _ p → p) , ss) ,
(lem317.pc X) ,
(λ ss x₁ x₂ → tr-rec (ss x₁ x₂) (λ p → p)) ,
(λ hsep → ((λ x₁ x₂ → ∣∣ x₁ == x₂ ∣∣) , (λ _ → ∣ idp ∣) , hsep , λ _ _ → tr-is-prop))
-- The rest of this section is only a replication of the arguments that we have given so far (for that reason, the proofs are not given in the article).
-- They do not directly follow from the propositions that we have proved before, but they directly imply them.
-- Of course, replication of arguments is not a good style for a formalization -
-- we chose this "disadvantageous" order purely as we believe it led to a better presentation in the article.
-- Lemma 3.1.11
pathColl→isSet-local : ∀ {i} {X : Type i} → {x₀ : X} → ((y : X) → coll (x₀ == y)) → (y : X) → is-prop (x₀ == y)
pathColl→isSet-local {X = X} {x₀} pc y = all-paths-is-prop paths-equal where
claim : (y : X) → (p : x₀ == y) → p == ! (fst (pc _) idp) ∙ fst (pc _) p
claim .x₀ idp = ! (!-inv-l (fst (pc _) idp))
paths-equal : (p₁ p₂ : x₀ == y) → p₁ == p₂
paths-equal p₁ p₂ =
p₁ =⟨ claim _ p₁ ⟩
! (fst (pc _) idp) ∙ fst (pc _) p₁ =⟨ ap (λ q → (! (fst (pc x₀) idp)) ∙ q) (snd (pc y) p₁ p₂) ⟩ -- whiskering
! (fst (pc _) idp) ∙ fst (pc _) p₂ =⟨ ! (claim _ p₂) ⟩
p₂ ∎
-- Proposition 3.11.12
hedberg-local : ∀ {i} {X : Type i} → {x₀ : X} → ((y : X) → Coprod (x₀ == y) (¬(x₀ == y))) → (y : X) → is-prop (x₀ == y)
hedberg-local {X = X} {x₀ = x₀} dec = pathColl→isSet-local local-pathColl where
local-pathColl : (y : X) → coll (x₀ == y)
local-pathColl y with (dec y)
local-pathColl y₁ | inl p = (λ _ → p) , (λ _ _ → idp)
local-pathColl y₁ | inr np = idf _ , (λ p → Empty-elim (np p))
-- Lemma 3.1.13. This needs function extensionality.
sep→set-local : ∀ {i} {X : Type i} {x₀ : X} → ((y : X) → stable (x₀ == y)) → (y : X) → is-prop (x₀ == y)
sep→set-local {X = X} {x₀ = x₀} sep = pathColl→isSet-local is-pathColl where
is-pathColl : (y : X) → coll (x₀ == y)
is-pathColl y = f , c where
f : x₀ == y → x₀ == y
f = (sep y) ∘ (λ p np → np p)
c : const f
c p₁ p₂ =
f p₁ =⟨ idp ⟩
(sep _) (λ np → np p₁) =⟨ ap (sep y)
(λ= (λ np → prop-has-all-paths Empty-is-prop _ _)) ⟩
(sep _) (λ np → np p₂) =⟨ idp ⟩
f p₂ ∎
-- Chapter 3.2: Generalisations to Higher Levels
-- first: some lemmata.
-- If A -> B -> A is the identity, then
-- a₁ == a₂ → s a₁ == s a₂ → r(s a₁) == r(s a₂)
-- is also the identity in an appropriate sense
retract-path-retract : ∀ {i j} {A : Type i} {B : Type j}
→ (s : A → B) → (r : B → A) → (s-r : (a : A) → r (s a) == a)
→ (a₁ a₂ : A)
→ (p : a₁ == a₂) → ! (s-r a₁) ∙ (ap r (ap s p)) ∙ (s-r a₂) == p
retract-path-retract s r s-r a₁ .a₁ idp = !-inv-l (s-r a₁)
-- retracts of n-types are n-truncated
retract-is-truncated : ∀ {n : ℕ₋₂} {i j} {A : Type i} {B : Type j}
→ (has-level n B) → (s : A → B) → (r : B → A) → ((a : A) → r (s a) == a) → has-level n A
retract-is-truncated {⟨-2⟩} h s r s-r = inhab-prop-is-contr (r (fst h)) (all-paths-is-prop (λ a₁ a₂ →
a₁ =⟨ ! (s-r a₁) ⟩
r(s(a₁)) =⟨ ap r (contr-has-all-paths h _ _) ⟩
r(s(a₂)) =⟨ s-r a₂ ⟩
a₂ ∎
))
retract-is-truncated {S n} h s r s-r a₁ a₂ =
retract-is-truncated {n} {A = a₁ == a₂} {B = s a₁ == s a₂}
(h (s a₁) (s a₂))
(ap s)
(λ p → ! (s-r a₁) ∙ (ap r p) ∙ (s-r a₂))
(retract-path-retract s r s-r a₁ a₂)
-- this is essentially one direction of a local version of the lemma which says that
-- a type is n-truncated iff its loop spaces are (n-1)-truncated
trunclevel-aux₁ : ∀ {i} {X : Type i} {x₀ : X} → (n : ℕ) → ((x : X) → has-level (n -2) (x₀ == x))
→ is-contr (fst ((Ω ^ n) (X , x₀)))
trunclevel-aux₁ {x₀ = x₀} O h = x₀ , λ x → fst (h x)
trunclevel-aux₁ {X = X} {x₀ = x₀} (S n) h = trunclevel-aux₁ n (h x₀ idp)
-- the other direction...
trunclevel-aux₂ : ∀ {i} {X : Type i} {x₀ : X} → (n : ℕ) → is-contr (fst ((Ω ^ n) (X , x₀)))
→ ((x : X) → has-level (n -2) (x₀ == x))
trunclevel-aux₂ {X = X} {x₀ = x₀} O h = λ x → inhab-prop-is-contr (contr-has-all-paths h x₀ x) (contr-is-prop (contr-is-prop h x₀ x))
trunclevel-aux₂ {X = X} {x₀ = x₀} (S n) h .x₀ idp = trunclevel-aux₂ n h
-- Theorem 3.2.1
-- in the thesis, we write "let n ≥ -1 be a number".
-- As we do not want to introduce a type of number that are at least -1,
-- we use ℕ.
-- To make up for this, we reduce n everywhere by 1.
module GLHA {i : ULevel} {X : Type i} {x₀ : X} {n : ℕ} where
Ω-contr : Type i
-- loop-contr = is-contr (fst ((Ω ^ (n + 1)) (X , x₀)))
Ω-contr = is-contr (fst ((Ω ^ n) (X , x₀)))
locally-truncated : Type i
-- locally-truncated = (x : X) → has-level (n -1) (x₀ == x)
locally-truncated = (x : X) → has-level (n -2) (x₀ == x)
tr-rel-id : Type (lsucc i)
tr-rel-id = Σ (X → Type i) λ Q →
-- ((x : X) → has-level (n -1) (Q x))
((x : X) → has-level (n -2) (Q x))
× (Q x₀)
× ((x : X) → Q x → x₀ == x)
tr-rel-id→locally-truncated : tr-rel-id → locally-truncated
tr-rel-id→locally-truncated (Q , h , q₀ , ii) = λ x → retract-is-truncated {n = n -2} {A = x₀ == x} {B = Q x} (h x) s r r-s where
r : {x : X} → (Q x) → (x₀ == x)
r {x} q = ! (ii x₀ q₀) ∙ (ii x q)
s : {x : X} → (x₀ == x) → Q x
s idp = q₀
r-s : {x : X} → (p : x₀ == x) → r (s p) == p
r-s idp = !-inv-l (ii x₀ q₀)
locally-truncated→Ω-contr : locally-truncated → Ω-contr
locally-truncated→Ω-contr loctr = trunclevel-aux₁ n loctr -- trunclevel-aux n loctr
Ω-contr→tr-rel-id : Ω-contr → tr-rel-id
Ω-contr→tr-rel-id h = (λ x → x₀ == x) , (trunclevel-aux₂ n h) , idp , (λ x p → p)
module with-higher-truncs where
-- for convenience, we import truncations from the library.
open import lib.types.Truncation
-- fourth item in Theorem 3.2.1
id-stable : Type i
id-stable = (x : X) → Trunc (n -2) (x₀ == x) → x₀ == x
-- it is very easy to see that (4) and (2) are logically equivalent.
-- 2 ⇒ 4
tr-rel-id→id-stable : tr-rel-id → id-stable
tr-rel-id→id-stable (Q , h , q₀ , ii) = λ x → (ii x) ∘ (Trunc-rec (h x) (λ p → transport _ p q₀))
-- 4 ⇒ 2
id-stable→tr-rel-id : id-stable → tr-rel-id
id-stable→tr-rel-id idst = (λ x → Trunc (n -2) (x₀ == x)) , (λ _ → Trunc-level) , [ idp ] , idst
|
oeis/066/A066949.asm | neoneye/loda-programs | 11 | 245465 | <reponame>neoneye/loda-programs
; A066949: Take the sum of the previous two terms, subtract n if this sum is greater than n.
; Submitted by <NAME>
; 0,1,1,2,3,5,2,7,1,8,9,6,3,9,12,6,2,8,10,18,8,5,13,18,7,25,6,4,10,14,24,7,31,5,2,7,9,16,25,2,27,29,14,43,13,11,24,35,11,46,7,2,9,11,20,31,51,25,18,43,1,44,45,26,7,33,40,6,46,52,28,9,37,46,9,55,64,42,28,70,18,7,25,32,57,4,61,65,38,14,52,66,26,92,24,21,45,66,13,79
mov $1,3
mov $2,1
mov $4,1
lpb $0
sub $0,1
sub $1,1
sub $2,1
mod $2,$1
add $1,2
add $2,1
mov $3,$4
mov $4,$2
add $2,$3
lpe
mov $0,$3
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_486.asm | ljhsiun2/medusa | 9 | 89724 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x176e5, %rax
nop
nop
nop
add $16958, %r12
vmovups (%rax), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rsi
mfence
lea addresses_D_ht+0x18c5, %rsi
lea addresses_normal_ht+0x1e977, %rdi
nop
nop
nop
sub $16683, %rdx
mov $58, %rcx
rep movsw
nop
nop
nop
nop
nop
add $11057, %rcx
lea addresses_WT_ht+0x18ac5, %r12
sub $19343, %rax
mov $0x6162636465666768, %rsi
movq %rsi, (%r12)
sub %rdx, %rdx
lea addresses_A_ht+0x142c5, %rcx
clflush (%rcx)
nop
cmp %r13, %r13
movl $0x61626364, (%rcx)
nop
nop
add $45317, %r13
lea addresses_D_ht+0x2ac5, %rsi
lea addresses_D_ht+0xdac5, %rdi
nop
xor $27396, %r12
mov $36, %rcx
rep movsw
add %r13, %r13
lea addresses_UC_ht+0xfec5, %rdx
nop
nop
nop
nop
cmp $33936, %r13
movb $0x61, (%rdx)
nop
nop
nop
inc %rax
lea addresses_normal_ht+0x14ec5, %rsi
lea addresses_normal_ht+0x1a095, %rdi
nop
nop
add %r9, %r9
mov $7, %rcx
rep movsb
nop
sub $25670, %rdx
lea addresses_normal_ht+0x1e505, %r9
nop
nop
nop
add $30384, %rdi
mov $0x6162636465666768, %r12
movq %r12, (%r9)
nop
nop
nop
nop
and $7239, %rdx
lea addresses_D_ht+0x18303, %rdi
nop
sub %r12, %r12
mov (%rdi), %r13d
nop
nop
cmp $21696, %r12
lea addresses_WC_ht+0x1d145, %r12
nop
nop
nop
add $59189, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%r12)
sub $31572, %r9
lea addresses_WT_ht+0xbfb1, %r13
nop
nop
nop
nop
nop
dec %rcx
and $0xffffffffffffffc0, %r13
movaps (%r13), %xmm3
vpextrq $1, %xmm3, %r9
add %rax, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdx
// Store
mov $0x9c1e0000000bc5, %rax
add %r14, %r14
mov $0x5152535455565758, %r9
movq %r9, (%rax)
nop
nop
add %r10, %r10
// Store
mov $0x3816b50000000e61, %r10
nop
nop
nop
nop
add $50050, %r14
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
vmovntdq %ymm5, (%r10)
nop
nop
nop
and %rcx, %rcx
// Store
lea addresses_WC+0xf0b5, %rdx
nop
nop
nop
sub $41303, %r8
mov $0x5152535455565758, %rcx
movq %rcx, (%rdx)
nop
nop
nop
nop
nop
sub $60867, %rax
// Store
lea addresses_UC+0x1d6c5, %r14
and %r8, %r8
movb $0x51, (%r14)
nop
nop
nop
nop
nop
inc %r9
// Faulty Load
lea addresses_UC+0x11ac5, %rax
sub %rcx, %rcx
movb (%rax), %r8b
lea oracles, %r10
and $0xff, %r8
shlq $12, %r8
mov (%r10,%r8,1), %r8
pop %rdx
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': True, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_NC'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_WC'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 11, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': True, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 1, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
external/defyx/src/jit_compiler_x86_static.asm | blackrangersoftware/brs-scala | 0 | 27163 | ; Copyright (c) 2018-2019, tevador <<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 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.
IFDEF RAX
_RANDOMX_JITX86_STATIC SEGMENT PAGE READ EXECUTE
PUBLIC defyx_prefetch_scratchpad
PUBLIC defyx_prefetch_scratchpad_end
PUBLIC defyx_program_prologue
PUBLIC defyx_program_prologue_first_load
PUBLIC defyx_program_loop_begin
PUBLIC defyx_program_loop_load
PUBLIC defyx_program_start
PUBLIC defyx_program_read_dataset
PUBLIC defyx_program_read_dataset_sshash_init
PUBLIC defyx_program_read_dataset_sshash_fin
PUBLIC defyx_dataset_init
PUBLIC defyx_program_loop_store
PUBLIC defyx_program_loop_end
PUBLIC defyx_program_epilogue
PUBLIC defyx_sshash_load
PUBLIC defyx_sshash_prefetch
PUBLIC defyx_sshash_end
PUBLIC defyx_sshash_init
PUBLIC defyx_program_end
PUBLIC defyx_reciprocal_fast
include asm/configuration.asm
RANDOMX_SCRATCHPAD_MASK EQU (RANDOMX_SCRATCHPAD_L3-64)
RANDOMX_DATASET_BASE_MASK EQU (RANDOMX_DATASET_BASE_SIZE-64)
RANDOMX_CACHE_MASK EQU (RANDOMX_ARGON_MEMORY*16-1)
RANDOMX_ALIGN EQU 4096
SUPERSCALAR_OFFSET EQU ((((RANDOMX_ALIGN + 32 * RANDOMX_PROGRAM_SIZE) - 1) / (RANDOMX_ALIGN) + 1) * (RANDOMX_ALIGN))
defyx_prefetch_scratchpad PROC
mov rdx, rax
and eax, RANDOMX_SCRATCHPAD_MASK
prefetcht0 [rsi+rax]
ror rdx, 32
and edx, RANDOMX_SCRATCHPAD_MASK
prefetcht0 [rsi+rdx]
defyx_prefetch_scratchpad ENDP
defyx_prefetch_scratchpad_end PROC
defyx_prefetch_scratchpad_end ENDP
ALIGN 64
defyx_program_prologue PROC
include asm/program_prologue_win64.inc
movapd xmm13, xmmword ptr [mantissaMask]
movapd xmm14, xmmword ptr [exp240]
movapd xmm15, xmmword ptr [scaleMask]
defyx_program_prologue ENDP
defyx_program_prologue_first_load PROC
xor rax, r8
xor rax, r8
mov rdx, rax
and eax, RANDOMX_SCRATCHPAD_MASK
ror rdx, 32
and edx, RANDOMX_SCRATCHPAD_MASK
jmp defyx_program_loop_begin
defyx_program_prologue_first_load ENDP
ALIGN 64
include asm/program_xmm_constants.inc
ALIGN 64
defyx_program_loop_begin PROC
nop
defyx_program_loop_begin ENDP
defyx_program_loop_load PROC
include asm/program_loop_load.inc
defyx_program_loop_load ENDP
defyx_program_start PROC
nop
defyx_program_start ENDP
defyx_program_read_dataset PROC
include asm/program_read_dataset.inc
defyx_program_read_dataset ENDP
defyx_program_read_dataset_sshash_init PROC
include asm/program_read_dataset_sshash_init.inc
defyx_program_read_dataset_sshash_init ENDP
defyx_program_read_dataset_sshash_fin PROC
include asm/program_read_dataset_sshash_fin.inc
defyx_program_read_dataset_sshash_fin ENDP
defyx_program_loop_store PROC
include asm/program_loop_store.inc
defyx_program_loop_store ENDP
defyx_program_loop_end PROC
nop
defyx_program_loop_end ENDP
ALIGN 64
defyx_dataset_init PROC
push rbx
push rbp
push rdi
push rsi
push r12
push r13
push r14
push r15
mov rdi, qword ptr [rcx] ;# cache->memory
mov rsi, rdx ;# dataset
mov rbp, r8 ;# block index
push r9 ;# max. block index
init_block_loop:
prefetchw byte ptr [rsi]
mov rbx, rbp
db 232 ;# 0xE8 = call
dd SUPERSCALAR_OFFSET - distance
distance equ $ - offset defyx_dataset_init
mov qword ptr [rsi+0], r8
mov qword ptr [rsi+8], r9
mov qword ptr [rsi+16], r10
mov qword ptr [rsi+24], r11
mov qword ptr [rsi+32], r12
mov qword ptr [rsi+40], r13
mov qword ptr [rsi+48], r14
mov qword ptr [rsi+56], r15
add rbp, 1
add rsi, 64
cmp rbp, qword ptr [rsp]
jb init_block_loop
pop r9
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rdi
pop rbp
pop rbx
ret
defyx_dataset_init ENDP
ALIGN 64
defyx_program_epilogue PROC
include asm/program_epilogue_store.inc
include asm/program_epilogue_win64.inc
defyx_program_epilogue ENDP
ALIGN 64
defyx_sshash_load PROC
include asm/program_sshash_load.inc
defyx_sshash_load ENDP
defyx_sshash_prefetch PROC
include asm/program_sshash_prefetch.inc
defyx_sshash_prefetch ENDP
defyx_sshash_end PROC
nop
defyx_sshash_end ENDP
ALIGN 64
defyx_sshash_init PROC
lea r8, [rbx+1]
include asm/program_sshash_prefetch.inc
imul r8, qword ptr [r0_mul]
mov r9, qword ptr [r1_add]
xor r9, r8
mov r10, qword ptr [r2_add]
xor r10, r8
mov r11, qword ptr [r3_add]
xor r11, r8
mov r12, qword ptr [r4_add]
xor r12, r8
mov r13, qword ptr [r5_add]
xor r13, r8
mov r14, qword ptr [r6_add]
xor r14, r8
mov r15, qword ptr [r7_add]
xor r15, r8
jmp defyx_program_end
defyx_sshash_init ENDP
ALIGN 64
include asm/program_sshash_constants.inc
ALIGN 64
defyx_program_end PROC
nop
defyx_program_end ENDP
defyx_reciprocal_fast PROC
include asm/defyx_reciprocal.inc
defyx_reciprocal_fast ENDP
_RANDOMX_JITX86_STATIC ENDS
ENDIF
END |
programs/oeis/270/A270472.asm | karttu/loda | 1 | 82579 | ; A270472: Expansion of (1-2*x)/(1-9*x).
; 1,7,63,567,5103,45927,413343,3720087,33480783,301327047,2711943423,24407490807,219667417263,1977006755367,17793060798303,160137547184727,1441237924662543,12971141321962887
mov $1,9
pow $1,$0
mul $1,7
div $1,18
mul $1,2
add $1,1
|
alloy4fun_models/trashltl/models/12/RphjZFw522hZLzk5i.als | Kaixi26/org.alloytools.alloy | 0 | 771 | <filename>alloy4fun_models/trashltl/models/12/RphjZFw522hZLzk5i.als<gh_stars>0
open main
pred idRphjZFw522hZLzk5i_prop13 {
eventually all f:File | f in Trash implies once f not in Trash
}
pred __repair { idRphjZFw522hZLzk5i_prop13 }
check __repair { idRphjZFw522hZLzk5i_prop13 <=> prop13o } |
src/jason-projects-beans.ads | stcarrez/jason | 2 | 26334 | -----------------------------------------------------------------------
-- jason-projects-beans -- Beans for module projects
-- Copyright (C) 2016 Stephane.Carrez
-- Written by Stephane.Carrez (<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 Ada.Strings.Unbounded;
with ADO;
with ASF.Helpers.Beans;
with AWA.Tags.Beans;
with AWA.Wikis.Beans;
with Util.Beans.Basic;
with Util.Beans.Objects;
with Jason.Projects.Modules;
with Jason.Projects.Models;
package Jason.Projects.Beans is
type Project_Bean is new Jason.Projects.Models.Project_Bean with record
Module : Jason.Projects.Modules.Project_Module_Access := null;
Count : Natural := 0;
Id : ADO.Identifier := ADO.NO_IDENTIFIER;
-- List of tags associated with the wiki page.
Tags : aliased AWA.Tags.Beans.Tag_List_Bean;
Tags_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- The wiki space.
Wiki_Space : AWA.Wikis.Beans.Wiki_Space_Bean;
end record;
type Project_Bean_Access is access all Project_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Project_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Project_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Create project action.
overriding
procedure Create (Bean : in out Project_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Save project action.
overriding
procedure Save (Bean : in out Project_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load project information.
overriding
procedure Load (Bean : in out Project_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the wiki space.
overriding
procedure Create_Wiki (Bean : in out Project_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load the project if it is associated with the current wiki space.
overriding
procedure Load_Wiki (Bean : in out Project_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Projects_Bean bean instance.
function Create_Project_Bean (Module : in Jason.Projects.Modules.Project_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
function Get_Project_Bean is
new ASF.Helpers.Beans.Get_Bean (Element_Type => Project_Bean,
Element_Access => Project_Bean_Access);
-- ------------------------------
-- Bean that collects the list of projects filtered by tag, priority and status.
-- ------------------------------
type Project_List_Bean is new Jason.Projects.Models.Project_List_Bean with record
Module : Jason.Projects.Modules.Project_Module_Access := null;
Project : Jason.Projects.Models.Project_Ref;
-- List of tickets.
Projects : aliased Jason.Projects.Models.List_Info_List_Bean;
Projects_Bean : Jason.Projects.Models.List_Info_List_Bean_Access;
-- List of tags associated with the tickets.
Tags : AWA.Tags.Beans.Entity_Tag_Map;
end record;
type Project_List_Bean_Access is access all Project_List_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Project_List_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Project_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Load list of tickets.
overriding
procedure Load (Bean : in out Project_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Project_List_Bean bean instance.
function Create_Project_List_Bean (Module : in Jason.Projects.Modules.Project_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
end Jason.Projects.Beans;
|
12_02CBMScrDisp/bak/DisplayScreens.asm | phaze101/C64-Bedtime-Coding-Public | 0 | 97046 | <reponame>phaze101/C64-Bedtime-Coding-Public<gh_stars>0
;==============================================================================
; Display Screen with Text
;==============================================================================
DisplayScreens
lda #SpaceCharacter ;Fill value
ldy #Black ;Colour Value
jsr ScrFill
;Display Home Screen
lda HomeScreen ;Get number of strings
sta ZeroTmpMem01 ;store it in out templocation
lda #<HomeScreen+1 ;CBMProgStudio Enable
;Calc address first then Lo/Hi Byte
ldy #>HomeScreen+1 ;CBMProgStudio Enable
;Calc address first then Lo/Hi Byte
jsr PrintAT
jsr WaitForSpace
lda #SpaceCharacter ;Fill value
ldy #Black ;Colour Value
jsr ScrFill
;Display Game Screen
jsr CBMScreen
jsr WaitForSpace
lda #SpaceCharacter ;Fill value
ldy #Black ;Colour Value
jsr ScrFill
;Display Game Over Screen
lda GameOverScreen ;Get number of strings
sta ZeroTmpMem01 ;store it in out temp location
lda #<GameOverScreen+1 ;CBMProgStudio Enable
;Calc address first then Lo/Hi Byte
ldy #>GameOverScreen+1 ;CBMProgStudio Enable
;Calc address first then Lo/Hi Byte
jsr PrintAT
rts
|
programs/oeis/215/A215761.asm | neoneye/loda | 22 | 27633 | ; A215761: Numbers m with property that 36m+11 is prime.
; 0,1,2,5,6,7,12,13,16,18,23,25,26,27,28,30,32,36,40,41,42,43,46,50,51,56,57,58,61,62,65,67,68,70,75,78,81,82,83,90,92,93,96,98,103,107,111,113,118,126,127,130,133,135,137,140,141,145,147,152,153,155,161,162,163,166,170,172,175,180,182,183,188,193,197,200,201,202,208,211,212,217,223,225,226,228,230,232,237,245,246,250,256,260,263,265,266,267,271,272
mov $2,$0
add $2,1
pow $2,2
lpb $2
add $1,10
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,26
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,2
sub $1,22
mul $1,2
add $1,8
div $1,36
mov $0,$1
|
.emacs.d/elpa/ada-mode-7.0.1/ada_process_lr1_main.adb | caqg/linux-home | 0 | 24039 | -- generated parser support file.
-- command line: wisitoken-bnf-generate.exe --generate LR1 Ada_Emacs re2c PROCESS text_rep ada.wy
--
-- Copyright (C) 2013 - 2019 Free Software Foundation, Inc.
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 3, or (at
-- your option) any later version.
--
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
with Ada_Process_Actions; use Ada_Process_Actions;
with WisiToken.Lexer.re2c;
with ada_re2c_c;
package body Ada_Process_LR1_Main is
package Lexer is new WisiToken.Lexer.re2c
(ada_re2c_c.New_Lexer,
ada_re2c_c.Free_Lexer,
ada_re2c_c.Reset_Lexer,
ada_re2c_c.Next_Token);
procedure Create_Parser
(Parser : out WisiToken.Parse.LR.Parser.Parser;
Language_Fixes : in WisiToken.Parse.LR.Parser.Language_Fixes_Access;
Language_Matching_Begin_Tokens : in WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;
Language_String_ID_Set : in WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access;
Trace : not null access WisiToken.Trace'Class;
User_Data : in WisiToken.Syntax_Trees.User_Data_Access;
Text_Rep_File_Name : in String)
is
use WisiToken.Parse.LR;
McKenzie_Param : constant McKenzie_Param_Type :=
(First_Terminal => 3,
Last_Terminal => 108,
First_Nonterminal => 109,
Last_Nonterminal => 333,
Insert =>
(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4),
Delete =>
(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4),
Push_Back =>
(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2),
Undo_Reduce =>
(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2),
Minimal_Complete_Cost_Delta => -3,
Fast_Forward => 2,
Matching_Begin => 3,
Ignore_Check_Fail => 2,
Task_Count => 0,
Check_Limit => 4,
Check_Delta_Limit => 100,
Enqueue_Limit => 58000);
function Actions return WisiToken.Parse.LR.Semantic_Action_Array_Arrays.Vector
is begin
return Acts : WisiToken.Parse.LR.Semantic_Action_Array_Arrays.Vector do
Acts.Set_First_Last (109, 333);
Acts (113).Set_First_Last (0, 0);
Acts (113)(0) := (abstract_subprogram_declaration_0'Access, null);
Acts (114).Set_First_Last (0, 1);
Acts (114)(0) := (accept_statement_0'Access, accept_statement_0_check'Access);
Acts (114)(1) := (accept_statement_1'Access, null);
Acts (115).Set_First_Last (0, 2);
Acts (115)(0) := (access_definition_0'Access, null);
Acts (115)(1) := (access_definition_1'Access, null);
Acts (115)(2) := (access_definition_2'Access, null);
Acts (116).Set_First_Last (0, 1);
Acts (116)(0) := (actual_parameter_part_0'Access, null);
Acts (116)(1) := (actual_parameter_part_1'Access, null);
Acts (118).Set_First_Last (0, 5);
Acts (118)(0) := (aggregate_0'Access, null);
Acts (118)(1) := (aggregate_1'Access, null);
Acts (118)(3) := (aggregate_3'Access, null);
Acts (118)(4) := (aggregate_4'Access, null);
Acts (118)(5) := (aggregate_5'Access, null);
Acts (121).Set_First_Last (0, 1);
Acts (121)(0) := (array_type_definition_0'Access, null);
Acts (121)(1) := (array_type_definition_1'Access, null);
Acts (122).Set_First_Last (0, 3);
Acts (122)(0) := (aspect_clause_0'Access, null);
Acts (123).Set_First_Last (0, 1);
Acts (123)(0) := (aspect_specification_opt_0'Access, null);
Acts (124).Set_First_Last (0, 0);
Acts (124)(0) := (assignment_statement_0'Access, null);
Acts (125).Set_First_Last (0, 6);
Acts (125)(0) := (association_opt_0'Access, null);
Acts (125)(2) := (association_opt_2'Access, null);
Acts (125)(3) := (association_opt_3'Access, null);
Acts (125)(4) := (association_opt_4'Access, null);
Acts (125)(5) := (association_opt_5'Access, null);
Acts (127).Set_First_Last (0, 0);
Acts (127)(0) := (asynchronous_select_0'Access, null);
Acts (128).Set_First_Last (0, 0);
Acts (128)(0) := (at_clause_0'Access, null);
Acts (132).Set_First_Last (0, 0);
Acts (132)(0) := (block_label_0'Access, block_label_0_check'Access);
Acts (133).Set_First_Last (0, 1);
Acts (133)(0) := (null, block_label_opt_0_check'Access);
Acts (133)(1) := (null, null);
Acts (134).Set_First_Last (0, 1);
Acts (134)(0) := (block_statement_0'Access, block_statement_0_check'Access);
Acts (134)(1) := (block_statement_1'Access, block_statement_1_check'Access);
Acts (137).Set_First_Last (0, 0);
Acts (137)(0) := (case_expression_0'Access, null);
Acts (138).Set_First_Last (0, 0);
Acts (138)(0) := (case_expression_alternative_0'Access, null);
Acts (139).Set_First_Last (0, 1);
Acts (139)(0) := (case_expression_alternative_list_0'Access, null);
Acts (140).Set_First_Last (0, 0);
Acts (140)(0) := (case_statement_0'Access, null);
Acts (141).Set_First_Last (0, 0);
Acts (141)(0) := (case_statement_alternative_0'Access, null);
Acts (142).Set_First_Last (0, 1);
Acts (142)(0) := (case_statement_alternative_list_0'Access, null);
Acts (143).Set_First_Last (0, 4);
Acts (143)(2) := (compilation_unit_2'Access, null);
Acts (144).Set_First_Last (0, 1);
Acts (144)(0) := (compilation_unit_list_0'Access, null);
Acts (144)(1) := (compilation_unit_list_1'Access, compilation_unit_list_1_check'Access);
Acts (145).Set_First_Last (0, 0);
Acts (145)(0) := (component_clause_0'Access, null);
Acts (147).Set_First_Last (0, 1);
Acts (147)(0) := (component_declaration_0'Access, null);
Acts (147)(1) := (component_declaration_1'Access, null);
Acts (150).Set_First_Last (0, 4);
Acts (150)(4) := (component_list_4'Access, null);
Acts (153).Set_First_Last (0, 0);
Acts (153)(0) := (conditional_entry_call_0'Access, null);
Acts (158).Set_First_Last (0, 16);
Acts (158)(9) := (declaration_9'Access, null);
Acts (162).Set_First_Last (0, 1);
Acts (162)(0) := (delay_statement_0'Access, null);
Acts (162)(1) := (delay_statement_1'Access, null);
Acts (163).Set_First_Last (0, 1);
Acts (163)(0) := (derived_type_definition_0'Access, null);
Acts (163)(1) := (derived_type_definition_1'Access, null);
Acts (170).Set_First_Last (0, 2);
Acts (170)(1) := (discriminant_part_opt_1'Access, null);
Acts (173).Set_First_Last (0, 0);
Acts (173)(0) := (elsif_expression_item_0'Access, null);
Acts (174).Set_First_Last (0, 1);
Acts (174)(0) := (elsif_expression_list_0'Access, null);
Acts (175).Set_First_Last (0, 0);
Acts (175)(0) := (elsif_statement_item_0'Access, null);
Acts (176).Set_First_Last (0, 1);
Acts (176)(0) := (elsif_statement_list_0'Access, null);
Acts (177).Set_First_Last (0, 0);
Acts (177)(0) := (entry_body_0'Access, entry_body_0_check'Access);
Acts (178).Set_First_Last (0, 1);
Acts (178)(0) := (entry_body_formal_part_0'Access, null);
Acts (180).Set_First_Last (0, 1);
Acts (180)(0) := (entry_declaration_0'Access, null);
Acts (180)(1) := (entry_declaration_1'Access, null);
Acts (183).Set_First_Last (0, 0);
Acts (183)(0) := (enumeration_representation_clause_0'Access, null);
Acts (184).Set_First_Last (0, 0);
Acts (184)(0) := (enumeration_type_definition_0'Access, null);
Acts (187).Set_First_Last (0, 0);
Acts (187)(0) := (exception_declaration_0'Access, null);
Acts (188).Set_First_Last (0, 1);
Acts (188)(0) := (exception_handler_0'Access, null);
Acts (188)(1) := (exception_handler_1'Access, null);
Acts (189).Set_First_Last (0, 2);
Acts (189)(0) := (exception_handler_list_0'Access, null);
Acts (191).Set_First_Last (0, 1);
Acts (191)(0) := (exit_statement_0'Access, null);
Acts (191)(1) := (exit_statement_1'Access, null);
Acts (194).Set_First_Last (0, 0);
Acts (194)(0) := (expression_function_declaration_0'Access, null);
Acts (195).Set_First_Last (0, 1);
Acts (195)(0) := (extended_return_object_declaration_0'Access, null);
Acts (195)(1) := (extended_return_object_declaration_1'Access, null);
Acts (197).Set_First_Last (0, 1);
Acts (197)(0) := (extended_return_statement_0'Access, null);
Acts (197)(1) := (extended_return_statement_1'Access, null);
Acts (199).Set_First_Last (0, 3);
Acts (199)(0) := (formal_object_declaration_0'Access, null);
Acts (199)(1) := (formal_object_declaration_1'Access, null);
Acts (199)(2) := (formal_object_declaration_2'Access, null);
Acts (199)(3) := (formal_object_declaration_3'Access, null);
Acts (200).Set_First_Last (0, 0);
Acts (200)(0) := (formal_part_0'Access, null);
Acts (201).Set_First_Last (0, 3);
Acts (201)(0) := (formal_subprogram_declaration_0'Access, null);
Acts (201)(1) := (formal_subprogram_declaration_1'Access, null);
Acts (201)(2) := (formal_subprogram_declaration_2'Access, null);
Acts (201)(3) := (formal_subprogram_declaration_3'Access, null);
Acts (202).Set_First_Last (0, 2);
Acts (202)(0) := (formal_type_declaration_0'Access, null);
Acts (202)(1) := (formal_type_declaration_1'Access, null);
Acts (202)(2) := (formal_type_declaration_2'Access, null);
Acts (204).Set_First_Last (0, 1);
Acts (204)(0) := (formal_derived_type_definition_0'Access, null);
Acts (204)(1) := (formal_derived_type_definition_1'Access, null);
Acts (205).Set_First_Last (0, 0);
Acts (205)(0) := (formal_package_declaration_0'Access, null);
Acts (207).Set_First_Last (0, 2);
Acts (207)(0) := (full_type_declaration_0'Access, null);
Acts (208).Set_First_Last (0, 0);
Acts (208)(0) := (function_specification_0'Access, function_specification_0_check'Access);
Acts (211).Set_First_Last (0, 1);
Acts (211)(0) := (generic_formal_part_0'Access, null);
Acts (211)(1) := (generic_formal_part_1'Access, null);
Acts (214).Set_First_Last (0, 2);
Acts (214)(0) := (generic_instantiation_0'Access, null);
Acts (214)(1) := (generic_instantiation_1'Access, null);
Acts (214)(2) := (generic_instantiation_2'Access, null);
Acts (215).Set_First_Last (0, 0);
Acts (215)(0) := (generic_package_declaration_0'Access, null);
Acts (216).Set_First_Last (0, 2);
Acts (216)(0) := (generic_renaming_declaration_0'Access, null);
Acts (216)(1) := (generic_renaming_declaration_1'Access, null);
Acts (216)(2) := (generic_renaming_declaration_2'Access, null);
Acts (217).Set_First_Last (0, 0);
Acts (217)(0) := (generic_subprogram_declaration_0'Access, null);
Acts (218).Set_First_Last (0, 0);
Acts (218)(0) := (goto_label_0'Access, null);
Acts (219).Set_First_Last (0, 1);
Acts (219)(0) := (handled_sequence_of_statements_0'Access, null);
Acts (220).Set_First_Last (0, 1);
Acts (220)(0) := (identifier_list_0'Access, null);
Acts (220)(1) := (identifier_list_1'Access, null);
Acts (221).Set_First_Last (0, 1);
Acts (221)(0) := (null, identifier_opt_0_check'Access);
Acts (221)(1) := (null, null);
Acts (222).Set_First_Last (0, 3);
Acts (222)(0) := (if_expression_0'Access, null);
Acts (222)(1) := (if_expression_1'Access, null);
Acts (222)(2) := (if_expression_2'Access, null);
Acts (222)(3) := (if_expression_3'Access, null);
Acts (223).Set_First_Last (0, 3);
Acts (223)(0) := (if_statement_0'Access, null);
Acts (223)(1) := (if_statement_1'Access, null);
Acts (223)(2) := (if_statement_2'Access, null);
Acts (223)(3) := (if_statement_3'Access, null);
Acts (224).Set_First_Last (0, 1);
Acts (224)(0) := (incomplete_type_declaration_0'Access, null);
Acts (224)(1) := (incomplete_type_declaration_1'Access, null);
Acts (225).Set_First_Last (0, 0);
Acts (225)(0) := (index_constraint_0'Access, null);
Acts (228).Set_First_Last (0, 1);
Acts (228)(0) := (interface_list_0'Access, null);
Acts (228)(1) := (interface_list_1'Access, null);
Acts (230).Set_First_Last (0, 1);
Acts (230)(0) := (iteration_scheme_0'Access, null);
Acts (230)(1) := (iteration_scheme_1'Access, null);
Acts (231).Set_First_Last (0, 5);
Acts (231)(2) := (iterator_specification_2'Access, null);
Acts (231)(5) := (iterator_specification_5'Access, null);
Acts (233).Set_First_Last (0, 1);
Acts (233)(0) := (loop_statement_0'Access, loop_statement_0_check'Access);
Acts (233)(1) := (loop_statement_1'Access, loop_statement_1_check'Access);
Acts (240).Set_First_Last (0, 8);
Acts (240)(0) := (name_0'Access, null);
Acts (240)(1) := (name_1'Access, null);
Acts (240)(2) := (null, name_2_check'Access);
Acts (240)(3) := (null, null);
Acts (240)(4) := (null, null);
Acts (240)(5) := (name_5'Access, name_5_check'Access);
Acts (240)(6) := (null, null);
Acts (240)(7) := (null, name_7_check'Access);
Acts (240)(8) := (null, null);
Acts (241).Set_First_Last (0, 1);
Acts (241)(0) := (null, name_opt_0_check'Access);
Acts (241)(1) := (null, null);
Acts (243).Set_First_Last (0, 3);
Acts (243)(0) := (null_exclusion_opt_name_type_0'Access, null);
Acts (243)(1) := (null_exclusion_opt_name_type_1'Access, null);
Acts (243)(2) := (null_exclusion_opt_name_type_2'Access, null);
Acts (243)(3) := (null_exclusion_opt_name_type_3'Access, null);
Acts (244).Set_First_Last (0, 0);
Acts (244)(0) := (null_procedure_declaration_0'Access, null);
Acts (245).Set_First_Last (0, 7);
Acts (245)(0) := (object_declaration_0'Access, null);
Acts (245)(1) := (object_declaration_1'Access, null);
Acts (245)(2) := (object_declaration_2'Access, null);
Acts (245)(3) := (object_declaration_3'Access, null);
Acts (245)(4) := (object_declaration_4'Access, null);
Acts (245)(5) := (object_declaration_5'Access, null);
Acts (246).Set_First_Last (0, 2);
Acts (246)(0) := (object_renaming_declaration_0'Access, null);
Acts (246)(1) := (object_renaming_declaration_1'Access, null);
Acts (246)(2) := (object_renaming_declaration_2'Access, null);
Acts (247).Set_First_Last (0, 2);
Acts (247)(0) := (overriding_indicator_opt_0'Access, null);
Acts (247)(1) := (overriding_indicator_opt_1'Access, null);
Acts (248).Set_First_Last (0, 1);
Acts (248)(0) := (package_body_0'Access, package_body_0_check'Access);
Acts (248)(1) := (package_body_1'Access, package_body_1_check'Access);
Acts (249).Set_First_Last (0, 0);
Acts (249)(0) := (package_body_stub_0'Access, null);
Acts (250).Set_First_Last (0, 0);
Acts (250)(0) := (package_declaration_0'Access, null);
Acts (251).Set_First_Last (0, 0);
Acts (251)(0) := (package_renaming_declaration_0'Access, null);
Acts (252).Set_First_Last (0, 1);
Acts (252)(0) := (package_specification_0'Access, package_specification_0_check'Access);
Acts (252)(1) := (package_specification_1'Access, package_specification_1_check'Access);
Acts (253).Set_First_Last (0, 1);
Acts (253)(0) := (parameter_and_result_profile_0'Access, null);
Acts (255).Set_First_Last (0, 4);
Acts (255)(0) := (parameter_specification_0'Access, null);
Acts (255)(1) := (parameter_specification_1'Access, null);
Acts (255)(2) := (parameter_specification_2'Access, null);
Acts (255)(3) := (parameter_specification_3'Access, null);
Acts (257).Set_First_Last (0, 1);
Acts (257)(0) := (paren_expression_0'Access, null);
Acts (258).Set_First_Last (0, 2);
Acts (258)(0) := (pragma_g_0'Access, null);
Acts (258)(1) := (pragma_g_1'Access, null);
Acts (258)(2) := (pragma_g_2'Access, null);
Acts (259).Set_First_Last (0, 4);
Acts (259)(0) := (primary_0'Access, null);
Acts (259)(2) := (primary_2'Access, null);
Acts (259)(4) := (primary_4'Access, null);
Acts (260).Set_First_Last (0, 0);
Acts (260)(0) := (private_extension_declaration_0'Access, null);
Acts (261).Set_First_Last (0, 0);
Acts (261)(0) := (private_type_declaration_0'Access, null);
Acts (262).Set_First_Last (0, 0);
Acts (262)(0) := (procedure_call_statement_0'Access, null);
Acts (263).Set_First_Last (0, 0);
Acts (263)(0) := (procedure_specification_0'Access, procedure_specification_0_check'Access);
Acts (265).Set_First_Last (0, 0);
Acts (265)(0) := (protected_body_0'Access, protected_body_0_check'Access);
Acts (266).Set_First_Last (0, 0);
Acts (266)(0) := (protected_body_stub_0'Access, null);
Acts (267).Set_First_Last (0, 1);
Acts (267)(0) := (protected_definition_0'Access, protected_definition_0_check'Access);
Acts (267)(1) := (protected_definition_1'Access, protected_definition_1_check'Access);
Acts (272).Set_First_Last (0, 1);
Acts (272)(0) := (protected_type_declaration_0'Access, protected_type_declaration_0_check'Access);
Acts (272)(1) := (protected_type_declaration_1'Access, protected_type_declaration_1_check'Access);
Acts (273).Set_First_Last (0, 0);
Acts (273)(0) := (qualified_expression_0'Access, null);
Acts (274).Set_First_Last (0, 0);
Acts (274)(0) := (quantified_expression_0'Access, null);
Acts (276).Set_First_Last (0, 1);
Acts (276)(0) := (raise_expression_0'Access, null);
Acts (277).Set_First_Last (0, 2);
Acts (277)(0) := (raise_statement_0'Access, null);
Acts (277)(1) := (raise_statement_1'Access, null);
Acts (277)(2) := (raise_statement_2'Access, null);
Acts (278).Set_First_Last (0, 2);
Acts (278)(0) := (range_g_0'Access, null);
Acts (281).Set_First_Last (0, 1);
Acts (281)(0) := (record_definition_0'Access, null);
Acts (282).Set_First_Last (0, 0);
Acts (282)(0) := (record_representation_clause_0'Access, null);
Acts (291).Set_First_Last (0, 1);
Acts (291)(0) := (requeue_statement_0'Access, null);
Acts (291)(1) := (requeue_statement_1'Access, null);
Acts (292).Set_First_Last (0, 1);
Acts (292)(0) := (result_profile_0'Access, null);
Acts (292)(1) := (result_profile_1'Access, null);
Acts (294).Set_First_Last (0, 3);
Acts (294)(0) := (selected_component_0'Access, selected_component_0_check'Access);
Acts (294)(1) := (selected_component_1'Access, null);
Acts (294)(2) := (selected_component_2'Access, selected_component_2_check'Access);
Acts (294)(3) := (selected_component_3'Access, null);
Acts (295).Set_First_Last (0, 1);
Acts (295)(0) := (selective_accept_0'Access, null);
Acts (295)(1) := (selective_accept_1'Access, null);
Acts (296).Set_First_Last (0, 5);
Acts (296)(0) := (select_alternative_0'Access, null);
Acts (296)(1) := (select_alternative_1'Access, null);
Acts (296)(2) := (select_alternative_2'Access, null);
Acts (296)(4) := (select_alternative_4'Access, null);
Acts (297).Set_First_Last (0, 1);
Acts (297)(0) := (select_alternative_list_0'Access, null);
Acts (297)(1) := (select_alternative_list_1'Access, null);
Acts (303).Set_First_Last (0, 0);
Acts (303)(0) := (simple_return_statement_0'Access, null);
Acts (304).Set_First_Last (0, 10);
Acts (304)(0) := (simple_statement_0'Access, null);
Acts (304)(3) := (simple_statement_3'Access, null);
Acts (304)(8) := (simple_statement_8'Access, null);
Acts (305).Set_First_Last (0, 1);
Acts (305)(0) := (single_protected_declaration_0'Access, single_protected_declaration_0_check'Access);
Acts (305)(1) := (single_protected_declaration_1'Access, single_protected_declaration_1_check'Access);
Acts (306).Set_First_Last (0, 2);
Acts (306)(0) := (single_task_declaration_0'Access, single_task_declaration_0_check'Access);
Acts (306)(1) := (single_task_declaration_1'Access, single_task_declaration_1_check'Access);
Acts (306)(2) := (single_task_declaration_2'Access, null);
Acts (308).Set_First_Last (0, 0);
Acts (308)(0) := (subprogram_body_0'Access, subprogram_body_0_check'Access);
Acts (309).Set_First_Last (0, 0);
Acts (309)(0) := (subprogram_body_stub_0'Access, null);
Acts (310).Set_First_Last (0, 0);
Acts (310)(0) := (subprogram_declaration_0'Access, null);
Acts (311).Set_First_Last (0, 2);
Acts (311)(0) := (subprogram_default_0'Access, null);
Acts (312).Set_First_Last (0, 0);
Acts (312)(0) := (subprogram_renaming_declaration_0'Access, null);
Acts (313).Set_First_Last (0, 1);
Acts (313)(0) := (null, subprogram_specification_0_check'Access);
Acts (313)(1) := (null, subprogram_specification_1_check'Access);
Acts (314).Set_First_Last (0, 0);
Acts (314)(0) := (subtype_declaration_0'Access, null);
Acts (315).Set_First_Last (0, 3);
Acts (315)(0) := (subtype_indication_0'Access, null);
Acts (315)(1) := (subtype_indication_1'Access, null);
Acts (315)(2) := (subtype_indication_2'Access, null);
Acts (315)(3) := (subtype_indication_3'Access, null);
Acts (316).Set_First_Last (0, 0);
Acts (316)(0) := (subunit_0'Access, null);
Acts (317).Set_First_Last (0, 0);
Acts (317)(0) := (task_body_0'Access, task_body_0_check'Access);
Acts (318).Set_First_Last (0, 0);
Acts (318)(0) := (task_body_stub_0'Access, null);
Acts (319).Set_First_Last (0, 1);
Acts (319)(0) := (task_definition_0'Access, null);
Acts (319)(1) := (task_definition_1'Access, null);
Acts (320).Set_First_Last (0, 2);
Acts (320)(0) := (task_type_declaration_0'Access, task_type_declaration_0_check'Access);
Acts (320)(1) := (task_type_declaration_1'Access, task_type_declaration_1_check'Access);
Acts (320)(2) := (task_type_declaration_2'Access, null);
Acts (324).Set_First_Last (0, 0);
Acts (324)(0) := (timed_entry_call_0'Access, null);
Acts (328).Set_First_Last (0, 0);
Acts (328)(0) := (variant_part_0'Access, null);
Acts (329).Set_First_Last (0, 1);
Acts (329)(0) := (variant_list_0'Access, null);
Acts (330).Set_First_Last (0, 0);
Acts (330)(0) := (variant_0'Access, null);
Acts (332).Set_First_Last (0, 2);
Acts (332)(0) := (use_clause_0'Access, null);
Acts (332)(1) := (use_clause_1'Access, null);
Acts (332)(2) := (use_clause_2'Access, null);
Acts (333).Set_First_Last (0, 3);
Acts (333)(0) := (with_clause_0'Access, null);
Acts (333)(1) := (with_clause_1'Access, null);
Acts (333)(2) := (with_clause_2'Access, null);
Acts (333)(3) := (with_clause_3'Access, null);
end return;
end Actions;
Table : constant Parse_Table_Ptr := Get_Text_Rep
(Text_Rep_File_Name, McKenzie_Param, Actions);
begin
WisiToken.Parse.LR.Parser.New_Parser
(Parser,
Trace,
Lexer.New_Lexer (Trace.Descriptor),
Table,
Language_Fixes,
Language_Matching_Begin_Tokens,
Language_String_ID_Set,
User_Data,
Max_Parallel => 15,
Terminate_Same_State => True);
end Create_Parser;
end Ada_Process_LR1_Main;
|
src/endianness-interfaces.ads | AntonMeep/endianness | 0 | 25935 | with Interfaces; use Interfaces;
package Endianness.Interfaces with
Pure,
Preelaborate,
SPARK_Mode => On
is
-- @summary
-- Instance of Endianness' functions for Interfaces' integer types
function Swap_Endian is new Endianness.Swap_Endian (Integer_8);
function Swap_Endian is new Endianness.Swap_Endian (Integer_16);
function Swap_Endian is new Endianness.Swap_Endian (Integer_32);
function Swap_Endian is new Endianness.Swap_Endian (Integer_64);
function Swap_Endian is new Endianness.Swap_Endian (Unsigned_8);
function Swap_Endian is new Endianness.Swap_Endian (Unsigned_16);
function Swap_Endian is new Endianness.Swap_Endian (Unsigned_32);
function Swap_Endian is new Endianness.Swap_Endian (Unsigned_64);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Integer_8);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Integer_16);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Integer_32);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Integer_64);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Unsigned_8);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Unsigned_16);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Unsigned_32);
function Native_To_Big_Endian is new Endianness.Native_To_Big_Endian
(Unsigned_64);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Integer_8);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Integer_16);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Integer_32);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Integer_64);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Unsigned_8);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Unsigned_16);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Unsigned_32);
function Native_To_Little_Endian is new Endianness.Native_To_Little_Endian
(Unsigned_64);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Integer_8);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Integer_16);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Integer_32);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Integer_64);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Unsigned_8);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Unsigned_16);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Unsigned_32);
function Big_Endian_To_Native is new Endianness.Big_Endian_To_Native
(Unsigned_64);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Integer_8);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Integer_16);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Integer_32);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Integer_64);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Unsigned_8);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Unsigned_16);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Unsigned_32);
function Little_Endian_To_Native is new Endianness.Little_Endian_To_Native
(Unsigned_64);
end Endianness.Interfaces;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_137_656.asm | ljhsiun2/medusa | 9 | 171904 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %r8
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x486c, %r15
nop
nop
nop
nop
nop
sub %r13, %r13
mov $0x6162636465666768, %rax
movq %rax, (%r15)
nop
nop
and %r12, %r12
lea addresses_UC_ht+0x1146c, %r8
clflush (%r8)
nop
nop
nop
cmp %r9, %r9
movl $0x61626364, (%r8)
xor %r13, %r13
lea addresses_A_ht+0x126c, %r9
clflush (%r9)
nop
and %r8, %r8
mov $0x6162636465666768, %r12
movq %r12, %xmm6
and $0xffffffffffffffc0, %r9
movaps %xmm6, (%r9)
and %rbx, %rbx
lea addresses_WT_ht+0x18f6c, %rsi
lea addresses_normal_ht+0x806c, %rdi
nop
nop
nop
sub %r13, %r13
mov $108, %rcx
rep movsq
nop
and $50761, %rax
lea addresses_WC_ht+0x10f6c, %rsi
nop
nop
nop
nop
nop
xor $23618, %r13
mov $0x6162636465666768, %r8
movq %r8, %xmm3
movups %xmm3, (%rsi)
nop
nop
nop
nop
and %r15, %r15
lea addresses_A_ht+0x1db84, %r12
clflush (%r12)
xor $1728, %r13
movl $0x61626364, (%r12)
nop
nop
nop
nop
nop
dec %rdi
lea addresses_D_ht+0x1086c, %rdi
nop
dec %r13
mov (%rdi), %r15w
nop
nop
nop
nop
nop
inc %rsi
lea addresses_normal_ht+0x1a06c, %rdi
sub $25294, %r15
movups (%rdi), %xmm5
vpextrq $1, %xmm5, %rsi
nop
nop
xor %rbx, %rbx
lea addresses_WC_ht+0xdd2c, %rsi
lea addresses_WC_ht+0x1e16c, %rdi
nop
xor %r13, %r13
mov $26, %rcx
rep movsb
nop
nop
and $3294, %rsi
lea addresses_WT_ht+0x1cfd4, %rsi
lea addresses_UC_ht+0x1766c, %rdi
clflush (%rsi)
nop
nop
sub $63937, %rax
mov $100, %rcx
rep movsl
nop
nop
nop
nop
xor %r8, %r8
lea addresses_UC_ht+0x6294, %rsi
lea addresses_A_ht+0x31b6, %rdi
nop
nop
add %r8, %r8
mov $23, %rcx
rep movsl
cmp $33396, %rax
lea addresses_D_ht+0x14a6c, %rax
nop
and $63894, %rdi
movb (%rax), %r13b
nop
inc %r15
lea addresses_D_ht+0x37ac, %rax
nop
add %r15, %r15
movups (%rax), %xmm3
vpextrq $0, %xmm3, %rbx
dec %r9
lea addresses_WC_ht+0x18d4c, %rsi
nop
nop
add $28491, %r15
movups (%rsi), %xmm1
vpextrq $0, %xmm1, %rax
nop
nop
nop
nop
add $55718, %r9
lea addresses_WC_ht+0xe66c, %r8
nop
nop
sub $18592, %r9
mov (%r8), %ax
nop
nop
nop
nop
xor $54220, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %rax
push %rbx
push %rcx
// Store
lea addresses_WC+0x1c06c, %rax
clflush (%rax)
xor $53422, %r12
mov $0x5152535455565758, %r14
movq %r14, (%rax)
nop
nop
xor $30984, %r12
// Store
lea addresses_WC+0xc82d, %rbx
clflush (%rbx)
nop
nop
nop
nop
cmp $7388, %r8
mov $0x5152535455565758, %r11
movq %r11, (%rbx)
nop
nop
dec %r11
// Store
lea addresses_A+0x1546c, %r8
clflush (%r8)
nop
dec %r12
movl $0x51525354, (%r8)
nop
nop
and $46347, %r12
// Store
lea addresses_A+0x517c, %rax
sub $31321, %rcx
mov $0x5152535455565758, %r11
movq %r11, %xmm4
vmovntdq %ymm4, (%rax)
nop
nop
sub %r11, %r11
// Store
mov $0x20ce8d000000076a, %rcx
nop
nop
nop
nop
cmp %r8, %r8
movw $0x5152, (%rcx)
nop
nop
nop
cmp %rcx, %rcx
// Faulty Load
lea addresses_WC+0x1c06c, %r11
nop
nop
xor $42272, %r12
vmovaps (%r11), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r14
lea oracles, %rax
and $0xff, %r14
shlq $12, %r14
mov (%rax,%r14,1), %r14
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 1, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}}
{'00': 137}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/stars/tests/tests/pseudoOps/rolv_rorv_test.asm | kevintmcdonnell/stars | 9 | 233 | <reponame>kevintmcdonnell/stars<filename>src/stars/tests/tests/pseudoOps/rolv_rorv_test.asm
.text
main:
li $t0, 0x1234abcd
li $t1, 12
# Should be 0x4abcd123
rolv $a0, $t0, $t1
li $v0, 34
syscall
li $a0, ' '
li $v0, 11
syscall
# Should be 0xbcd1234a
rorv $a0, $t0, $t1
li $v0, 34
syscall |
oeis/142/A142814.asm | neoneye/loda-programs | 11 | 16247 | <reponame>neoneye/loda-programs
; A142814: Primes congruent to 16 mod 61.
; Submitted by <NAME>
; 199,443,809,1297,1663,1907,2029,2273,3371,4591,4957,5323,5689,6299,6421,8861,9227,9349,10691,11057,11423,11789,12277,13009,13619,14107,14717,15083,15937,16547,17401,18133,18743,19231,19597,19841,19963,20939,21061,22037,22159,22769,23623,25087,25453,25819,27283,27527,27893,29723,30089,30211,30577,33749,33871,34603,34847,36067,36433,36677,37409,37897,38629,38873,39239,39727,39971,40093,40459,41801,42533,42899,43753,43997,44119,44729,44851,45827,45949,46559,46681,47657,47779,48023,49121,49853
mov $1,38
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,1
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,61
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,121
|
Sankore-3.1/resources/macx/PowerPointImport.applescript | eaglezzb/rsdc | 0 | 927 | <gh_stars>0
tell application "Microsoft PowerPoint"
launch
set presentationCount to number of presentations
-- see http://thesource.ofallevil.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=2511850e-bf23-4a4e-a58a-078b50c6c6a11033&srcid=7830652b-fe36-4563-bedb-94aa37694b301033&ep=7
repeat 3 times
try
set thePresentation to presentation "%@"
on error
open POSIX file "%@"
set thePresentation to active presentation
end try
if thePresentation is not missing value then
exit repeat
else
delay 1
end if
end repeat
save thePresentation in (POSIX file "%@" as text) as save as PDF
set slideShow to slide show view of slide show window of thePresentation
if slideShow exists then
exit slide show slideShow
end if
if number of presentations is not equal to presentationCount then
close thePresentation
end if
tell application "System Events"
set visible of process "Microsoft PowerPoint" to false
end tell
end tell
|
memsim-master/src/memory-arbiter.ads | strenkml/EE368 | 0 | 8306 | <gh_stars>0
with Memory.Container; use Memory.Container;
with Ada.Containers.Vectors;
package Memory.Arbiter is
type Arbiter_Type is new Container_Type with private;
type Arbiter_Pointer is access all Arbiter_Type'Class;
function Create_Arbiter(next : access Memory_Type'Class)
return Arbiter_Pointer;
overriding
function Clone(mem : Arbiter_Type) return Memory_Pointer;
overriding
procedure Reset(mem : in out Arbiter_Type;
context : in Natural);
overriding
procedure Set_Port(mem : in out Arbiter_Type;
port : in Natural;
ready : out Boolean);
overriding
procedure Read(mem : in out Arbiter_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Write(mem : in out Arbiter_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Idle(mem : in out Arbiter_Type;
cycles : in Time_Type);
overriding
function To_String(mem : Arbiter_Type) return Unbounded_String;
private
package Pending_Vectors is new Vectors(Natural, Time_Type);
type Arbiter_Type is new Container_Type with record
-- The current port.
port : Natural := 0;
-- Keep track of the earliest time the next even can happen for
-- each port.
pending : Pending_Vectors.Vector;
end record;
end Memory.Arbiter;
|
src/orig/dds-request_reply-connext_c_replier-simple_replier_generic.ads | alexcamposruiz/dds-requestreply | 0 | 24046 | <reponame>alexcamposruiz/dds-requestreply<gh_stars>0
with DDS.Publisher;
with DDS.Subscriber;
with DDS.Request_Reply.Connext_C_Replier;
with DDS.Request_Reply.Connext_C_Entity_Params;
with DDS.Typed_DataWriter_Generic;
with DDS.Typed_DataReader_Generic;
generic
with package Reply_DataWriter is new DDS.Typed_DataWriter_Generic (<>);
with package Request_DataReader is new DDS.Typed_DataReader_Generic (<>);
package Dds.Request_Reply.Connext_C_Replier.Simple_Replier_Generic is
use Connext_C_Entity_Params;
type Ref (<>) is new Dds.Request_Reply.Connext_C_Replier.RTI_Connext_Replier with private;
type Ref_Access is access all Ref'Class;
function Create_With_Profile (Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Service_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
------
function Create (Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Service_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
type RTI_Connext_SimpleReplierParams is new RTI_Connext_EntityParams with record
Simple_Listener : RTI_Connext_SimpleReplierListener;
end record;
function Create (Params : RTI_Connext_SimpleReplierParams) return Ref_Access;
procedure Delete (Self : in out Ref_Access);
function Get_Request_Datareader (Self : not null access Ref) return Request_DataReader.Ref_Access;
function Get_Reply_Datawriter (Self : not null access Ref) return Reply_DataWriter.Ref_Access;
private
type Ref (Simple_Listener : RTI_Connext_SimpleReplierListener_Access) is new Dds.Request_Reply.Connext_C_Replier.RTI_Connext_Replier with record
null;
end record;
end Dds.Request_Reply.Connext_C_Replier.Simple_Replier_Generic;
|
apps/breakfast/pde_fw/toast/examples/Assembly (CCE)/msp430x24x_svs_01.asm | tp-freeforall/breakfast | 1 | 28391 | ;******************************************************************************
; MSP430x24x Demo - SVS, POR @ 2.5V Vcc
;
; Description: The SVS POR feature is used to disable normal operation that
; toggles P1.0 by xor'ing P1.0 inside of a software loop.
; In the example, when VCC is above 2.5V, the MSP430 toggles P1.0. When VCC is
; below 2.5V, the SVS resets the MSP430, and no toggle is seen.
; ACLK= n/a, MCLK= SMCLK= default DCO ~ 1.045MHz
;
; MSP430x24x
; -----------------
; /|\| XIN|-
; | | |
; --|RST XOUT|-
; | |
; | P1.0|-->LED
;
; <NAME>
; Texas Instruments Inc.
; May 2008
; Built Code Composer Essentials: v3 FET
;*******************************************************************************
.cdecls C,LIST, "msp430x24x.h"
;-------------------------------------------------------------------------------
.text ;Program Start
;-------------------------------------------------------------------------------
RESET mov.w #0500h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #001h,&P1DIR ; P1.0 output
mov.b #060h+PORON,&SVSCTL ; SVS POR enabled @ 2.5V
;
Mainloop mov.w #050000,R15 ; Delay to R15
L1 dec.w R15 ; Decrement R15
jnz L1 ; Delay over?
xor.b #001h,&P1OUT ; Toggle P1.0
jmp Mainloop ; Again
;
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; POR, ext. Reset
.short RESET
.end
|
code/integer_calc/macos/icalc.asm | HudsonSchumaker/x86_64-NSAM | 0 | 244023 | ; O3 Ozone Project Lab
; icalc.asm
; <NAME>
bits 64
section .data
section .bss
section .text
global _o3add, _o3sub, _o3mult, _o3pow, _o3div, _o3inc, _o3dec ; entry points
_o3add:
mov rax, rdi ; 1st arg, moved to rax
add rax, rsi ; 2sd arg, added to rax(rdi value)
ret ; return, rax has the sum value
_o3sub:
mov rax, rdi ; 1st arg, moved to rax
sub rax, rsi ; 2sd arg, subtracted from rax
ret ; return, rax has the subtraction value
_o3mult:
mov rax, rdi ; 1st arg, moved to rax
imul rsi ; 2sd arg, multiply rsi with rax (rdi vale)
ret ; return, rax has the result
_o3pow:
mov rax, rdi‚ ; 1st arg, moved to rax
imul rdi ; 2sd arg, rax(rdi) * rdi -> rdi * rdi
ret ; return, rax has the result
_o3div:
mov rax, rdi ; 1st arg, moved to rax
mov rdx, 0 ; rdx needs to be 0 before idiv
idiv rsi ; 2sd arg, divide rax(rdi value) by rsi
ret ; return, rax has the result
_o3inc:
mov rax, rdi ; 1st arg, moved to rax
inc rax ; increment in 1 (++)
ret ; return, rax has the result
_o3dec:
mov rax, rdi ; 1st arg, moved to rax
dec rax ; decrement in 1 (--)
ret ; return, rax has the result
|
maps/old/IlexForest.asm | AtmaBuster/pokeplat-gen2 | 6 | 87369 | object_const_def ; object_event constants
const ILEXFOREST_FARFETCHD
const ILEXFOREST_YOUNGSTER1
const ILEXFOREST_BLACK_BELT
const ILEXFOREST_ROCKER
const ILEXFOREST_POKE_BALL1
const ILEXFOREST_KURT
const ILEXFOREST_LASS
const ILEXFOREST_YOUNGSTER2
const ILEXFOREST_POKE_BALL2
const ILEXFOREST_POKE_BALL3
const ILEXFOREST_POKE_BALL4
IlexForest_MapScripts:
db 0 ; scene scripts
db 1 ; callbacks
callback MAPCALLBACK_OBJECTS, .FarfetchdCallback
.FarfetchdCallback:
checkevent EVENT_GOT_HM01_CUT
iftrue .Static
readmem wFarfetchdPosition
ifequal 1, .PositionOne
ifequal 2, .PositionTwo
ifequal 3, .PositionThree
ifequal 4, .PositionFour
ifequal 5, .PositionFive
ifequal 6, .PositionSix
ifequal 7, .PositionSeven
ifequal 8, .PositionEight
ifequal 9, .PositionNine
ifequal 10, .PositionTen
.Static:
return
.PositionOne:
moveobject ILEXFOREST_FARFETCHD, 14, 31
appear ILEXFOREST_FARFETCHD
return
.PositionTwo:
moveobject ILEXFOREST_FARFETCHD, 15, 25
appear ILEXFOREST_FARFETCHD
return
.PositionThree:
moveobject ILEXFOREST_FARFETCHD, 20, 24
appear ILEXFOREST_FARFETCHD
return
.PositionFour:
moveobject ILEXFOREST_FARFETCHD, 29, 22
appear ILEXFOREST_FARFETCHD
return
.PositionFive:
moveobject ILEXFOREST_FARFETCHD, 28, 31
appear ILEXFOREST_FARFETCHD
return
.PositionSix:
moveobject ILEXFOREST_FARFETCHD, 24, 35
appear ILEXFOREST_FARFETCHD
return
.PositionSeven:
moveobject ILEXFOREST_FARFETCHD, 22, 31
appear ILEXFOREST_FARFETCHD
return
.PositionEight:
moveobject ILEXFOREST_FARFETCHD, 15, 29
appear ILEXFOREST_FARFETCHD
return
.PositionNine:
moveobject ILEXFOREST_FARFETCHD, 10, 35
appear ILEXFOREST_FARFETCHD
return
.PositionTen:
moveobject ILEXFOREST_FARFETCHD, 6, 28
appear ILEXFOREST_FARFETCHD
return
IlexForestCharcoalApprenticeScript:
faceplayer
opentext
checkevent EVENT_HERDED_FARFETCHD
iftrue .DoneFarfetchd
writetext IlexForestApprenticeIntroText
waitbutton
closetext
end
.DoneFarfetchd:
writetext IlexForestApprenticeAfterText
waitbutton
closetext
end
IlexForestFarfetchdScript:
readmem wFarfetchdPosition
ifequal 1, .Position1
ifequal 2, .Position2
ifequal 3, .Position3
ifequal 4, .Position4
ifequal 5, .Position5
ifequal 6, .Position6
ifequal 7, .Position7
ifequal 8, .Position8
ifequal 9, .Position9
ifequal 10, .Position10
.Position1:
faceplayer
opentext
writetext Text_ItsTheMissingPokemon
buttonsound
writetext Text_Kwaaaa
cry FARFETCH_D
waitbutton
closetext
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos1_Pos2
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 2
end
.Position2:
scall .CryAndCheckFacing
ifequal DOWN, .Position2_Down
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos3
moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 3
end
.Position2_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos8
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 8
end
.Position3:
scall .CryAndCheckFacing
ifequal LEFT, .Position3_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos4
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 4
end
.Position3_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos2
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 2
end
.Position4:
scall .CryAndCheckFacing
ifequal UP, .Position4_Up
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos5
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 5
end
.Position4_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos3
moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 3
end
.Position5:
scall .CryAndCheckFacing
ifequal UP, .Position5_Up
ifequal LEFT, .Position5_Left
ifequal RIGHT, .Position5_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos6
moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 6
end
.Position5_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos7
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 7
end
.Position5_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Up
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 4
end
.Position5_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Right
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 4
end
.Position6:
scall .CryAndCheckFacing
ifequal RIGHT, .Position6_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos7
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 7
end
.Position6_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos5
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 5
end
.Position7:
scall .CryAndCheckFacing
ifequal DOWN, .Position7_Down
ifequal LEFT, .Position7_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos8
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 8
end
.Position7_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos6
moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 6
end
.Position7_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos5
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 5
end
.Position8:
scall .CryAndCheckFacing
ifequal UP, .Position8_Up
ifequal LEFT, .Position8_Left
ifequal RIGHT, .Position8_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos9
moveobject ILEXFOREST_FARFETCHD, 10, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 9
end
.Position8_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos7
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 7
end
.Position8_Up:
.Position8_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos2
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 2
end
.Position9:
scall .CryAndCheckFacing
ifequal DOWN, .Position9_Down
ifequal RIGHT, .Position9_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos10
moveobject ILEXFOREST_FARFETCHD, 6, 28
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 10
appear ILEXFOREST_BLACK_BELT
setevent EVENT_CHARCOAL_KILN_BOSS
setevent EVENT_HERDED_FARFETCHD
end
.Position9_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Right
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 8
end
.Position9_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Down
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadmem wFarfetchdPosition, 8
end
.Position10:
faceplayer
opentext
writetext Text_Kwaaaa
cry FARFETCH_D
waitbutton
closetext
end
.CryAndCheckFacing:
faceplayer
opentext
writetext Text_Kwaaaa
cry FARFETCH_D
waitbutton
closetext
readvar VAR_FACING
end
IlexForestCharcoalMasterScript:
faceplayer
opentext
checkevent EVENT_GOT_HM01_CUT
iftrue .AlreadyGotCut
writetext Text_CharcoalMasterIntro
buttonsound
verbosegiveitem HM_CUT
setevent EVENT_GOT_HM01_CUT
writetext Text_CharcoalMasterOutro
waitbutton
closetext
setevent EVENT_ILEX_FOREST_FARFETCHD
setevent EVENT_ILEX_FOREST_APPRENTICE
setevent EVENT_ILEX_FOREST_CHARCOAL_MASTER
clearevent EVENT_CHARCOAL_KILN_FARFETCH_D
clearevent EVENT_CHARCOAL_KILN_APPRENTICE
clearevent EVENT_CHARCOAL_KILN_BOSS
end
.AlreadyGotCut:
writetext Text_CharcoalMasterTalkAfter
waitbutton
closetext
end
IlexForestHeadbuttGuyScript:
faceplayer
opentext
checkevent EVENT_GOT_TM02_HEADBUTT
iftrue .AlreadyGotHeadbutt
writetext Text_HeadbuttIntro
buttonsound
verbosegivetmhm TM_HEADBUTT
iffalse .BagFull
setevent EVENT_GOT_TM02_HEADBUTT
.AlreadyGotHeadbutt:
writetext Text_HeadbuttOutro
waitbutton
.BagFull:
closetext
end
TrainerBugCatcherWayne:
trainer BUG_CATCHER, WAYNE, EVENT_BEAT_BUG_CATCHER_WAYNE, BugCatcherWayneSeenText, BugCatcherWayneBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext BugCatcherWayneAfterBattleText
waitbutton
closetext
end
IlexForestLassScript:
jumptextfaceplayer Text_IlexForestLass
IlexForestRevive:
itemball REVIVE
IlexForestXAttack:
itemball X_ATTACK
IlexForestAntidote:
itemball ANTIDOTE
IlexForestEther:
itemball ETHER
IlexForestHiddenEther:
hiddenitem ETHER, EVENT_ILEX_FOREST_HIDDEN_ETHER
IlexForestHiddenSuperPotion:
hiddenitem SUPER_POTION, EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION
IlexForestHiddenFullHeal:
hiddenitem FULL_HEAL, EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL
IlexForestBoulder:
; unused
jumpstd strengthboulder
IlexForestSignpost:
jumptext IlexForestSignpostText
IlexForestShrineScript:
checkevent EVENT_FOREST_IS_RESTLESS
iftrue .ForestIsRestless
sjump .DontDoCelebiEvent
.ForestIsRestless:
checkitem GS_BALL
iftrue .AskCelebiEvent
.DontDoCelebiEvent:
jumptext Text_IlexForestShrine
.AskCelebiEvent:
opentext
writetext Text_ShrineCelebiEvent
yesorno
iftrue .CelebiEvent
closetext
end
.CelebiEvent:
takeitem GS_BALL
clearevent EVENT_FOREST_IS_RESTLESS
setevent EVENT_AZALEA_TOWN_KURT
disappear ILEXFOREST_LASS
clearevent EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
writetext Text_InsertGSBall
waitbutton
closetext
pause 20
showemote EMOTE_SHOCK, PLAYER, 20
special FadeOutMusic
applymovement PLAYER, MovementData_0x6ef58
pause 30
turnobject PLAYER, DOWN
pause 20
clearflag ENGINE_FOREST_IS_RESTLESS
special CelebiShrineEvent
loadwildmon CELEBI, 30
startbattle
reloadmapafterbattle
pause 20
special CheckCaughtCelebi
iffalse .DidntCatchCelebi
appear ILEXFOREST_KURT
applymovement ILEXFOREST_KURT, MovementData_0x6ef4e
opentext
writetext Text_KurtCaughtCelebi
waitbutton
closetext
applymovement ILEXFOREST_KURT, MovementData_0x6ef53
disappear ILEXFOREST_KURT
.DidntCatchCelebi:
end
MovementData_Farfetchd_Pos1_Pos2:
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetchd_Pos2_Pos3:
big_step UP
big_step UP
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step DOWN
step_end
MovementData_Farfetchd_Pos2_Pos8:
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
step_end
MovementData_Farfetchd_Pos3_Pos4:
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
step_end
MovementData_Farfetchd_Pos3_Pos2:
big_step UP
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
step_end
MovementData_Farfetchd_Pos4_Pos5:
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
step_end
MovementData_Farfetchd_Pos4_Pos3:
big_step LEFT
jump_step LEFT
big_step LEFT
big_step LEFT
step_end
MovementData_Farfetchd_Pos5_Pos6:
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
step_end
MovementData_Farfetchd_Pos5_Pos7:
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
step_end
MovementData_Farfetched_Pos5_Pos4_Up:
big_step UP
big_step UP
big_step UP
big_step RIGHT
big_step UP
step_end
MovementData_Farfetched_Pos5_Pos4_Right:
big_step RIGHT
turn_head UP
step_sleep 1
turn_head DOWN
step_sleep 1
turn_head UP
step_sleep 1
big_step DOWN
big_step DOWN
fix_facing
jump_step UP
step_sleep 8
step_sleep 8
remove_fixed_facing
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos6_Pos7:
big_step LEFT
big_step LEFT
big_step LEFT
big_step UP
big_step UP
big_step RIGHT
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos6_Pos5:
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos7_Pos8:
big_step UP
big_step UP
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
step_end
MovementData_Farfetched_Pos7_Pos6:
big_step DOWN
big_step DOWN
big_step LEFT
big_step DOWN
big_step DOWN
big_step RIGHT
big_step RIGHT
big_step RIGHT
step_end
MovementData_Farfetched_Pos7_Pos5:
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
step_end
MovementData_Farfetched_Pos8_Pos9:
big_step DOWN
big_step LEFT
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
step_end
MovementData_Farfetched_Pos8_Pos7:
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
step_end
MovementData_Farfetched_Pos8_Pos2:
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos9_Pos10:
big_step LEFT
big_step LEFT
fix_facing
jump_step RIGHT
step_sleep 8
step_sleep 8
remove_fixed_facing
big_step LEFT
big_step LEFT
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos9_Pos8_Right:
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_Farfetched_Pos9_Pos8_Down:
big_step LEFT
big_step LEFT
fix_facing
jump_step RIGHT
step_sleep 8
step_sleep 8
remove_fixed_facing
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step UP
big_step UP
big_step UP
big_step UP
big_step UP
step_end
MovementData_0x6ef4e:
step UP
step UP
step UP
step UP
step_end
MovementData_0x6ef53:
step DOWN
step DOWN
step DOWN
step DOWN
step_end
MovementData_0x6ef58:
fix_facing
slow_step DOWN
remove_fixed_facing
step_end
IlexForestApprenticeIntroText:
text "Oh, man… My boss"
line "is going to be"
cont "steaming…"
para "The FARFETCH'D"
line "that CUTS trees"
para "for charcoal took"
line "off on me."
para "I can't go looking"
line "for it here in the"
cont "ILEX FOREST."
para "It's too big, dark"
line "and scary for me…"
done
IlexForestApprenticeAfterText:
text "Wow! Thanks a"
line "whole bunch!"
para "My boss's #MON"
line "won't obey me be-"
cont "cause I don't have"
cont "a BADGE."
done
Text_ItsTheMissingPokemon:
text "It's the missing"
line "#MON!"
done
Text_Kwaaaa:
text "FARFETCH'D: Kwaa!"
done
Text_CharcoalMasterIntro:
text "Ah! My FARFETCH'D!"
para "You found it for"
line "us, kid?"
para "Without it, we"
line "wouldn't be able"
para "to CUT trees for"
line "charcoal."
para "Thanks, kid!"
para "Now, how can I"
line "thank you…"
para "I know! Here, take"
line "this."
done
Text_CharcoalMasterOutro:
text "That's the CUT HM."
line "Teach that to a"
para "#MON to clear"
line "small trees."
para "Of course, you"
line "have to have the"
para "GYM BADGE from"
line "AZALEA to use it."
done
Text_CharcoalMasterTalkAfter:
text "Do you want to"
line "apprentice as a"
para "charcoal maker"
line "with me?"
para "You'll be first-"
line "rate in ten years!"
done
Text_HeadbuttIntro:
text "What am I doing?"
para "I'm shaking trees"
line "using HEADBUTT."
para "It's fun. Here,"
line "you try it too!"
done
Text_HeadbuttOutro:
text "Rattle trees with"
line "HEADBUTT. Some-"
cont "times, sleeping"
cont "#MON fall out."
done
Text_IlexForestLass:
text "Did something"
line "happen to the"
cont "forest's guardian?"
done
IlexForestSignpostText:
text "ILEX FOREST is"
line "so overgrown with"
para "trees that you"
line "can't see the sky."
para "Please watch out"
line "for items that may"
cont "have been dropped."
done
Text_IlexForestShrine:
text "ILEX FOREST"
line "SHRINE…"
para "It's in honor of"
line "the forest's"
cont "protector…"
done
Text_ShrineCelebiEvent:
text "ILEX FOREST"
line "SHRINE…"
para "It's in honor of"
line "the forest's"
cont "protector…"
para "Oh? What is this?"
para "It's a hole."
line "It looks like the"
para "GS BALL would fit"
line "inside it."
para "Want to put the GS"
line "BALL here?"
done
Text_InsertGSBall:
text "<PLAYER> put in the"
line "GS BALL."
done
Text_KurtCaughtCelebi:
text "Whew, wasn't that"
line "something!"
para "<PLAYER>, that was"
line "fantastic. Thanks!"
para "The legends about"
line "that SHRINE were"
cont "real after all."
para "I feel inspired by"
line "what I just saw."
para "It motivates me to"
line "make better BALLS!"
para "I'm going!"
done
BugCatcherWayneSeenText:
text "Don't sneak up on"
line "me like that!"
para "You frightened a"
line "#MON away!"
done
BugCatcherWayneBeatenText:
text "I hadn't seen that"
line "#MON before…"
done
BugCatcherWayneAfterBattleText:
text "A #MON I've"
line "never seen before"
para "fell out of the"
line "tree when I used"
cont "HEADBUTT."
para "I ought to use"
line "HEADBUTT in other"
cont "places too."
done
IlexForest_MapEvents:
db 0, 0 ; filler
db 3 ; warp events
warp_event 1, 5, ROUTE_34_ILEX_FOREST_GATE, 3
warp_event 3, 42, ILEX_FOREST_AZALEA_GATE, 1
warp_event 3, 43, ILEX_FOREST_AZALEA_GATE, 2
db 0 ; coord events
db 5 ; bg events
bg_event 3, 17, BGEVENT_READ, IlexForestSignpost
bg_event 11, 7, BGEVENT_ITEM, IlexForestHiddenEther
bg_event 22, 14, BGEVENT_ITEM, IlexForestHiddenSuperPotion
bg_event 1, 17, BGEVENT_ITEM, IlexForestHiddenFullHeal
bg_event 8, 22, BGEVENT_UP, IlexForestShrineScript
db 11 ; object events
object_event 14, 31, SPRITE_BIRD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, IlexForestFarfetchdScript, EVENT_ILEX_FOREST_FARFETCHD
object_event 7, 28, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalApprenticeScript, EVENT_ILEX_FOREST_APPRENTICE
object_event 5, 28, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalMasterScript, EVENT_ILEX_FOREST_CHARCOAL_MASTER
object_event 15, 14, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestHeadbuttGuyScript, -1
object_event 20, 32, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestRevive, EVENT_ILEX_FOREST_REVIVE
object_event 8, 29, SPRITE_KURT, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ILEX_FOREST_KURT
object_event 3, 24, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestLassScript, EVENT_ILEX_FOREST_LASS
object_event 12, 1, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerBugCatcherWayne, -1
object_event 9, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestXAttack, EVENT_ILEX_FOREST_X_ATTACK
object_event 17, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestAntidote, EVENT_ILEX_FOREST_ANTIDOTE
object_event 27, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestEther, EVENT_ILEX_FOREST_ETHER
|
oeis/026/A026021.asm | neoneye/loda-programs | 11 | 89767 | <filename>oeis/026/A026021.asm
; A026021: T(n,[ n/2 ]), where T is the array defined in A026009.
; Submitted by <NAME>
; 1,1,2,3,6,10,19,34,62,117,207,407,704,1430,2431,5070,8502,18122,30056,65246,107236,236436,385662,861764,1396652,3157325,5088865,11622015,18642420,42961470,68624295,159419670,253706790,593636670,941630580
mov $1,$0
mov $2,$0
div $0,2
bin $1,$0
sub $0,3
bin $2,$0
sub $1,$2
mov $0,$1
|
oeis/163/A163467.asm | neoneye/loda-programs | 11 | 83024 | <filename>oeis/163/A163467.asm
; A163467: a(n) = floor(p/2) * floor(floor(p/2)/2) * floor(floor(floor(p/2)/2)/2) * ... * 1, where p=prime(n).
; 1,1,2,3,10,18,64,72,110,294,315,1296,2000,2100,2530,6084,8526,9450,33792,38080,46656,53352,82000,106480,248832,270000,275400,322452,341172,460992,615195,2129920,2515456,2552448,3548448,3596400,4161456,6480000,6806000,7765800,9476720,9801000,11296450,23887872,24893568,25147584,33218640,38571390,52092096,53491536,57362928,59861046,68040000,75678750,268435456,279019520,303384576,305648640,352237824,373184000,375849600,497259648,604469952,620429040,649187136,665939664,1109460000,1244678400
seq $0,6005 ; The odd prime numbers together with 1.
mov $1,2
lpb $1
div $1,2
mov $3,$2
max $2,$0
div $3,2
lpe
mov $1,1
lpb $3
mul $1,$3
div $3,2
lpe
mov $0,$1
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/limited_with3_pkg3.ads | best08618/asylo | 7 | 16720 | with Limited_With3;
with Limited_With3_Pkg1;
package Limited_With3_Pkg3 is
package My_Q is new Limited_With3_Pkg1 (Limited_With3.T);
type TT is tagged record
State : My_Q.Element_Access;
end record;
end Limited_With3_Pkg3;
|
dump.asm | ern0/dump | 2 | 166734 | <gh_stars>1-10
; dump.asm - 2017.09.29 - <EMAIL>
; Simple dump for 80186 assembly developers
;----------------------------------------------------------------------
;
; MEMDUMP_REG equ 0
;
; Register pointing to memory to dump
; 0: DI, 2: SI, 4: BP, 6: SP,
; 8: BX, 10: DX, 12: CX, 14: AX
;
; MEMDUMP_LEN equ 6
;
; Number of words to dump
;
;----------------------------------------------------------------------
dump:
push es
pusha
push cs
pop es
xor dx,dx
mov bh,0
mov ah,2
int 10H
mov cx,8
lea si,[dump_regmap]
lea bx,[3 + dump_template]
mov ax,word [dump_reglist + MEMDUMP_REG]
mov [dump_regname],ax
dump_xreg:
mov bp,sp
add bp,[si]
mov ax,[bp]
mov [dump_value],ax
mov [dump_target],bx
call dump_word
add bx,8
add si,2
loop dump_xreg
dump_qreg:
lea dx,[dump_template]
mov ah,9
int 21H
; dump memory
mov bp,sp
mov si,[bp + MEMDUMP_REG]
mov [dump_target],dump_mem
mov cx,MEMDUMP_LEN
dump_xmem:
lodsw
mov [dump_value],ax
call dump_word
lea dx,[dump_mem]
mov ah,9
int 21H
loop dump_xmem
lea dx,[dump_crlf]
mov ah,9
int 21H
; sleep some
xor ah,ah
int 1aH
mov bx,dx
dump_sleep:
xor ah,ah
int 1aH
cmp bx,dx
je dump_sleep
test [dump_flood],-1
jz dump_rkey
mov ah,1
int 16H
jz dump_return
dump_rkey:
xor ah,ah
int 16H
cmp al,1bH
je dump_qkey
cmp al,20H
jne dump_return
not [dump_flood]
dump_return:
popa
pop es
ret
dump_qkey:
mov ax,4c00H
int 21H
dump_flood db 0
;----------------------------------------------------------------------
dump_nibble:
and al,0fH
lea bx,[dump_nums]
xlat [bx]
stosb
ret
;----------------------------------------------------------------------
dump_byte:
mov ah,al
shr al,4
call dump_nibble
mov al,ah
call dump_nibble
ret
;----------------------------------------------------------------------
dump_word:
pusha
mov di,[dump_target]
mov al,byte [1 + dump_value]
call dump_byte
mov al,byte [dump_value]
call dump_byte
popa
ret
;----------------------------------------------------------------------
dump_value dw 0
dump_target dw 0
dump_nums db "0123456789ABCDEF"
dump_template:
db "AX=.... "
db "BX=.... "
db "CX=.... "
db "DX=....",10
db "SI=.... "
db "DI=.... "
db "BP=.... "
db "SP=....",10
db "["
dump_regname:
db "DI]=$"
dump_mem:
db ".... $"
dump_crlf:
db 13,10,10,"$"
dump_reglist:
db "DI"
db "SI"
db "BP"
db "SP"
db "BX"
db "DX"
db "CX"
db "AX"
dump_regmap:
dw 14 ; AX
dw 8 ; BX
dw 12 ; CX
dw 10 ; DX
dw 2 ; SI
dw 0 ; DI
dw 4 ; BP
dw 6 ; SP
;----------------------------------------------------------------------
|
src/main/antlr4/me/bgx/freemarker/FreemarkerLexer.g4 | jmena/freemarker-g4 | 1 | 6836 | /*
Copyright (c) 2018 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
lexer grammar FreemarkerLexer;
// CHANNELS:
// 1. comments
// 2. ignored spaces in expressions
// STARTING GRAMMAR RULES
COMMENT : COMMENT_FRAG -> channel(1);
START_DIRECTIVE_TAG : '<#' -> pushMode(EXPR_MODE);
END_DIRECTIVE_TAG : '</#' -> pushMode(EXPR_MODE);
START_USER_DIR_TAG : '<@' -> pushMode(EXPR_MODE);
END_USER_DIR_TAG : '</@' -> pushMode(EXPR_MODE);
INLINE_EXPR_START : '${' -> pushMode(EXPR_MODE);
CONTENT : ('<' | '$' | ~[$<]+) ;
// MODES
mode DOUBLE_QUOTE_STRING_MODE;
DQS_EXIT : '"' -> popMode;
DQS_ESCAPE : '\\' [\\"'$n];
DQS_ENTER_EXPR : '${' -> pushMode(EXPR_MODE);
DQS_CONTENT : (~[\\$"])+;
mode SINGLE_QUOTE_STRING_MODE;
SQS_EXIT : '\'' -> popMode;
SQS_ESCAPE : '\\' [\\"'$n];
SQS_ENTER_EXPR : '${' -> pushMode(EXPR_MODE);
SQS_CONTENT : (~[\\$'])+;
mode EXPR_MODE;
// Keywords
EXPR_IF : 'if';
EXPR_ELSE : 'else';
EXPR_ELSEIF : 'elseif';
EXPR_ASSIGN : 'assign';
EXPR_AS : 'as';
EXPR_LIST : 'list';
EXPR_TRUE : 'true';
EXPR_FALSE : 'false';
EXPR_INCLUDE : 'include';
EXPR_IMPORT : 'import';
EXPR_MACRO : 'macro';
EXPR_NESTED : 'nested';
EXPR_RETURN : 'return';
// Other symbols
EXPR_LT_SYM : '<';
EXPR_LT_STR : 'lt';
EXPR_LTE_SYM : '<=';
EXPR_LTE_STR : 'lte';
// EXPR_GT_SYM : '>'; // Unsupported. Already defined as EXPR_EXIT_GT
EXPR_GT_STR : 'gt';
EXPR_GTE_SYM : '>=';
EXPR_GTE_STR : 'gte';
EXPR_NUM : NUMBER;
EXPR_EXIT_R_BRACE : '}' -> popMode;
EXPR_EXIT_GT : '>' -> popMode;
EXPR_EXIT_DIV_GT : '/>' -> popMode;
EXPR_WS : [ \n]+ -> channel(2);
EXPR_COMENT : COMMENT_FRAG -> channel(1);
EXPR_STRUCT : '{'+ -> pushMode(EXPR_MODE);
EXPR_DOUBLE_STR_START : '"' -> pushMode(DOUBLE_QUOTE_STRING_MODE);
EXPR_SINGLE_STR_START : '\'' -> pushMode(SINGLE_QUOTE_STRING_MODE);
EXPR_AT : '@';
EXPR_DBL_QUESTION : '??';
EXPR_QUESTION : '?';
EXPR_BANG : '!';
EXPR_ADD : '+';
EXPR_SUB : '-';
EXPR_MUL : '*';
EXPR_DIV : '/';
EXPR_MOD : '%';
EXPR_L_PAREN : '(';
EXPR_R_PAREN : ')';
EXPR_L_SQ_PAREN : '[';
EXPR_R_SQ_PAREN : ']';
EXPR_COMPARE_EQ : '==';
EXPR_EQ : '=';
EXPR_COMPARE_NEQ : '!=';
EXPR_LOGICAL_AND : '&&';
EXPR_LOGICAL_OR : '||';
EXPR_DOT : '.';
EXPR_COMMA : ',';
EXPR_COLON : ':';
EXPR_SEMICOLON : ';';
EXPR_SYMBOL : SYMBOL;
// FRAGMENTS
fragment COMMENT_FRAG : '<#--' .*? '-->';
fragment NUMBER : [0-9]+ ('.' [0-9]* )?;
fragment SYMBOL : [_a-zA-Z][_a-zA-Z0-9]*;
|
programs/oeis/307/A307707.asm | neoneye/loda | 22 | 165181 | <filename>programs/oeis/307/A307707.asm
; A307707: Lexicographically earliest sequence starting with a(1) = 0 such that a(n) is the number of pairs of contiguous terms whose sum is a(n).
; 0,1,1,1,2,1,2,2,2,2,2,3,2,3,2,3,3,3,3,3,3,3,4,3,4,3,4,3,4,4,4,4,4,4,4,4,4,5,4,5,4,5,4,5,4,5,5,5,5,5,5,5,5,5,5,5,6,5,6,5,6,5,6,5,6,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,7,6,7,6,7,6,7,6,7,6,7,7,7,7,7,7,7,7,7
lpb $0
add $2,1
mov $3,$0
trn $0,$2
mod $3,2
add $1,$3
lpe
mov $0,$1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.