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
oeis/130/A130563.asm
neoneye/loda-programs
11
19227
; A130563: Fourth column (m=3) of the Laguerre-Sonin a=1/2 coefficient triangle. ; Submitted by <NAME> ; 1,36,990,25740,675675,18378360,523783260,15713497800,496939367925,16564645597500,581419060472250,21459648959248500,831561397170879375,33774185977401870000,1435402904039579475000,63731888939357328690000,2951583106503986284955625,142370479254898161980212500,7142252375954057792673993750,372148939589185116565644937500,20114650184795455550373108871875,1126420410348545510820894096825000,65281182872472523922574544247812500,3911194347750745128926422694499375000,242005150267077354852322404222148828125 add $0,1 mov $2,$0 seq $0,1881 ; Coefficients of Bessel polynomials y_n (x). mul $0,$2 div $0,21
programs/oeis/157/A157363.asm
karttu/loda
1
82530
; A157363: 686n - 14. ; 672,1358,2044,2730,3416,4102,4788,5474,6160,6846,7532,8218,8904,9590,10276,10962,11648,12334,13020,13706,14392,15078,15764,16450,17136,17822,18508,19194,19880,20566,21252,21938,22624,23310,23996,24682,25368,26054,26740,27426,28112,28798,29484,30170,30856,31542,32228,32914,33600,34286,34972,35658,36344,37030,37716,38402,39088,39774,40460,41146,41832,42518,43204,43890,44576,45262,45948,46634,47320,48006,48692,49378,50064,50750,51436,52122,52808,53494,54180,54866,55552,56238,56924,57610,58296,58982,59668,60354,61040,61726,62412,63098,63784,64470,65156,65842,66528,67214,67900,68586,69272,69958,70644,71330,72016,72702,73388,74074,74760,75446,76132,76818,77504,78190,78876,79562,80248,80934,81620,82306,82992,83678,84364,85050,85736,86422,87108,87794,88480,89166,89852,90538,91224,91910,92596,93282,93968,94654,95340,96026,96712,97398,98084,98770,99456,100142,100828,101514,102200,102886,103572,104258,104944,105630,106316,107002,107688,108374,109060,109746,110432,111118,111804,112490,113176,113862,114548,115234,115920,116606,117292,117978,118664,119350,120036,120722,121408,122094,122780,123466,124152,124838,125524,126210,126896,127582,128268,128954,129640,130326,131012,131698,132384,133070,133756,134442,135128,135814,136500,137186,137872,138558,139244,139930,140616,141302,141988,142674,143360,144046,144732,145418,146104,146790,147476,148162,148848,149534,150220,150906,151592,152278,152964,153650,154336,155022,155708,156394,157080,157766,158452,159138,159824,160510,161196,161882,162568,163254,163940,164626,165312,165998,166684,167370,168056,168742,169428,170114,170800,171486 mov $1,$0 mul $1,686 add $1,672
Lexer/src/grammar/CoolLexer.g4
saksham-mittal/COOL-compiler
1
4138
<reponame>saksham-mittal/COOL-compiler lexer grammar CoolLexer; tokens{ ERROR, TYPEID, OBJECTID, BOOL_CONST, INT_CONST, STR_CONST, LPAREN, RPAREN, COLON, ATSYM, SEMICOLON, COMMA, PLUS, MINUS, STAR, SLASH, TILDE, LT, EQUALS, LBRACE, RBRACE, DOT, DARROW, LE, ASSIGN, CLASS, ELSE, FI, IF, IN, INHERITS, LET, LOOP, POOL, THEN, WHILE, CASE, ESAC, OF, NEW, ISVOID, NOT } /* DO NOT EDIT CODE ABOVE THIS LINE */ @lexer::header { #include <Token.h> #include <string> } @lexer::postinclude { using namespace std; using namespace antlr4; } @members{ /* YOU CAN ADD YOUR MEMBER VARIABLES AND METHODS HERE */ /** * Function to report errors. * Use this function whenever your lexer encounters any erroneous input * DO NOT EDIT THIS FUNCTION */ void reportError(string errorString){ setText(errorString); setType(ERROR); } /* processString() processes a string for escaped characters */ void processString() { auto t = _factory->create(make_pair(this, _input), type, _text, channel, tokenStartCharIndex, getCharIndex()-1, tokenStartLine, tokenStartCharPositionInLine); string in = t->getText(); string dummyBuffer = ""; //write your code to test strings here for(int i=0; i<in.length(); i++) { if(in[i] == '\\') { if(in[i + 1] == 'n') { dummyBuffer.push_back('\n'); } else if(in[i + 1] == 'f') { dummyBuffer.push_back('\f'); } else if(in[i + 1] == 't') { dummyBuffer.push_back('\t'); } else if(in[i + 1] == 'b') { dummyBuffer.push_back('\b'); } else if(in[i + 1] == '\"') { dummyBuffer.push_back('\"'); } else if(in[i + 1] == '\\') { dummyBuffer.push_back('\\'); } else { dummyBuffer.push_back(in[i + 1]); } i++; } else { dummyBuffer.push_back(in[i]); } } /* Checks if the string is too long. If it is, it prints 'String constant too long' */ if(dummyBuffer.length() > 1024) { reportError("String constant too long"); return; } setText(dummyBuffer); return; } /* unknownToken() reports an error if an unknown token is found */ void unknownToken() { auto t = _factory->create(make_pair(this, _input), type, _text, channel, tokenStartCharIndex, getCharIndex()-1, tokenStartLine, tokenStartCharPositionInLine); string in = t->getText(); reportError(in); } } /* WRITE ALL LEXER RULES BELOW */ /* String constant calls processString() function */ STR_CONST : '"' (ESC|.)*? '"' { processString(); }; fragment ESC : '\\"' | '\\\\'; BOOL_CONST : 't'('r'|'R')('u'|'U')('e'|'E') | 'f'('a'|'A')('l'|'L')('s'|'S')('e'|'E'); SEMICOLON : ';'; DARROW : '=>'; INT_CONST : [0-9]+; SELF : 'self'; SELF_TYPE : 'SELF_TYPE'; LPAREN : '('; RPAREN : ')'; COLON : ':'; ATSYM : '@'; COMMA : ','; PLUS : '+'; MINUS : '-'; STAR : '*'; SLASH : '/'; TILDE : '~'; EQUALS : '='; LT : '<'; LE : '<='; LBRACE : '{'; RBRACE : '}'; DOT : '.'; ASSIGN : '<-'; /* Keywords Lexer Rules */ CLASS : ('c'|'C')('l'|'L')('a'|'A')('s'|'S')('s'|'S'); ELSE : ('e'|'E')('l'|'L')('s'|'S')('e'|'E'); FI : ('f'|'F')('i'|'I'); IF : ('i'|'I')('f'|'F'); INHERITS : ('i'|'I')('n'|'N')('h'|'H')('e'|'E')('r'|'R')('i'|'I')('t'|'T')('s'|'S'); IN : ('i'|'I')('n'|'N'); LOOP : ('l'|'L')('o'|'O')('o'|'O')('p'|'P'); LET : ('l'|'L')('e'|'E')('t'|'T'); POOL : ('p'|'P')('o'|'O')('o'|'O')('l'|'L'); THEN : ('t'|'T')('h'|'H')('e'|'E')('n'|'N'); WHILE : ('w'|'W')('h'|'H')('i'|'I')('l'|'L')('e'|'E'); CASE : ('c'|'C')('a'|'A')('s'|'S')('e'|'E'); ESAC : ('e'|'E')('s'|'S')('a'|'A')('c'|'C'); OF : ('o'|'O')('f'|'F'); NOT : ('n'|'N')('o'|'O')('t'|'T'); NEW : ('n'|'N')('e'|'E')('w'|'W'); ISVOID : ('i'|'I')('s'|'S')('v'|'V')('o'|'O')('i'|'I')('d'|'D'); SPACES : [ \t\r\n\f]+ -> skip; OBJECTID : [a-z][_a-zA-Z0-9]+; TYPEID : [A-Z][_a-zA-Z0-9]*; /* Comment Lexer Rules */ ONE_LINE_COMMENT : '--' .*? '\n' -> skip; END_MULTI_COMMENT : '*)' EOF? { reportError("Unmatched *)"); }; BEGIN_NESTED_COMMENT1 : '(*' -> pushMode(IN_MULTI_COMMENT), skip; mode IN_MULTI_COMMENT; ERR : .(EOF) { reportError("EOF in comment"); }; BEGIN_NESTED_COMMENT2 : '(*' -> pushMode(IN_IN_MULTI_COM), skip; END_NESTED_COMMENT1 : '*)' -> popMode, skip; IM_MULTI_COMMENT_T : . -> skip; mode IN_IN_MULTI_COM; ERR2 : .(EOF) { reportError("EOF in comment"); }; BEGIN_NESTED_COMMENT3 : '(*' -> pushMode(IN_IN_MULTI_COM), skip; ERR3 : '*)' EOF { reportError("EOF in comment"); }; END_NESTED_COMMENT2 : '*)' -> popMode, skip; IM_NESTED_COMMENT_T : . -> skip; /* Lexer Rules for error function */ ERROR : '"' (~[\u0000]* ('\\u0000'))+ ~["\nEOF]* ["\nEOF] { reportError("String has NULL character"); } | '"' ~[\n"]* (EOF) { reportError("EOF in string literal"); } | '"' ~["\nEOF]* ('\n') { reportError("Unterminated string constant"); } ; /* UNKNOWN if unknown token is found */ UNKNOWN : . { unknownToken(); };
src/Dodo/Binary/Filter.agda
sourcedennis/agda-dodo
0
12194
<filename>src/Dodo/Binary/Filter.agda {-# OPTIONS --without-K --safe #-} module Dodo.Binary.Filter where -- Stdlib imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; _≢_; refl; subst; cong; cong₂) renaming (sym to ≡-sym; trans to ≡-trans) open import Level using (Level; _⊔_) open import Data.Empty using (⊥) open import Data.Product using (∃-syntax; _,_) open import Relation.Unary using (Pred; _∈_) open import Relation.Binary using (Rel; Transitive) open import Relation.Binary.Construct.Closure.Transitive using (TransClosure; [_]; _∷_) -- Local imports open import Dodo.Unary.Equality open import Dodo.Unary.Unique open import Dodo.Binary.Equality open import Dodo.Binary.Transitive -- # Definitions -- | A value of type `A` with a proof that it satisfies the given predicate `P`. -- -- -- # Design Decision: Alternative to `P x` -- -- One might argue that a function could just as well take: -- > f : {x : A} → P x → ... -- -- In that case, the `with-pred` constructor adds nothing. However, crucially, -- the inhabitant of `A` is /not/ included in the type signature of `WithPred`. -- This means, a relation may be defined over elements of type `WithPred`. -- While a relation /cannot/ be defined over elements of type `P x`, because -- `x` varies. data WithPred {a ℓ : Level} {A : Set a} (P : Pred A ℓ) : Set (a ⊔ ℓ) where with-pred : (x : A) → P x → WithPred P -- | Helper for extracting element equality from an instance of `WithPred`. -- -- This is tricky to unify otherwise in larger contexts, as `Px` and `Py` have -- different /types/ when `x` and `y` are unequal. with-pred-≡ : ∀ {a ℓ : Level} {A : Set a} {P : Pred A ℓ} {x y : A} {Px : P x} {Py : P y} → with-pred x Px ≡ with-pred y Py ------------------------------- → x ≡ y with-pred-≡ refl = refl -- | Instances of `WithPred` are equal if they are defined over the same value, -- and its predicate is unique. with-pred-unique : ∀ {a ℓ : Level} {A : Set a} {P : Pred A ℓ} → UniquePred P → {x y : A} → x ≡ y → (Px : P x) (Py : P y) ------------------------------- → with-pred x Px ≡ with-pred y Py with-pred-unique uniqueP {x} refl Px Py = cong (with-pred x) (uniqueP _ Px Py) with-pred-≢ : ∀ {a ℓ : Level} {A : Set a} {P : Pred A ℓ} → UniquePred P → {x y : A} {Px : P x} {Py : P y} → with-pred x Px ≢ with-pred y Py ------------------------------- → x ≢ y with-pred-≢ uniqueP Px≢Py x≡y = Px≢Py (with-pred-unique uniqueP x≡y _ _) -- | A relation whose elements all satisfy `P`. -- -- Note that this differs from defining: -- > R ∩₂ ( P ×₂ P ) -- -- In that case, the type signature is still identical to the type signature of -- `R` (except for the universe level). However, `filter-rel` alters the type, -- which proves no other inhabitants can exist. -- -- This is in particular useful for properties that are declared over an entire -- relation (such as `Trichotomous`), while they should only hold over a subset -- of it. -- -- -- # Example -- -- For instance, consider: -- (1) > Trichotomous _≡_ (filter-rel P R) -- and -- (2) > Trichotomous _≡_ (R ∩₂ ( P ×₂ P )) -- -- Where the corresponding types are: -- > R : Rel A ℓzero -- > P : Pred A ℓzero -- -- The type of the relation in (1) is then: -- > filter-rel P R : Rel (WithPred P) ℓzero -- While the type of the relation in (2) is: -- > (R ∩₂ (P ×₂ P)) : Rel A ℓzero -- -- So, for (2), defining `Trichotomous` means that it finds an instance of -- `P` for both elements, even when no such `P x` exists; Which leads to a -- contradiction. Whereas (1) will only find the relation if `P` holds for both -- elements. -- -- Effectively, (2) implies: -- > ∀ (x : A) → P x -- -- Whereas (1) makes no such strong claims. filter-rel : ∀ {a ℓ₁ ℓ₂ : Level} {A : Set a} → (P : Pred A ℓ₁) → Rel A ℓ₂ ------------------- → Rel (WithPred P) ℓ₂ filter-rel P R (with-pred x Px) (with-pred y Py) = R x y -- | Effectively the inverse of `filter-rel`. -- -- It loses the type-level restrictions, but preserves the restrictions on -- value-level. unfilter-rel : ∀ {a ℓ₁ ℓ₂ : Level} {A : Set a} → {P : Pred A ℓ₁} → Rel (WithPred P) ℓ₂ ------------------- → Rel A (ℓ₁ ⊔ ℓ₂) unfilter-rel R x y = ∃[ Px ] ∃[ Py ] R (with-pred x Px) (with-pred y Py) -- | Helper for unwrapping the value from the `with-pred` constructor. un-with-pred : {a ℓ : Level} {A : Set a} {P : Pred A ℓ} → WithPred P ---------- → A un-with-pred (with-pred x _) = x ⁺-strip-filter : {a ℓ₁ ℓ₂ : Level} {A : Set a} → {P : Pred A ℓ₁} → {R : Rel A ℓ₂} → {x y : A} → {Px : P x} {Py : P y} → TransClosure (filter-rel P R) (with-pred x Px) (with-pred y Py) --------------------------------------------------------------- → TransClosure R x y ⁺-strip-filter [ x∼y ] = [ x∼y ] ⁺-strip-filter (_∷_ {_} {with-pred z Pz} Rxz R⁺zy) = Rxz ∷ ⁺-strip-filter R⁺zy -- | Apply a relation filter to a chain /from right to left/. -- -- This applies when a predicate `P x` is true whenever `R x y` and `P y` are true. -- Then, for any chain where `P` holds for the final element, it holds for every -- element in the chain. ⁺-filter-relˡ : {a ℓ₁ ℓ₂ : Level} {A : Set a} {P : Pred A ℓ₁} {R : Rel A ℓ₂} → (f : ∀ {x y : A} → P y → R x y → P x) → {x y : A} → (Px : P x) (Py : P y) → (R⁺xy : TransClosure R x y) --------------------------------------------------------------- → TransClosure (filter-rel P R) (with-pred x Px) (with-pred y Py) ⁺-filter-relˡ f Px Py [ Rxy ] = [ Rxy ] ⁺-filter-relˡ f Px Py ( Rxz ∷ R⁺zy ) = Rxz ∷ ⁺-filter-relˡ f (⁺-predˡ f R⁺zy Py) Py R⁺zy -- | Apply a relation filter to a chain /from left to right/. -- -- This applies when a predicate `P y` is true whenever `R x y` and `P x` are true. -- Then, for any chain where `P` holds for the first element, it holds for every -- element in the chain. ⁺-filter-relʳ : {a ℓ₁ ℓ₂ : Level} {A : Set a} {P : Pred A ℓ₁} {R : Rel A ℓ₂} → (f : ∀ {x y : A} → P x → R x y → P y) → {x y : A} → (Px : P x) (Py : P y) → (R⁺xy : TransClosure R x y) --------------------------------------------------------------- → TransClosure (filter-rel P R) (with-pred x Px) (with-pred y Py) ⁺-filter-relʳ f Px Py [ Rxy ] = [ Rxy ] ⁺-filter-relʳ f Px Py ( Rxz ∷ R⁺zy ) = Rxz ∷ ⁺-filter-relʳ f (f Px Rxz) Py R⁺zy -- # Properties module _ {a ℓ₁ ℓ₂ : Level} {A : Set a} {P : Pred A ℓ₁} {Q : Pred A ℓ₂} where with-pred-⊆₁ : P ⊆₁ Q → WithPred P ---------- → WithPred Q with-pred-⊆₁ P⊆Q (with-pred x Px) = with-pred x (⊆₁-apply P⊆Q Px) module _ {a ℓ₁ ℓ₂ : Level} {A : Set a} where filter-rel-⊆₂ : (R : Rel A ℓ₁) → {P : Pred A ℓ₂} ---------------------------------- → unfilter-rel (filter-rel P R) ⊆₂ R filter-rel-⊆₂ R {P} = ⊆: ⊆-proof where ⊆-proof : unfilter-rel (filter-rel P R) ⊆₂' R ⊆-proof _ _ (_ , _ , Rxy) = Rxy module _ {a ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {P : Pred A ℓ₁} {Q : Pred A ℓ₂} {R : Rel A ℓ₃} where filter-rel-preserves-⊆₁ : P ⊆₁ Q -------------------------------------------------------------- → unfilter-rel (filter-rel P R) ⊆₂ unfilter-rel (filter-rel Q R) filter-rel-preserves-⊆₁ P₁⊆P₂ = ⊆: lemma where lemma : unfilter-rel (filter-rel P R) ⊆₂' unfilter-rel (filter-rel Q R) lemma _ _ (P₁x , P₁y , Qxy) = (⊆₁-apply P₁⊆P₂ P₁x , ⊆₁-apply P₁⊆P₂ P₁y , Qxy) -- | -- -- Note that this does /not/ hold in general for subsets of relations. -- That is, the following does /not/ hold: -- > Q ⊆₂ R → Transitive R → Transitive Q -- -- After all, if `Q x y` and `Q y z` hold, then `R x y` and `R y z` hold, -- then `R x z` holds. However, it does not mean that `Q x z` holds. trans-filter-rel-⊆₁ : P ⊆₁ Q → Transitive (filter-rel Q R) --------------------------- → Transitive (filter-rel P R) trans-filter-rel-⊆₁ P⊆Q transQR {Pi} {Pj} {Pk} Rij Rjk = let Qi = with-pred-⊆₁ P⊆Q Pi Qj = with-pred-⊆₁ P⊆Q Pj Qk = with-pred-⊆₁ P⊆Q Pk in Q⇒P {Pi} {Pk} (transQR {Qi} {Qj} {Qk} (P⇒Q {Pi} {Pj} Rij) (P⇒Q {Pj} {Pk} Rjk)) where P⇒Q : ∀ {x y : WithPred P} → filter-rel P R x y → filter-rel Q R (with-pred-⊆₁ P⊆Q x) (with-pred-⊆₁ P⊆Q y) P⇒Q {with-pred _ _} {with-pred _ _} Rxy = Rxy Q⇒P : ∀ {x y : WithPred P} → filter-rel Q R (with-pred-⊆₁ P⊆Q x) (with-pred-⊆₁ P⊆Q y) → filter-rel P R x y Q⇒P {with-pred _ _} {with-pred _ _} Rxy = Rxy module _ {a ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {P : Pred A ℓ₁} {R : Rel A ℓ₂} {Q : Rel A ℓ₃} where filter-rel-preserved-⊆₂ : R ⊆₂ Q -------------------------------------------------------------- → unfilter-rel (filter-rel P R) ⊆₂ unfilter-rel (filter-rel P Q) filter-rel-preserved-⊆₂ R⊆Q = ⊆: lemma where lemma : unfilter-rel (filter-rel P R) ⊆₂' unfilter-rel (filter-rel P Q) lemma x y (Px , Py , Rxy) = Px , Py , ⊆₂-apply R⊆Q Rxy -- # Operations module _ {a ℓ₁ ℓ₂ : Level} {A : Set a} {R : Rel A ℓ₁} {P : Pred A ℓ₂} {x y : A} where filter-rel-dom : unfilter-rel (filter-rel P R) x y --------------------------------- → x ∈ P filter-rel-dom (Px , Py , Rxy) = Px filter-rel-codom : unfilter-rel (filter-rel P R) x y --------------------------------- → y ∈ P filter-rel-codom (Px , Py , Rxy) = Py
thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/loopwave_callback.ads
Lucretia/old_nehe_ada95
0
28948
<reponame>Lucretia/old_nehe_ada95 -- ----------------------------------------------------------------- -- -- -- -- This 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 2 of the License, 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 this library; if not, write to the -- -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- -- Boston, MA 02111-1307, USA. -- -- -- -- ----------------------------------------------------------------- -- -- ----------------------------------------------------------------- -- -- This is a translation, to the Ada programming language, of the -- -- original C test files written by <NAME> - www.libsdl.org -- -- translation made by <NAME> - www.adapower.net/~avargas -- -- ----------------------------------------------------------------- -- -- ----------------------------------------------------------------- -- -- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -- ----------------------------------------------------------------- -- -- SERIOUS WARNING: The Ada code in this files may, at some points, -- rely directly on pointer arithmetic which is considered very -- unsafe and PRONE TO ERROR. The AdaSDL_Mixer examples are -- more appropriate and easier to understand. They should be used in -- replacement of this files. Please go there. -- This file exists only for the sake of completness and to test -- AdaSDL without the dependency of AdaSDL_Mixer. -- ----------------------------------------------------------------- -- -- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -- ----------------------------------------------------------------- -- with Interfaces.C; with Interfaces.C.Pointers; with SDL.Types; use SDL.Types; with SDL.Audio; package Loopwave_Callback is package A renames SDL.Audio; package C renames Interfaces.C; use type C.int; done : C.int := 0; type Wave_Type is record spec : aliased A.AudioSpec; sound : aliased Uint8_ptr; -- Pointer do wave data soundlen : aliased Uint32; -- Length of wave data soundpos : C.int; -- Current play position end record; pragma Convention (C, Wave_Type); wave : Wave_Type; procedure fillerup (userdata : void_ptr; the_stream : Uint8_ptr; the_len : C.int); pragma Convention (C, fillerup); procedure poked (sig : C.int); pragma Convention (C, poked); end Loopwave_Callback;
src/natools-s_expressions-templates-dates.ads
faelys/natools
0
6059
------------------------------------------------------------------------------ -- Copyright (c) 2014, <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. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.S_Expressions.Templates.Dates provides a template interpreter -- -- for dates and times. -- ------------------------------------------------------------------------------ with Ada.Calendar.Formatting; with Ada.Calendar.Time_Zones; with Ada.Streams; with Natools.S_Expressions.Lockable; package Natools.S_Expressions.Templates.Dates is type Split_Time is record Source : Ada.Calendar.Time; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset; Year : Ada.Calendar.Year_Number; Month : Ada.Calendar.Month_Number; Day : Ada.Calendar.Day_Number; Day_Of_Week : Ada.Calendar.Formatting.Day_Name; Hour : Ada.Calendar.Formatting.Hour_Number; Minute : Ada.Calendar.Formatting.Minute_Number; Second : Ada.Calendar.Formatting.Second_Number; Sub_Second : Ada.Calendar.Formatting.Second_Duration; end record; function Split (Value : Ada.Calendar.Time; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset) return Split_Time; -- Pre process split time component from Value in Time_Zone procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Split_Time); -- Render the given time procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Ada.Calendar.Time); -- Render the given time considered in local time zone procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in Ada.Calendar.Time; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset); -- Render the given time end Natools.S_Expressions.Templates.Dates;
programs/oeis/299/A299913.asm
karttu/loda
0
85741
; A299913: a(n) = a(n-1) + 2*a(n-2) if n even, or 3*a(n-1) + 4*a(n-2) if n odd, starting with 0, 1. ; 0,1,1,7,9,55,73,439,585,3511,4681,28087,37449,224695,299593,1797559,2396745,14380471,19173961,115043767,153391689,920350135,1227133513,7362801079,9817068105,58902408631,78536544841,471219269047,628292358729,3769754152375,5026338869833,30158033218999,40210710958665,241264265751991,321685687669321,1930114126015927,2573485501354569 mov $4,$0 mov $13,$0 lpb $4,1 mov $0,$13 sub $4,1 sub $0,$4 mov $9,$0 mov $11,2 lpb $11,1 mov $0,$9 sub $11,1 add $0,$11 sub $0,1 mov $5,$0 mov $7,2 lpb $7,1 mov $0,$5 sub $7,1 add $0,$7 sub $0,1 mul $0,3 add $0,1 mov $2,1 mov $3,1 lpb $0,1 sub $0,2 mul $2,2 add $2,1 mov $3,$2 lpe sub $3,$0 mov $2,$3 mov $8,$7 lpb $8,1 mov $6,$2 sub $8,1 lpe lpe lpb $5,1 mov $5,0 sub $6,$2 lpe mov $2,$6 mov $12,$11 lpb $12,1 mov $10,$2 sub $12,1 lpe lpe lpb $9,1 mov $9,0 sub $10,$2 lpe mov $2,$10 div $2,7 add $1,$2 lpe
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_DrawUpdateStructAlways.asm
jpoikela/z88dk
640
241085
<reponame>jpoikela/z88dk ; sp1_DrawUpdateStructAlways(struct sp1_update *u) SECTION code_clib SECTION code_temp_sp1 PUBLIC sp1_DrawUpdateStructAlways EXTERN asm_sp1_DrawUpdateStructAlways defc sp1_DrawUpdateStructAlways = asm_sp1_DrawUpdateStructAlways
test/Succeed/Issue2128.agda
shlevy/agda
1,989
684
<reponame>shlevy/agda postulate A : Set I : (@erased _ : A) → Set R : A → Set f : ∀ (@erased x : A) (r : R x) → I x -- can now be used here ^
_build/dispatcher/jmp_ippsTDESEncryptCBC_7ca2f94a.asm
zyktrcn/ippcp
1
85324
extern m7_ippsTDESEncryptCBC:function extern n8_ippsTDESEncryptCBC:function extern y8_ippsTDESEncryptCBC:function extern e9_ippsTDESEncryptCBC:function extern l9_ippsTDESEncryptCBC:function extern n0_ippsTDESEncryptCBC:function extern k0_ippsTDESEncryptCBC:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsTDESEncryptCBC .Larraddr_ippsTDESEncryptCBC: dq m7_ippsTDESEncryptCBC dq n8_ippsTDESEncryptCBC dq y8_ippsTDESEncryptCBC dq e9_ippsTDESEncryptCBC dq l9_ippsTDESEncryptCBC dq n0_ippsTDESEncryptCBC dq k0_ippsTDESEncryptCBC segment .text global ippsTDESEncryptCBC:function (ippsTDESEncryptCBC.LEndippsTDESEncryptCBC - ippsTDESEncryptCBC) .Lin_ippsTDESEncryptCBC: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsTDESEncryptCBC: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsTDESEncryptCBC] mov r11, qword [r11+rax*8] jmp r11 .LEndippsTDESEncryptCBC:
tools-src/gnu/gcc/gcc/ada/prj.adb
enfoTek/tomato.linksys.e2000.nvram-mod
80
19047
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P R J -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 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 Ada.Characters.Handling; use Ada.Characters.Handling; with Errout; use Errout; with GNAT.OS_Lib; use GNAT.OS_Lib; with Namet; use Namet; with Prj.Attr; with Prj.Com; with Prj.Env; with Scans; use Scans; with Scn; with Stringt; use Stringt; with Sinfo.CN; with Snames; use Snames; package body Prj is The_Empty_String : String_Id; subtype Known_Casing is Casing_Type range All_Upper_Case .. Mixed_Case; The_Casing_Images : array (Known_Casing) of String_Access := (All_Lower_Case => new String'("lowercase"), All_Upper_Case => new String'("UPPERCASE"), Mixed_Case => new String'("MixedCase")); Initialized : Boolean := False; Standard_Dot_Replacement : constant Name_Id := First_Name_Id + Character'Pos ('-'); Std_Naming_Data : Naming_Data := (Current_Language => No_Name, Dot_Replacement => Standard_Dot_Replacement, Dot_Repl_Loc => No_Location, Casing => All_Lower_Case, Specification_Suffix => No_Array_Element, Current_Spec_Suffix => No_Name, Spec_Suffix_Loc => No_Location, Implementation_Suffix => No_Array_Element, Current_Impl_Suffix => No_Name, Impl_Suffix_Loc => No_Location, Separate_Suffix => No_Name, Sep_Suffix_Loc => No_Location, Specifications => No_Array_Element, Bodies => No_Array_Element, Specification_Exceptions => No_Array_Element, Implementation_Exceptions => No_Array_Element); Project_Empty : constant Project_Data := (First_Referred_By => No_Project, Name => No_Name, Path_Name => No_Name, Location => No_Location, Directory => No_Name, Library => False, Library_Dir => No_Name, Library_Name => No_Name, Library_Kind => Static, Lib_Internal_Name => No_Name, Lib_Elaboration => False, Sources_Present => True, Sources => Nil_String, Source_Dirs => Nil_String, Object_Directory => No_Name, Exec_Directory => No_Name, Modifies => No_Project, Modified_By => No_Project, Naming => Std_Naming_Data, Decl => No_Declarations, Imported_Projects => Empty_Project_List, Include_Path => null, Objects_Path => null, Config_File_Name => No_Name, Config_File_Temp => False, Config_Checked => False, Language_Independent_Checked => False, Checked => False, Seen => False, Flag1 => False, Flag2 => False); ------------------- -- Empty_Project -- ------------------- function Empty_Project return Project_Data is begin Initialize; return Project_Empty; end Empty_Project; ------------------ -- Empty_String -- ------------------ function Empty_String return String_Id is begin return The_Empty_String; end Empty_String; ------------ -- Expect -- ------------ procedure Expect (The_Token : Token_Type; Token_Image : String) is begin if Token /= The_Token then Error_Msg ("""" & Token_Image & """ expected", Token_Ptr); end if; end Expect; -------------------------------- -- For_Every_Project_Imported -- -------------------------------- procedure For_Every_Project_Imported (By : Project_Id; With_State : in out State) is procedure Check (Project : Project_Id); -- Check if a project has already been seen. -- If not seen, mark it as seen, call Action, -- and check all its imported projects. procedure Check (Project : Project_Id) is List : Project_List; begin if not Projects.Table (Project).Seen then Projects.Table (Project).Seen := False; Action (Project, With_State); List := Projects.Table (Project).Imported_Projects; while List /= Empty_Project_List loop Check (Project_Lists.Table (List).Project); List := Project_Lists.Table (List).Next; end loop; end if; end Check; begin for Project in Projects.First .. Projects.Last loop Projects.Table (Project).Seen := False; end loop; Check (Project => By); end For_Every_Project_Imported; ----------- -- Image -- ----------- function Image (Casing : Casing_Type) return String is begin return The_Casing_Images (Casing).all; end Image; ---------------- -- Initialize -- ---------------- procedure Initialize is begin if not Initialized then Initialized := True; Stringt.Initialize; Start_String; The_Empty_String := End_String; Name_Len := 4; Name_Buffer (1 .. 4) := ".ads"; Default_Ada_Spec_Suffix := Name_Find; Name_Len := 4; Name_Buffer (1 .. 4) := ".adb"; Default_Ada_Impl_Suffix := Name_Find; Std_Naming_Data.Current_Spec_Suffix := Default_Ada_Spec_Suffix; Std_Naming_Data.Current_Impl_Suffix := Default_Ada_Impl_Suffix; Std_Naming_Data.Separate_Suffix := Default_Ada_Impl_Suffix; Prj.Env.Initialize; Prj.Attr.Initialize; Set_Name_Table_Byte (Name_Project, Token_Type'Pos (Tok_Project)); Set_Name_Table_Byte (Name_Extends, Token_Type'Pos (Tok_Extends)); Set_Name_Table_Byte (Name_External, Token_Type'Pos (Tok_External)); end if; end Initialize; ------------ -- Reset -- ------------ procedure Reset is begin Projects.Init; Project_Lists.Init; Packages.Init; Arrays.Init; Variable_Elements.Init; String_Elements.Init; Prj.Com.Units.Init; Prj.Com.Units_Htable.Reset; end Reset; ------------------------ -- Same_Naming_Scheme -- ------------------------ function Same_Naming_Scheme (Left, Right : Naming_Data) return Boolean is begin return Left.Dot_Replacement = Right.Dot_Replacement and then Left.Casing = Right.Casing and then Left.Current_Spec_Suffix = Right.Current_Spec_Suffix and then Left.Current_Impl_Suffix = Right.Current_Impl_Suffix and then Left.Separate_Suffix = Right.Separate_Suffix; end Same_Naming_Scheme; ---------- -- Scan -- ---------- procedure Scan is begin Scn.Scan; -- Change operator symbol to literal strings, since that's the way -- we treat all strings in a project file. if Token = Tok_Operator_Symbol then Sinfo.CN.Change_Operator_Symbol_To_String_Literal (Token_Node); Token := Tok_String_Literal; end if; end Scan; -------------------------- -- Standard_Naming_Data -- -------------------------- function Standard_Naming_Data return Naming_Data is begin Initialize; return Std_Naming_Data; end Standard_Naming_Data; ----------- -- Value -- ----------- function Value (Image : String) return Casing_Type is begin for Casing in The_Casing_Images'Range loop if To_Lower (Image) = To_Lower (The_Casing_Images (Casing).all) then return Casing; end if; end loop; raise Constraint_Error; end Value; end Prj;
practice/001_book/hello_proper_exit.asm
OldJohn86/God-s-programming-language
0
90555
<filename>practice/001_book/hello_proper_exit.asm global _start section .data message: db 'hello, world!', 10 section .text _start: mov rax, 1 ; 'write' syscall number mov rdi, 1 ; stdout descriptor mov rsi, message ; string address mov rdx, 14 ; string length in bytes syscall mov rax, 60 ; 'exit' syscall number xor rdi, rdi syscall
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca_notsx.log_5266_1227.asm
ljhsiun2/medusa
9
166472
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r13 push %r9 push %rax push %rcx lea addresses_WT_ht+0x18bbf, %rax nop nop nop and %r13, %r13 vmovups (%rax), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %r9 nop nop nop nop nop xor $26395, %rcx pop %rcx pop %rax pop %r9 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi // Load lea addresses_WT+0x1ecb7, %r8 nop nop nop nop sub $41702, %rax mov (%r8), %di nop nop nop nop xor %r8, %r8 // REPMOV lea addresses_UC+0x18dbf, %rsi lea addresses_D+0x17dbf, %rdi clflush (%rdi) nop add $54953, %r8 mov $34, %rcx rep movsw nop nop inc %r8 // Store lea addresses_WC+0x1f1ef, %rax nop xor $6728, %r8 mov $0x5152535455565758, %r13 movq %r13, %xmm7 movups %xmm7, (%rax) nop nop and %r13, %r13 // Load lea addresses_PSE+0x11cff, %rdi nop nop lfence mov (%rdi), %si nop nop nop nop nop sub %rsi, %rsi // Store lea addresses_RW+0x174f9, %rax nop nop nop nop xor %r13, %r13 movw $0x5152, (%rax) // Exception!!! nop nop nop mov (0), %rdi nop nop nop sub $56649, %rcx // Store mov $0x5744d7000000053f, %rdi nop nop nop nop and %rcx, %rcx movb $0x51, (%rdi) nop nop nop nop nop and %rcx, %rcx // Load lea addresses_D+0x17dbf, %r8 nop inc %rdi mov (%r8), %ax nop nop xor $54698, %r9 // Store lea addresses_WC+0x46bf, %rsi nop nop nop nop and %r8, %r8 mov $0x5152535455565758, %r11 movq %r11, %xmm0 movups %xmm0, (%rsi) nop nop xor $14225, %rcx // Store lea addresses_normal+0x6c28, %rcx nop nop nop nop nop xor $46614, %rsi movl $0x51525354, (%rcx) nop nop nop nop nop and $6334, %r9 // Store mov $0x7d09920000000ce7, %rcx nop nop xor %r11, %r11 movb $0x51, (%rcx) add %r8, %r8 // Store lea addresses_UC+0x94b3, %rdi nop sub $59811, %r9 mov $0x5152535455565758, %rax movq %rax, (%rdi) nop nop nop nop nop cmp $44817, %rdi // Store lea addresses_normal+0x1bd9f, %r8 nop nop nop and %rax, %rax movw $0x5152, (%r8) nop sub $46875, %rax // Store lea addresses_normal+0x23bf, %r8 nop nop nop nop nop xor $15240, %r11 mov $0x5152535455565758, %r13 movq %r13, %xmm6 vmovups %ymm6, (%r8) nop nop dec %rax // Faulty Load lea addresses_D+0x17dbf, %rcx nop nop nop inc %rdi mov (%rcx), %r8w lea oracles, %r13 and $0xff, %r8 shlq $12, %r8 mov (%r13,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC'}, 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_D'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}} {'37': 5266} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
examples/teletype_echo.asm
nicolasbauw/Intel8080
1
22175
<filename>examples/teletype_echo.asm ;These echo routines are taken from the MITS Basic 3.2 manual (1975) ; ;REV 0 SERIAL I/O BOARDS WITHOUT THE STATUS BIT MODIFICATION ;0 333 0xDB IN 0x00 ;1 000 0x00 ;2 346 0xE6 ANI 0x20 ;3 040 0x20 ;4 312 0xCA JZ 0x0000 ;5 000 0x00 ;6 000 0x00 ;7 333 0xDB IN 0x01 ;10 001 0x01 ;11 323 0xD3 OUT 0x01 ;12 001 0x01 ;13 303 0xC3 JMP 0x0000 ;14 000 0x00 ;15 000 0x00 ;FOR REV 1 SERIAL I/O BOARDS (AND REV 0 MODIFIED BOARDS) -> all switches down on the altair panel, 0x00 on device 255 (Basic 3.2) ;0 333 0xDB IN 0x00 ;1 000 0x00 ;2 017 0x0F RRC ;3 332 0xDA JC 0x0000 ;4 000 0x00 ;5 000 0x00 ;6 333 0xDB IN 0x01 ;7 001 0x01 ;10 323 0xD3 OUT 0x01 ;11 001 0x01 ;12 303 0xC3 JMP 0x0000 ;13 000 0x00 ;14 000 0x00 .target "8080" .format "bin" .org 0 IN 0x00 RRC JC 0x0000 IN 0x01 OUT 0x01 JMP 0x0000
agda/SelectSort.agda
bgbianchi/sorting
6
6357
<reponame>bgbianchi/sorting {-# OPTIONS --sized-types #-} open import Relation.Binary.Core module SelectSort {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.List open import Data.Product open import Data.Sum open import Size open import SList open import SList.Order _≤_ select : {ι : Size} → A → SList A {ι} → A × SList A {ι} select x snil = (x , snil) select x (y ∙ ys) with tot≤ x y ... | inj₁ x≤y with select x ys select x (y ∙ ys) | inj₁ x≤y | (z , zs) = (z , y ∙ zs) select x (y ∙ ys) | inj₂ y≤x with select y ys select x (y ∙ ys) | inj₂ y≤x | (z , zs) = (z , x ∙ zs) selectSort : {ι : Size} → SList A {ι} → SList A {ι} selectSort snil = snil selectSort (x ∙ xs) with select x xs ... | (y , ys) = y ∙ (selectSort ys)
oeis/142/A142811.asm
neoneye/loda-programs
11
169893
; A142811: Primes congruent to 13 mod 61. ; Submitted by <NAME> ; 13,257,379,1721,2087,2819,3307,3673,3917,4283,4649,5381,5503,5869,6113,6967,7211,7333,7577,7699,8431,9041,10139,10627,10993,11969,12457,12823,13799,13921,14653,14897,15263,15629,16361,17093,17581,18191,18313,18679,19289,19777,20021,20143,20509,20753,21851,23071,24169,24413,25633,25999,26731,28439,28927,29537,30269,30391,30757,31123,31489,32099,32587,32831,33563,35027,35149,35393,35759,36857,36979,37223,37589,38321,39419,39541,40151,40639,40883,41737,41981,43201,43933,44543,44909,45641,45763 mov $1,6 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 mul $1,2 mov $0,$1 sub $0,121
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1252.asm
ljhsiun2/medusa
9
15498
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %rbx push %rcx // Faulty Load lea addresses_UC+0xec57, %rcx nop nop nop nop and %r8, %r8 movb (%rcx), %r12b lea oracles, %rcx and $0xff, %r12 shlq $12, %r12 mov (%rcx,%r12,1), %r12 pop %rcx pop %rbx pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'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 */
src/tom/library/sl/ada/mustrategy.adb
rewriting/tom
36
13230
with VisitFailurePackage, VisitablePackage, EnvironmentPackage, MuVarStrategy; use VisitFailurePackage, VisitablePackage, EnvironmentPackage, MuVarStrategy; with Ada.Text_IO; use Ada.Text_IO; package body MuStrategy is ---------------------------------------------------------------------------- -- Object implementation ---------------------------------------------------------------------------- overriding function toString(c: Mu) return String is begin return "Mu"; end; ---------------------------------------------------------------------------- -- Strategy implementation ---------------------------------------------------------------------------- overriding function visitLight(str:access Mu; any: ObjectPtr; i: access Introspector'Class) return ObjectPtr is begin if not(str.expanded) then expand(StrategyPtr(str)); str.expanded := true; end if; return visitLight(StrategyPtr(str.arguments(V)), any, i); end; overriding function visit(str: access Mu; i: access Introspector'Class) return Integer is begin if not(str.expanded) then expand(StrategyPtr(str)); str.expanded := true; end if; return visit(StrategyPtr(str.arguments(V)), i); end; function isExpanded(str: access Mu) return Boolean is begin return isExpanded( MuVar(str.arguments(V).all)'Access ); end; procedure expand(any,parent: StrategyPtr ; childNumber : Integer; set: in out StrategyStr_Sets.Set; stack : in out StrategyStr_LL.List) is use StrategyStr_LL; begin if set.contains(any) then return; else declare cur: StrategyStr_Sets.Cursor; suc: Boolean; begin -- the call of insert with 3 parameter prevent from raising -- an exception when parent is already in the set set.Insert(parent, cur, suc); end; end if; if any.all in Mu'Class then declare anyMu : MuPtr := MuPtr(any); vptr : StrategyPtr := StrategyPtr( any.getChildAt(MuStrategy.V) ); begin stack.prepend(anyMu); expand(vptr, StrategyPtr(anyMu),0,set,stack); expand(StrategyPtr(any.getChildAt(MuStrategy.VAR)),null,0,set,stack); stack.delete_first; return; end; else if any.all in MuVar'Class then declare muvariable : MuVarPtr := MuVarPtr(any); n : access String := getName(muvariable); visitptr : VisitablePtr; -- not used begin if not(muvariable.isExpanded) then declare curseur : Cursor; m : MuPtr; tmpstr : access String; begin curseur := stack.First; loop m := Element(curseur); tmpstr := MuVarPtr(m.arguments(MuStrategy.VAR)).getName; if (tmpstr = null and then n = null) or else (tmpstr/=null and then n/=null and then tmpstr.all = n.all) then muvariable.setInstance(StrategyPtr(m)); if parent /= null then visitptr := parent.setChildAt(childNumber, VisitablePtr(m.arguments(MuStrategy.V))); end if; return; end if; exit when curseur = stack.Last; curseur := Next(curseur); end loop; end; end if; end; end if; end if; declare childCount : Integer := any.getChildCount - 1; begin for i in 0..childCount loop expand( StrategyPtr(any.getChildAt(i)), any, i, set, stack); end loop; end; end; procedure expand(s: StrategyPtr) is newSet : StrategyStr_Sets.Set; newLL : StrategyStr_LL.List; begin expand(s, null, 0, newSet, newLL); end; ---------------------------------------------------------------------------- procedure makeMu(c : in out Mu; var,v: StrategyPtr) is begin initSubterm(c, var, v); end; function newMu(var, v: StrategyPtr) return StrategyPtr is ret : StrategyPtr := new Mu; begin makeMu(Mu(ret.all), var, v); return ret; end; ---------------------------------------------------------------------------- end MuStrategy;
test/asm/leg_2_ann.asm
xdrie/irre-tools
1
246157
%entry: main ; .text ; .file "../test/leg_2.c" ; .globl add ; .type add,@function add: sbi sp sp #16 ; set up stack mov r2 r1 ; r2 = b mov r3 r0 ; r3 = a stw r0 sp #12 ; var0 = a stw r1 sp #8 ; var1 = b ldw r0 sp #12 ; r0 = var0 add r0 r0 r1 ; r0 = a + b stw r2 sp #4 ; var2 = b stw r3 sp #0 ; var3 = a adi sp sp #16 ; tear down stack ret ; return r0 ; a + b .Lfunc_end0: ; .size add, .Lfunc_end0-add ; .globl main ; .type main,@function main: sbi sp sp #20 ; set up stack frame set r0 #0 ; ZERO stw r0 sp #16 ; var0 = 0 set r0 #3 stw r0 sp #12 ; store a = 3 set r0 #4 stw r0 sp #8 ; store b = 4 ldw r1 sp #12 ; r1 = a ; 3 set r2 ::add ; r2 = &add stw r0 sp #0 ; var1 = 4 mov r0 r1 ; r0 = r1 ; a ldw r1 sp #0 ; r1 = var1 ; 4 cal r2 ; r0 = add() ; r1 = a, r2 = b stw r0 sp #4 ; ? = r0 adi sp sp #20 ; tear down stack ret ; END .Lfunc_end1: hlt ;.size main, .Lfunc_end1-main ; .ident "clang version 3.8.1 (https://github.com/xdrie/clang-leg 43d93776c0f686e0097b8e3c96768b716ccd0a88) (https://github.com/xdrie/llvm-leg e9110cc431fbfe54a0c6e5d8dd476a1382dbbf60)" ; .section ".note.GNU-stack","",@progbits
source/receiver/main/ints.adb
reznikmm/gps-tracker
0
24755
<gh_stars>0 -- SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with ESP32.GPIO; package body Ints is protected body Signal is ------------- -- Handler -- ------------- procedure Handler is DIO_0 : constant ESP32.GPIO.GPIO_Pad := 26; DIO_1 : constant ESP32.GPIO.GPIO_Pad := 35; Set : constant ESP32.GPIO.GPIO_40_Set := ESP32.GPIO.Get_Interrupt_Status; begin -- Clear interrupt status. Should be first action in the handler ESP32.GPIO.Set_Interrupt_Status ((0 .. 39 => False)); Done := Set (DIO_0); Timeout := Set (DIO_1); Got := Done or Timeout; end Handler; ---------- -- Wait -- ---------- entry Wait (RX_Done : out Boolean; RX_Timeout : out Boolean) when Got is begin RX_Done := Done; RX_Timeout := Timeout; Got := False; Done := False; Timeout := False; end Wait; end Signal; end Ints;
notes/FOT/FOTC/Data/Nat/Pow/PropertiesATP.agda
asr/fotc
11
8762
------------------------------------------------------------------------------ -- Some proofs related to the power function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Data.Nat.Pow.PropertiesATP where open import FOT.FOTC.Data.Nat.Pow open import FOTC.Base open import FOTC.Data.Nat open import FOTC.Data.Nat.Inequalities open import FOTC.Data.Nat.UnaryNumbers open import FOTC.Data.Nat.UnaryNumbers.TotalityATP ------------------------------------------------------------------------------ postulate 0^0≡1 : 0' ^ 0' ≡ 1' {-# ATP prove 0^0≡1 #-} 0^Sx≡0 : ∀ {n} → N n → 0' ^ succ₁ n ≡ 0' 0^Sx≡0 {.zero} nzero = prf where postulate prf : 0' ^ succ₁ zero ≡ 0' {-# ATP prove prf #-} 0^Sx≡0 (nsucc {n} Nn) = prf where postulate prf : 0' ^ succ₁ (succ₁ n) ≡ 0' {-# ATP prove prf #-} thm₁ : ∀ {n} → N n → 5' ≤ n → n ^ 5' ≤ 5' ^ n thm₁ nzero h = prf where postulate prf : zero ^ 5' ≤ 5' ^ zero {-# ATP prove prf #-} thm₁ (nsucc {n} Nn) h = prf (thm₁ Nn) h where postulate prf : (5' ≤ n → n ^ 5' ≤ 5' ^ n) → 5' ≤ succ₁ n → succ₁ n ^ 5' ≤ 5' ^ succ₁ n -- 2018-06-28: The ATPs could not prove the theorem (300 sec). -- {-# ATP prove prf 5-N #-} thm₂ : ∀ {n} → N n → ((2' ^ n) ∸ 1') + 1' + ((2' ^ n) ∸ 1') ≡ 2' ^ (n + 1') ∸ 1' thm₂ nzero = prf where postulate prf : ((2' ^ zero) ∸ 1') + 1' + ((2' ^ zero) ∸ 1') ≡ 2' ^ (zero + 1') ∸ 1' {-# ATP prove prf #-} thm₂ (nsucc {n} Nn) = prf (thm₂ Nn) where postulate prf : ((2' ^ n) ∸ 1') + 1' + ((2' ^ n) ∸ 1') ≡ 2' ^ (n + 1') ∸ 1' → ((2' ^ succ₁ n) ∸ 1') + 1' + ((2' ^ succ₁ n) ∸ 1') ≡ 2' ^ (succ₁ n + 1') ∸ 1' -- 2018-06-28: The ATPs could not prove the theorem (300 sec). -- {-# ATP prove prf #-}
Task/Object-serialization/Ada/object-serialization-3.ada
LaudateCorpus1/RosettaCodeData
1
2418
with Messages; use Messages; with Ada.Streams.Stream_Io; use Ada.Streams.Stream_Io; with Ada.Calendar; use Ada.Calendar; with Ada.Text_Io; procedure Streams_Example is S1 : Sensor_Message; M1 : Message; C1 : Control_Message; Now : Time := Clock; The_File : Ada.Streams.Stream_Io.File_Type; The_Stream : Ada.Streams.Stream_IO.Stream_Access; begin S1 := (Now, 1234, 0.025); M1.Timestamp := Now; C1 := (Now, 15, 0.334); Display(S1); Display(M1); Display(C1); begin Open(File => The_File, Mode => Out_File, Name => "Messages.dat"); exception when others => Create(File => The_File, Name => "Messages.dat"); end; The_Stream := Stream(The_File); Sensor_Message'Class'Output(The_Stream, S1); Message'Class'Output(The_Stream, M1); Control_Message'Class'Output(The_Stream, C1); Close(The_File); Open(File => The_File, Mode => In_File, Name => "Messages.dat"); The_Stream := Stream(The_File); Ada.Text_Io.New_Line(2); while not End_Of_File(The_File) loop Display(Message'Class'Input(The_Stream)); end loop; Close(The_File); end Streams_Example;
CS410-Monoid.agda
clarkdm/CS410
0
10560
<filename>CS410-Monoid.agda<gh_stars>0 module CS410-Monoid where open import CS410-Prelude record Monoid (M : Set) : Set where field -- OPERATIONS ---------------------------------------- e : M op : M -> M -> M -- LAWS ---------------------------------------------- lunit : forall m -> op e m == m runit : forall m -> op m e == m assoc : forall m m' m'' -> op m (op m' m'') == op (op m m') m''
libsrc/target/zx81/stdio/getk.asm
Frodevan/z88dk
640
28960
; ; ZX81 Stdio ; ; getk() Read key status ; ; <NAME> - 8/5/2000 ; ; ; $Id: getk.asm,v 1.7 2016-06-12 17:32:01 dom Exp $ ; SECTION code_clib PUBLIC getk PUBLIC _getk EXTERN zx81toasc EXTERN restore81 .getk ._getk call restore81 IF FORlambda call 3444 ELSE call 699 ENDIF LD B,H ; LD C,L ; LD D,C ; INC D IF FORlambda call nz,6263 ELSE call nz,1981 ;exits with e = key ENDIF jr nc,nokey call zx81toasc ld l,a ld h,0 ret nokey: ld hl,0 ret
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1822.asm
ljhsiun2/medusa
9
242082
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1a606, %r12 nop nop nop nop add %r15, %r15 mov (%r12), %rbx nop nop nop nop nop cmp $53463, %r10 lea addresses_WC_ht+0x15a06, %rcx dec %rdx mov $0x6162636465666768, %r15 movq %r15, (%rcx) nop nop nop add $58093, %rcx lea addresses_A_ht+0xd528, %rsi lea addresses_D_ht+0x1dea2, %rdi nop nop nop add %r15, %r15 mov $54, %rcx rep movsl nop nop nop add %rcx, %rcx lea addresses_WC_ht+0x946, %rcx nop nop nop nop nop dec %r15 movb $0x61, (%rcx) nop nop nop nop sub $62529, %rdi lea addresses_normal_ht+0x1eec6, %rsi lea addresses_normal_ht+0x19256, %rdi clflush (%rsi) nop nop and $23512, %r15 mov $81, %rcx rep movsw nop sub %r10, %r10 lea addresses_normal_ht+0x3e06, %rsi lea addresses_D_ht+0x7db4, %rdi nop nop nop nop nop xor %rbx, %rbx mov $73, %rcx rep movsw nop nop cmp $36890, %rcx lea addresses_A_ht+0x10f06, %r10 nop and $35472, %r15 movl $0x61626364, (%r10) cmp $61915, %rdx lea addresses_WC_ht+0x9668, %rdx nop nop nop cmp %r10, %r10 movups (%rdx), %xmm2 vpextrq $1, %xmm2, %r12 cmp %rdi, %rdi lea addresses_D_ht+0xd006, %r12 nop cmp $63554, %rcx movw $0x6162, (%r12) nop nop nop nop cmp %rdi, %rdi lea addresses_WT_ht+0x2cb4, %rsi lea addresses_normal_ht+0x13006, %rdi nop nop nop nop sub %r10, %r10 mov $120, %rcx rep movsb nop nop nop nop sub %r12, %r12 lea addresses_UC_ht+0x18c84, %rsi lea addresses_WT_ht+0x1a806, %rdi clflush (%rsi) clflush (%rdi) nop and %r15, %r15 mov $122, %rcx rep movsw nop nop nop xor %rdi, %rdi lea addresses_D_ht+0x15806, %r15 nop nop nop nop nop sub %rdx, %rdx mov $0x6162636465666768, %r10 movq %r10, %xmm0 movups %xmm0, (%r15) nop nop nop nop nop add %r10, %r10 lea addresses_WT_ht+0x1b6c6, %rsi lea addresses_UC_ht+0x10406, %rdi nop nop nop and %r10, %r10 mov $115, %rcx rep movsb nop nop xor %rdx, %rdx lea addresses_normal_ht+0x8e06, %rdx sub $29759, %rsi mov (%rdx), %r12w nop nop nop dec %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %rbp push %rcx push %rdi push %rsi // Faulty Load lea addresses_D+0x7e06, %rcx nop nop nop nop sub %rdi, %rdi mov (%rcx), %si lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'AVXalign': True, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 1, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 5, 'same': True, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'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 */
mips/22-1.asm
ping58972/Computer-Organization-Architecture
0
171856
## MIPS Assignment #3 ## Ch22-1.asm ## program Miles per Gallon. repeatedly prompts the user for the number of miles traveled and the gallons of gasoline consumed, and then prints out the miles per gallon. Exit when the user enters 0. .data M_prompt: .asciiz "(If want to exit, enter 0)\nEnter the number of miles: " G_prompt: .asciiz "Enter the number of gallons: " E_prompt: .asciiz "\nYou've already Exit the program!\n" R_prompt: .asciiz "You've traveled: " mpp: .asciiz " mile per gallon.\n\n" .text .globl main main: li $v0, 4 # print prompt for entering miles la $a0, M_prompt syscall li $v0, 5 # wait user enter number for miles syscall beq $v0, $0, done # If user enter 0, end program nop or $t1, $0, $v0 # put data of mile to $t1 li $v0, 4 # print prompt for entering gallons la $a0, G_prompt syscall li $v0, 5 # wait user enter number for gallons syscall beq $v0, $0, done # If user enter 0, end program nop or $t2, $0, $v0 # put data of gallon to $t2 li $v0, 4 # print prompt for showing result la $a0, R_prompt syscall divu $t1, $t2 # miles / gallons -> $a0 mflo $a0 li $v0, 1 # print the integers of result of devision syscall li $v0, 4 la $a0, mpp syscall j main # Loop until user entering zero number. done: li $v0, 4 # When exit the program print the exit prompt. la $a0, E_prompt syscall li $v0, 10 # Exit the program. syscall
oeis/143/A143198.asm
neoneye/loda-programs
11
240204
<reponame>neoneye/loda-programs<filename>oeis/143/A143198.asm<gh_stars>10-100 ; A143198: Triangle t(n,m) = n +(n+1)*(m-1)*(m+2)/2 read by rows, 0<=m<=n. ; Submitted by <NAME> ; -1,-1,1,-1,2,8,-1,3,11,23,-1,4,14,29,49,-1,5,17,35,59,89,-1,6,20,41,69,104,146,-1,7,23,47,79,119,167,223,-1,8,26,53,89,134,188,251,323,-1,9,29,59,99,149,209,279,359,449,-1,10,32,65,109,164,230,307,395,494,604 lpb $0 add $1,1 sub $0,$1 lpe add $0,1 bin $0,2 add $1,1 mul $1,$0 sub $1,1 mov $0,$1
tools/files/applib/src/32bit/depacks.asm
nehalem501/gendev
2,662
22088
;; ;; aPLib compression library - the smaller the better :) ;; ;; fasm safe assembler depacker ;; ;; Copyright (c) 1998-2014 <NAME> ;; All Rights Reserved ;; ;; http://www.ibsensoftware.com/ ;; format MS COFF public aP_depack_asm_safe as '_aP_depack_asm_safe' ; ============================================================= macro getbitM { local .stillbitsleft add dl, dl jnz .stillbitsleft sub dword [esp + 4], 1 ; read one byte from source jc return_error ; mov dl, [esi] inc esi add dl, dl inc dl .stillbitsleft: } macro domatchM reg { push ecx mov ecx, [esp + 12 + _dlen$] ; ecx = dstlen sub ecx, [esp + 4] ; ecx = num written cmp reg, ecx pop ecx ja return_error sub [esp], ecx ; write ecx bytes to destination jc return_error ; push esi mov esi, edi sub esi, reg rep movsb pop esi } macro getgammaM reg { local .getmore mov reg, 1 .getmore: getbitM adc reg, reg jc return_error getbitM jc .getmore } ; ============================================================= section '.text' code readable executable aP_depack_asm_safe: ; aP_depack_asm_safe(const void *source, ; unsigned int srclen, ; void *destination, ; unsigned int dstlen) _ret$ equ 7*4 _src$ equ 8*4 + 4 _slen$ equ 8*4 + 8 _dst$ equ 8*4 + 12 _dlen$ equ 8*4 + 16 pushad mov esi, [esp + _src$] ; C calling convention mov eax, [esp + _slen$] mov edi, [esp + _dst$] mov ecx, [esp + _dlen$] push eax push ecx test esi, esi jz return_error test edi, edi jz return_error or ebp, -1 cld xor edx, edx literal: sub dword [esp + 4], 1 ; read one byte from source jc return_error ; mov al, [esi] add esi, 1 sub dword [esp], 1 ; write one byte to destination jc return_error ; mov [edi], al add edi, 1 mov ebx, 2 nexttag: getbitM jnc literal getbitM jnc codepair xor eax, eax getbitM jnc shortmatch getbitM adc eax, eax getbitM adc eax, eax getbitM adc eax, eax getbitM adc eax, eax jz .thewrite mov ebx, [esp + 8 + _dlen$] ; ebx = dstlen sub ebx, [esp] ; ebx = num written cmp eax, ebx ja return_error mov ebx, edi sub ebx, eax mov al, [ebx] .thewrite: sub dword [esp], 1 ; write one byte to destination jc return_error ; mov [edi], al inc edi mov ebx, 2 jmp nexttag codepair: getgammaM eax sub eax, ebx mov ebx, 1 jnz normalcodepair getgammaM ecx domatchM ebp jmp nexttag normalcodepair: dec eax test eax, 0xff000000 jnz return_error shl eax, 8 sub dword [esp + 4], 1 ; read one byte from source jc return_error ; mov al, [esi] inc esi mov ebp, eax getgammaM ecx cmp eax, 32000 sbb ecx, -1 cmp eax, 1280 sbb ecx, -1 cmp eax, 128 adc ecx, 0 cmp eax, 128 adc ecx, 0 domatchM eax jmp nexttag shortmatch: sub dword [esp + 4], 1 ; read one byte from source jc return_error ; mov al, [esi] inc esi xor ecx, ecx db 0c0h, 0e8h, 001h jz donedepacking adc ecx, 2 mov ebp, eax domatchM eax mov ebx, 1 jmp nexttag return_error: add esp, 8 popad or eax, -1 ; return APLIB_ERROR in eax ret donedepacking: add esp, 8 sub edi, [esp + _dst$] mov [esp + _ret$], edi ; return unpacked length in eax popad ret ; =============================================================
crti.asm
foliagecanine/libc-tritium
0
95216
<reponame>foliagecanine/libc-tritium<filename>crti.asm section init global _init _init: push ebp mov ebp, esp section fini global _fini fini: push ebp mov ebp, esp
src/firmware/Platform/GeneralPurposeRegisters.asm
pete-restall/Cluck2Sesame-Prototype
1
4466
<gh_stars>1-10 #include "Platform.inc" radix decimal GeneralPurposeRegistersRam udata global RA global RAA global RAB global RAC global RAD global RB global RBA global RBB global RBC global RBD global RZ global RZA global RZB RA: RAA res 1 RAB res 1 RAC res 1 RAD res 1 RB: RBA res 1 RBB res 1 RBC res 1 RBD res 1 RZ: RZA res 1 RZB res 1 end
test/Compiler/simple/Parse.agda
xekoukou/agda-ocaml
7
12818
module Parse where open import Common.Unit open import Common.Char open import Common.String open import Common.List open import Common.IO parse : List String → List Char → String parse (e ∷ []) [] = "ha" parse (e ∷ []) (')' ∷ xs) = "ho" parse (e ∷ es) (a ∷ xs) = parse (e ∷ es) xs parse _ _ = "hi" parseRegExp : String parseRegExp = parse ("ff" ∷ []) ('a' ∷ []) main : _ main = do let w = parseRegExp putStrLn w
Univalence/Pifextensional.agda
JacquesCarette/pi-dual
14
287
{-# OPTIONS --without-K #-} module Pifextensional where open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; cong₂; module ≡-Reasoning) open ≡-Reasoning open import Data.Empty using (⊥) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_×_; _,_) open import Groupoid ------------------------------------------------------------------------------ -- Level 0: -- ZERO is a type with no elements -- ONE is a type with one element 'tt' -- PLUS ONE ONE is a type with elements 'false' and 'true' -- and so on for all finite types built from ZERO, ONE, PLUS, and TIMES -- -- We also have that U is a type with elements ZERO, ONE, PLUS ONE ONE, -- TIMES BOOL BOOL, etc. data U : Set where ZERO : U ONE : U PLUS : U → U → U TIMES : U → U → U ⟦_⟧ : U → Set ⟦ ZERO ⟧ = ⊥ ⟦ ONE ⟧ = ⊤ ⟦ PLUS t₁ t₂ ⟧ = ⟦ t₁ ⟧ ⊎ ⟦ t₂ ⟧ ⟦ TIMES t₁ t₂ ⟧ = ⟦ t₁ ⟧ × ⟦ t₂ ⟧ -- Abbreviations for examples BOOL BOOL² : U BOOL = PLUS ONE ONE BOOL² = TIMES BOOL BOOL false⟷ true⟷ : ⟦ BOOL ⟧ false⟷ = inj₁ tt true⟷ = inj₂ tt -- For any finite type (t : U) there is no non-trivial path structure -- between the elements of t. All such finite types are discrete -- groupoids -- -- For U, there are non-trivial paths between its points. In the -- conventional HoTT presentation, a path between t₁ and t₂ is -- postulated by univalence for each equivalence between t₁ and t₂. In -- the context of finite types, an equivalence corresponds to a -- permutation as each permutation has a unique inverse -- permutation. Thus instead of the detour using univalence, we can -- give an inductive definition of all possible permutations between -- finite types which naturally induces paths between the points. More -- precisely, two types t₁ and t₂ have a path between them if there is -- a permutation (c : t₁ ⟷ t₂). The fact that c is a permutation -- guarantees, by construction, that (c ◎ ! c ∼ id⟷) and (! c ◎ c ∼ -- id⟷). A complete set of generators for all possible permutations -- between finite types is given by the following definition. Note -- that these permutations do not reach inside the types and hence do -- not generate paths between the points within the types. The paths -- are just between the types themselves. infix 30 _⟷_ infixr 50 _◎_ data _⟷_ : U → U → Set where unite₊ : {t : U} → PLUS ZERO t ⟷ t uniti₊ : {t : U} → t ⟷ PLUS ZERO t swap₊ : {t₁ t₂ : U} → PLUS t₁ t₂ ⟷ PLUS t₂ t₁ assocl₊ : {t₁ t₂ t₃ : U} → PLUS t₁ (PLUS t₂ t₃) ⟷ PLUS (PLUS t₁ t₂) t₃ assocr₊ : {t₁ t₂ t₃ : U} → PLUS (PLUS t₁ t₂) t₃ ⟷ PLUS t₁ (PLUS t₂ t₃) unite⋆ : {t : U} → TIMES ONE t ⟷ t uniti⋆ : {t : U} → t ⟷ TIMES ONE t swap⋆ : {t₁ t₂ : U} → TIMES t₁ t₂ ⟷ TIMES t₂ t₁ assocl⋆ : {t₁ t₂ t₃ : U} → TIMES t₁ (TIMES t₂ t₃) ⟷ TIMES (TIMES t₁ t₂) t₃ assocr⋆ : {t₁ t₂ t₃ : U} → TIMES (TIMES t₁ t₂) t₃ ⟷ TIMES t₁ (TIMES t₂ t₃) distz : {t : U} → TIMES ZERO t ⟷ ZERO factorz : {t : U} → ZERO ⟷ TIMES ZERO t dist : {t₁ t₂ t₃ : U} → TIMES (PLUS t₁ t₂) t₃ ⟷ PLUS (TIMES t₁ t₃) (TIMES t₂ t₃) factor : {t₁ t₂ t₃ : U} → PLUS (TIMES t₁ t₃) (TIMES t₂ t₃) ⟷ TIMES (PLUS t₁ t₂) t₃ id⟷ : {t : U} → t ⟷ t _◎_ : {t₁ t₂ t₃ : U} → (t₁ ⟷ t₂) → (t₂ ⟷ t₃) → (t₁ ⟷ t₃) _⊕_ : {t₁ t₂ t₃ t₄ : U} → (t₁ ⟷ t₃) → (t₂ ⟷ t₄) → (PLUS t₁ t₂ ⟷ PLUS t₃ t₄) _⊗_ : {t₁ t₂ t₃ t₄ : U} → (t₁ ⟷ t₃) → (t₂ ⟷ t₄) → (TIMES t₁ t₂ ⟷ TIMES t₃ t₄) -- Nicer syntax that shows intermediate values instead of the above -- point-free notation of permutations infixr 2 _⟷⟨_⟩_ infix 2 _□ _⟷⟨_⟩_ : (t₁ : U) {t₂ : U} {t₃ : U} → (t₁ ⟷ t₂) → (t₂ ⟷ t₃) → (t₁ ⟷ t₃) _ ⟷⟨ α ⟩ β = α ◎ β _□ : (t : U) → {t : U} → (t ⟷ t) _□ t = id⟷ -- Many ways of negating a BOOL. Again, it is absolutely critical that there -- is NO path between false⟷ and true⟷. These permutations instead are based -- on paths between x and neg (neg x) which are the trivial paths on each of -- the two points in BOOL. neg₁ neg₂ neg₃ neg₄ neg₅ : BOOL ⟷ BOOL neg₁ = swap₊ neg₂ = id⟷ ◎ swap₊ neg₃ = swap₊ ◎ swap₊ ◎ swap₊ neg₄ = swap₊ ◎ id⟷ neg₅ = uniti⋆ ◎ swap⋆ ◎ (swap₊ ⊗ id⟷) ◎ swap⋆ ◎ unite⋆ -- CNOT CNOT : BOOL² ⟷ BOOL² CNOT = TIMES (PLUS x y) BOOL ⟷⟨ dist ⟩ PLUS (TIMES x BOOL) (TIMES y BOOL) ⟷⟨ id⟷ ⊕ (id⟷ ⊗ swap₊) ⟩ PLUS (TIMES x BOOL) (TIMES y BOOL) ⟷⟨ factor ⟩ TIMES (PLUS x y) BOOL □ where x = ONE; y = ONE -- TOFFOLI TOFFOLI : TIMES BOOL BOOL² ⟷ TIMES BOOL BOOL² TOFFOLI = TIMES (PLUS x y) BOOL² ⟷⟨ dist ⟩ PLUS (TIMES x BOOL²) (TIMES y BOOL²) ⟷⟨ id⟷ ⊕ (id⟷ ⊗ CNOT) ⟩ PLUS (TIMES x BOOL²) (TIMES y BOOL²) ⟷⟨ factor ⟩ TIMES (PLUS x y) BOOL² □ where x = ONE; y = ONE -- Every permutation has an inverse. There are actually many syntactically -- different inverses but they are all equivalent. ! : {t₁ t₂ : U} → (t₁ ⟷ t₂) → (t₂ ⟷ t₁) ! unite₊ = uniti₊ ! uniti₊ = unite₊ ! swap₊ = swap₊ ! assocl₊ = assocr₊ ! assocr₊ = assocl₊ ! unite⋆ = uniti⋆ ! uniti⋆ = unite⋆ ! swap⋆ = swap⋆ ! assocl⋆ = assocr⋆ ! assocr⋆ = assocl⋆ ! distz = factorz ! factorz = distz ! dist = factor ! factor = dist ! id⟷ = id⟷ ! (c₁ ◎ c₂) = ! c₂ ◎ ! c₁ ! (c₁ ⊕ c₂) = (! c₁) ⊕ (! c₂) ! (c₁ ⊗ c₂) = (! c₁) ⊗ (! c₂) !! : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → ! (! c) ≡ c !! {c = unite₊} = refl !! {c = uniti₊} = refl !! {c = swap₊} = refl !! {c = assocl₊} = refl !! {c = assocr₊} = refl !! {c = unite⋆} = refl !! {c = uniti⋆} = refl !! {c = swap⋆} = refl !! {c = assocl⋆} = refl !! {c = assocr⋆} = refl !! {c = distz} = refl !! {c = factorz} = refl !! {c = dist} = refl !! {c = factor} = refl !! {c = id⟷} = refl !! {c = c₁ ◎ c₂} = begin (! (! (c₁ ◎ c₂)) ≡⟨ refl ⟩ ! (! c₂ ◎ ! c₁) ≡⟨ refl ⟩ ! (! c₁) ◎ ! (! c₂) ≡⟨ cong₂ _◎_ (!! {c = c₁}) (!! {c = c₂}) ⟩ c₁ ◎ c₂ ∎) !! {c = c₁ ⊕ c₂} = begin (! (! (c₁ ⊕ c₂)) ≡⟨ refl ⟩ ! (! c₁) ⊕ ! (! c₂) ≡⟨ cong₂ _⊕_ (!! {c = c₁}) (!! {c = c₂}) ⟩ c₁ ⊕ c₂ ∎) !! {c = c₁ ⊗ c₂} = begin (! (! (c₁ ⊗ c₂)) ≡⟨ refl ⟩ ! (! c₁) ⊗ ! (! c₂) ≡⟨ cong₂ _⊗_ (!! {c = c₁}) (!! {c = c₂}) ⟩ c₁ ⊗ c₂ ∎) ------------------------------------------------------------------------------ -- Extensional view of 2paths. -- -- There is a 2path between two permutations p and q if for each x, the -- result of p(x) and q(x) are identical. -- First we define the extensional view of a permutation as a function. ap : {t₁ t₂ : U} → (t₁ ⟷ t₂) → ⟦ t₁ ⟧ → ⟦ t₂ ⟧ ap unite₊ (inj₁ ()) -- absurd ap unite₊ (inj₂ v) = v ap uniti₊ v = inj₂ v ap swap₊ (inj₁ v) = inj₂ v ap swap₊ (inj₂ v) = inj₁ v ap assocl₊ (inj₁ v) = inj₁ (inj₁ v) ap assocl₊ (inj₂ (inj₁ v)) = inj₁ (inj₂ v) ap assocl₊ (inj₂ (inj₂ v)) = inj₂ v ap assocr₊ (inj₁ (inj₁ v)) = inj₁ v ap assocr₊ (inj₁ (inj₂ v)) = inj₂ (inj₁ v) ap assocr₊ (inj₂ v) = inj₂ (inj₂ v) ap unite⋆ (tt , v) = v ap uniti⋆ v = (tt , v) ap swap⋆ (v₁ , v₂) = (v₂ , v₁) ap assocl⋆ (v₁ , (v₂ , v₃)) = ((v₁ , v₂) , v₃) ap assocr⋆ ((v₁ , v₂) , v₃) = (v₁ , (v₂ , v₃)) ap distz (() , _) -- absurd ap factorz () -- absurd ap dist (inj₁ v₁ , v₃) = inj₁ (v₁ , v₃) ap dist (inj₂ v₂ , v₃) = inj₂ (v₂ , v₃) ap factor (inj₁ (v₁ , v₃)) = (inj₁ v₁ , v₃) ap factor (inj₂ (v₂ , v₃)) = (inj₂ v₂ , v₃) ap id⟷ v = v ap (c₁ ◎ c₂) v = ap c₂ (ap c₁ v) ap (c₁ ⊕ c₂) (inj₁ v) = inj₁ (ap c₁ v) ap (c₁ ⊕ c₂) (inj₂ v) = inj₂ (ap c₂ v) ap (c₁ ⊗ c₂) (v₁ , v₂) = (ap c₁ v₁ , ap c₂ v₂) α◎!α : {t₁ t₂ : U} {α : t₁ ⟷ t₂} {v : ⟦ t₁ ⟧} → ap (α ◎ ! α) v ≡ v α◎!α {α = unite₊} {inj₁ ()} α◎!α {α = unite₊} {inj₂ v} = refl α◎!α {α = uniti₊} {v} = refl α◎!α {α = swap₊} {inj₁ v} = refl α◎!α {α = swap₊} {inj₂ v} = refl α◎!α {α = assocl₊} {inj₁ v} = refl α◎!α {α = assocl₊} {inj₂ (inj₁ v)} = refl α◎!α {α = assocl₊} {inj₂ (inj₂ v)} = refl α◎!α {α = assocr₊} {inj₁ (inj₁ v)} = refl α◎!α {α = assocr₊} {inj₁ (inj₂ v)} = refl α◎!α {α = assocr₊} {inj₂ v} = refl α◎!α {α = unite⋆} {v} = refl α◎!α {α = uniti⋆} {v} = refl α◎!α {α = swap⋆} {v} = refl α◎!α {α = assocl⋆} {v} = refl α◎!α {α = assocr⋆} {v} = refl α◎!α {α = distz} {(() , _)} α◎!α {α = factorz} {()} α◎!α {α = dist} {(inj₁ v₁ , v₂)} = refl α◎!α {α = dist} {(inj₂ v₁ , v₂)} = refl α◎!α {α = factor} {inj₁ v} = refl α◎!α {α = factor} {inj₂ v} = refl α◎!α {α = id⟷} {v} = refl α◎!α {α = α₁ ◎ α₂} {v} = begin ap ((α₁ ◎ α₂) ◎ ! (α₁ ◎ α₂)) v ≡⟨ refl ⟩ ap (! α₁) (ap (α₂ ◎ ! α₂) (ap α₁ v)) ≡⟨ cong (λ v' → ap (! α₁) v') (α◎!α {α = α₂} {v = ap α₁ v}) ⟩ ap (! α₁) (ap α₁ v) ≡⟨ α◎!α {α = α₁} {v = v} ⟩ v ∎ α◎!α {α = α₁ ⊕ α₂} {inj₁ v} = begin ap ((α₁ ⊕ α₂) ◎ ! (α₁ ⊕ α₂)) (inj₁ v) ≡⟨ refl ⟩ inj₁ (ap (! α₁) (ap α₁ v)) ≡⟨ cong inj₁ (α◎!α {α = α₁} {v}) ⟩ inj₁ v ∎ α◎!α {α = α₁ ⊕ α₂} {inj₂ v} = begin ap ((α₁ ⊕ α₂) ◎ ! (α₁ ⊕ α₂)) (inj₂ v) ≡⟨ refl ⟩ inj₂ (ap (! α₂) (ap α₂ v)) ≡⟨ cong inj₂ (α◎!α {α = α₂} {v}) ⟩ inj₂ v ∎ α◎!α {α = α₁ ⊗ α₂} {(v₁ , v₂)} = begin ap ((α₁ ⊗ α₂) ◎ ! (α₁ ⊗ α₂)) (v₁ , v₂) ≡⟨ refl ⟩ (ap (! α₁) (ap α₁ v₁) , ap (! α₂) (ap α₂ v₂)) ≡⟨ cong₂ (_,_) (α◎!α {α = α₁} {v = v₁}) (α◎!α {α = α₂} {v = v₂}) ⟩ (v₁ , v₂) ∎ !α◎α : {t₁ t₂ : U} {α : t₁ ⟷ t₂} {v : ⟦ t₂ ⟧} → ap (! α ◎ α) v ≡ v !α◎α {α = unite₊} {v} = refl !α◎α {α = uniti₊} {inj₁ ()} !α◎α {α = uniti₊} {inj₂ v} = refl !α◎α {α = swap₊} {inj₁ v} = refl !α◎α {α = swap₊} {inj₂ v} = refl !α◎α {α = assocl₊} {inj₁ (inj₁ v)} = refl !α◎α {α = assocl₊} {inj₁ (inj₂ v)} = refl !α◎α {α = assocl₊} {inj₂ v} = refl !α◎α {α = assocr₊} {inj₁ v} = refl !α◎α {α = assocr₊} {inj₂ (inj₁ v)} = refl !α◎α {α = assocr₊} {inj₂ (inj₂ v)} = refl !α◎α {α = unite⋆} {v} = refl !α◎α {α = uniti⋆} {v} = refl !α◎α {α = swap⋆} {v} = refl !α◎α {α = assocl⋆} {v} = refl !α◎α {α = assocr⋆} {v} = refl !α◎α {α = distz} {()} !α◎α {α = factorz} {(() , _)} !α◎α {α = dist} {inj₁ v} = refl !α◎α {α = dist} {inj₂ v} = refl !α◎α {α = factor} {(inj₁ v₁ , v₂)} = refl !α◎α {α = factor} {(inj₂ v₁ , v₂)} = refl !α◎α {α = id⟷} {v} = refl !α◎α {α = α₁ ◎ α₂} {v} = begin ap (! (α₁ ◎ α₂) ◎ (α₁ ◎ α₂)) v ≡⟨ refl ⟩ ap α₂ (ap (! α₁ ◎ α₁) (ap (! α₂) v)) ≡⟨ cong (λ v' → ap α₂ v') (!α◎α {α = α₁} {v = ap (! α₂) v}) ⟩ ap α₂ (ap (! α₂) v) ≡⟨ !α◎α {α = α₂} {v = v} ⟩ v ∎ !α◎α {α = α₁ ⊕ α₂} {inj₁ v} = begin ap (! (α₁ ⊕ α₂) ◎ (α₁ ⊕ α₂)) (inj₁ v) ≡⟨ refl ⟩ inj₁ (ap α₁ (ap (! α₁) v)) ≡⟨ cong inj₁ (!α◎α {α = α₁} {v}) ⟩ inj₁ v ∎ !α◎α {α = α₁ ⊕ α₂} {inj₂ v} = begin ap (! (α₁ ⊕ α₂) ◎ (α₁ ⊕ α₂)) (inj₂ v) ≡⟨ refl ⟩ inj₂ (ap α₂ (ap (! α₂) v)) ≡⟨ cong inj₂ (!α◎α {α = α₂} {v}) ⟩ inj₂ v ∎ !α◎α {α = α₁ ⊗ α₂} {(v₁ , v₂)} = begin ap (! (α₁ ⊗ α₂) ◎ (α₁ ⊗ α₂)) (v₁ , v₂) ≡⟨ refl ⟩ (ap α₁ (ap (! α₁) v₁) , ap α₂ (ap (! α₂) v₂)) ≡⟨ cong₂ (_,_) (!α◎α {α = α₁} {v = v₁}) (!α◎α {α = α₂} {v = v₂}) ⟩ (v₁ , v₂) ∎ -- Two permutations, viewed extensionally, are equivalent if they map -- each value x to the same value. Generally we would only require -- that the resulting values y and z have a path between them, but -- because the internals of each type are discrete groupoids, this -- reduces to saying that y and z are identical. infix 10 _∼_ _∼_ : ∀ {t₁ t₂} → (p q : t₁ ⟷ t₂) → Set _∼_ {t₁} {t₂} p q = (x : ⟦ t₁ ⟧) → ap p x ≡ ap q x α◎!α∼id⟷ : {t₁ t₂ : U} {α : t₁ ⟷ t₂} → α ◎ ! α ∼ id⟷ α◎!α∼id⟷ {α = α} v = α◎!α {α = α} {v} !α◎α∼id⟷ : {t₁ t₂ : U} {α : t₁ ⟷ t₂} → ! α ◎ α ∼ id⟷ !α◎α∼id⟷ {t₁} {t₂} {α} v = !α◎α {α = α} {v} resp◎ : {t₁ t₂ t₃ : U} {p q : t₁ ⟷ t₂} {r s : t₂ ⟷ t₃} → (α : p ∼ q) → (β : r ∼ s) → (p ◎ r) ∼ (q ◎ s) resp◎ {t₁} {t₂} {t₃} {p} {q} {r} {s} α β v = begin ap (p ◎ r) v ≡⟨ refl ⟩ ap r (ap p v) ≡⟨ cong (λ v → ap r v) (α v) ⟩ ap r (ap q v) ≡⟨ β (ap q v) ⟩ ap (q ◎ s) v ∎ -- Because we representing combinators semantically as functions (not as -- permutations), we have to use function extensionality to compare the -- semantic representation. This need to be changed by making use of a proper -- representation of permutations instead of plain functions. postulate funExtP : {A B : Set} {f g : A → B} → ((x : A) → f x ≡ g x) → (f ≡ g) -- Two extensionally equivalent combinators are semantically -- equivalent. Again, if we had a proper representation of permutations, this -- would reduce to comparing the two representations without involving -- function extensionality. ext2id : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ∼ c₂) → ap c₁ ≡ ap c₂ ext2id {t₁} {t₂} {c₁} {c₂} c₁∼c₂ = funExtP {⟦ t₁ ⟧} {⟦ t₂ ⟧} {ap c₁} {ap c₂} c₁∼c₂ -- The equivalence ∼ of paths makes U a 1groupoid: the points are -- types (t : U); the 1paths are ⟷; and the 2paths between them are -- based on extensional equivalence ∼ G : 1Groupoid G = record { set = U ; _↝_ = _⟷_ ; _≈_ = _∼_ ; id = id⟷ ; _∘_ = λ p q → q ◎ p ; _⁻¹ = ! ; lneutr = λ _ _ → refl ; rneutr = λ _ _ → refl ; assoc = λ _ _ _ _ → refl ; equiv = record { refl = λ _ → refl ; sym = λ α x → sym (α x) ; trans = λ α β x → trans (α x) (β x) } ; linv = λ {t₁} {t₂} α → α◎!α∼id⟷ {t₁} {t₂} {α} ; rinv = λ {t₁} {t₂} α → !α◎α∼id⟷ {t₁} {t₂} {α} ; ∘-resp-≈ = λ {t₁} {t₂} {t₃} {p} {q} {r} {s} p∼q r∼s → resp◎ {t₁} {t₂} {t₃} {r} {s} {p} {q} r∼s p∼q } ------------------------------------------------------------------------------ -- Picture so far: -- -- path p -- ===================== -- || || || -- || ||2path || -- || || || -- || || path q || -- t₁ =================t₂ -- || ... || -- ===================== -- -- The types t₁, t₂, etc are discrete groupoids. The paths between -- them correspond to permutations. Each syntactically different -- permutation corresponds to a path but equivalent permutations are -- connected by 2paths. But now we want an alternative definition of -- 2paths that is structural, i.e., that looks at the actual -- construction of the path t₁ ⟷ t₂ in terms of combinators... The -- theorem we want is that α ∼ β iff we can rewrite α to β using -- various syntactic structural rules. We start with a collection of -- simplication rules and then try to show they are complete. -- Simplification rules infix 30 _⇔_ data _⇔_ : {t₁ t₂ : U} → (t₁ ⟷ t₂) → (t₁ ⟷ t₂) → Set where assoc◎l : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₂ ⟷ t₃} {c₃ : t₃ ⟷ t₄} → (c₁ ◎ (c₂ ◎ c₃)) ⇔ ((c₁ ◎ c₂) ◎ c₃) assoc◎r : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₂ ⟷ t₃} {c₃ : t₃ ⟷ t₄} → ((c₁ ◎ c₂) ◎ c₃) ⇔ (c₁ ◎ (c₂ ◎ c₃)) assoc⊕l : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → (c₁ ⊕ (c₂ ⊕ c₃)) ⇔ (assocl₊ ◎ ((c₁ ⊕ c₂) ⊕ c₃) ◎ assocr₊) assoc⊕r : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → (assocl₊ ◎ ((c₁ ⊕ c₂) ⊕ c₃) ◎ assocr₊) ⇔ (c₁ ⊕ (c₂ ⊕ c₃)) assoc⊗l : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → (c₁ ⊗ (c₂ ⊗ c₃)) ⇔ (assocl⋆ ◎ ((c₁ ⊗ c₂) ⊗ c₃) ◎ assocr⋆) assoc⊗r : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → (assocl⋆ ◎ ((c₁ ⊗ c₂) ⊗ c₃) ◎ assocr⋆) ⇔ (c₁ ⊗ (c₂ ⊗ c₃)) dist⇔ : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → ((c₁ ⊕ c₂) ⊗ c₃) ⇔ (dist ◎ ((c₁ ⊗ c₃) ⊕ (c₂ ⊗ c₃)) ◎ factor) factor⇔ : {t₁ t₂ t₃ t₄ t₅ t₆ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₅ ⟷ t₆} → (dist ◎ ((c₁ ⊗ c₃) ⊕ (c₂ ⊗ c₃)) ◎ factor) ⇔ ((c₁ ⊕ c₂) ⊗ c₃) idl◎l : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → (id⟷ ◎ c) ⇔ c idl◎r : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → c ⇔ id⟷ ◎ c idr◎l : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → (c ◎ id⟷) ⇔ c idr◎r : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → c ⇔ (c ◎ id⟷) linv◎l : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → (c ◎ ! c) ⇔ id⟷ linv◎r : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → id⟷ ⇔ (c ◎ ! c) rinv◎l : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → (! c ◎ c) ⇔ id⟷ rinv◎r : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → id⟷ ⇔ (! c ◎ c) unitel₊⇔ : {t₁ t₂ : U} {c₁ : ZERO ⟷ ZERO} {c₂ : t₁ ⟷ t₂} → (unite₊ ◎ c₂) ⇔ ((c₁ ⊕ c₂) ◎ unite₊) uniter₊⇔ : {t₁ t₂ : U} {c₁ : ZERO ⟷ ZERO} {c₂ : t₁ ⟷ t₂} → ((c₁ ⊕ c₂) ◎ unite₊) ⇔ (unite₊ ◎ c₂) unitil₊⇔ : {t₁ t₂ : U} {c₁ : ZERO ⟷ ZERO} {c₂ : t₁ ⟷ t₂} → (uniti₊ ◎ (c₁ ⊕ c₂)) ⇔ (c₂ ◎ uniti₊) unitir₊⇔ : {t₁ t₂ : U} {c₁ : ZERO ⟷ ZERO} {c₂ : t₁ ⟷ t₂} → (c₂ ◎ uniti₊) ⇔ (uniti₊ ◎ (c₁ ⊕ c₂)) unitial₊⇔ : {t₁ t₂ : U} → (uniti₊ {PLUS t₁ t₂} ◎ assocl₊) ⇔ (uniti₊ ⊕ id⟷) unitiar₊⇔ : {t₁ t₂ : U} → (uniti₊ {t₁} ⊕ id⟷ {t₂}) ⇔ (uniti₊ ◎ assocl₊) swapl₊⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} → (swap₊ ◎ (c₁ ⊕ c₂)) ⇔ ((c₂ ⊕ c₁) ◎ swap₊) swapr₊⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} → ((c₂ ⊕ c₁) ◎ swap₊) ⇔ (swap₊ ◎ (c₁ ⊕ c₂)) unitel⋆⇔ : {t₁ t₂ : U} {c₁ : ONE ⟷ ONE} {c₂ : t₁ ⟷ t₂} → (unite⋆ ◎ c₂) ⇔ ((c₁ ⊗ c₂) ◎ unite⋆) uniter⋆⇔ : {t₁ t₂ : U} {c₁ : ONE ⟷ ONE} {c₂ : t₁ ⟷ t₂} → ((c₁ ⊗ c₂) ◎ unite⋆) ⇔ (unite⋆ ◎ c₂) unitil⋆⇔ : {t₁ t₂ : U} {c₁ : ONE ⟷ ONE} {c₂ : t₁ ⟷ t₂} → (uniti⋆ ◎ (c₁ ⊗ c₂)) ⇔ (c₂ ◎ uniti⋆) unitir⋆⇔ : {t₁ t₂ : U} {c₁ : ONE ⟷ ONE} {c₂ : t₁ ⟷ t₂} → (c₂ ◎ uniti⋆) ⇔ (uniti⋆ ◎ (c₁ ⊗ c₂)) unitial⋆⇔ : {t₁ t₂ : U} → (uniti⋆ {TIMES t₁ t₂} ◎ assocl⋆) ⇔ (uniti⋆ ⊗ id⟷) unitiar⋆⇔ : {t₁ t₂ : U} → (uniti⋆ {t₁} ⊗ id⟷ {t₂}) ⇔ (uniti⋆ ◎ assocl⋆) swapl⋆⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} → (swap⋆ ◎ (c₁ ⊗ c₂)) ⇔ ((c₂ ⊗ c₁) ◎ swap⋆) swapr⋆⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} → ((c₂ ⊗ c₁) ◎ swap⋆) ⇔ (swap⋆ ◎ (c₁ ⊗ c₂)) swapfl⋆⇔ : {t₁ t₂ t₃ : U} → (swap₊ {TIMES t₂ t₃} {TIMES t₁ t₃} ◎ factor) ⇔ (factor ◎ (swap₊ {t₂} {t₁} ⊗ id⟷)) swapfr⋆⇔ : {t₁ t₂ t₃ : U} → (factor ◎ (swap₊ {t₂} {t₁} ⊗ id⟷)) ⇔ (swap₊ {TIMES t₂ t₃} {TIMES t₁ t₃} ◎ factor) id⇔ : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → c ⇔ c trans⇔ : {t₁ t₂ : U} {c₁ c₂ c₃ : t₁ ⟷ t₂} → (c₁ ⇔ c₂) → (c₂ ⇔ c₃) → (c₁ ⇔ c₃) resp◎⇔ : {t₁ t₂ t₃ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₂ ⟷ t₃} {c₃ : t₁ ⟷ t₂} {c₄ : t₂ ⟷ t₃} → (c₁ ⇔ c₃) → (c₂ ⇔ c₄) → (c₁ ◎ c₂) ⇔ (c₃ ◎ c₄) resp⊕⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₁ ⟷ t₂} {c₄ : t₃ ⟷ t₄} → (c₁ ⇔ c₃) → (c₂ ⇔ c₄) → (c₁ ⊕ c₂) ⇔ (c₃ ⊕ c₄) resp⊗⇔ : {t₁ t₂ t₃ t₄ : U} {c₁ : t₁ ⟷ t₂} {c₂ : t₃ ⟷ t₄} {c₃ : t₁ ⟷ t₂} {c₄ : t₃ ⟷ t₄} → (c₁ ⇔ c₃) → (c₂ ⇔ c₄) → (c₁ ⊗ c₂) ⇔ (c₃ ⊗ c₄) -- better syntax for writing 2paths infix 2 _▤ infixr 2 _⇔⟨_⟩_ _⇔⟨_⟩_ : {t₁ t₂ : U} (c₁ : t₁ ⟷ t₂) {c₂ : t₁ ⟷ t₂} {c₃ : t₁ ⟷ t₂} → (c₁ ⇔ c₂) → (c₂ ⇔ c₃) → (c₁ ⇔ c₃) _ ⇔⟨ α ⟩ β = trans⇔ α β _▤ : {t₁ t₂ : U} → (c : t₁ ⟷ t₂) → (c ⇔ c) _▤ c = id⇔ -- Inverses for 2paths 2! : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ⇔ c₂) → (c₂ ⇔ c₁) 2! assoc◎l = assoc◎r 2! assoc◎r = assoc◎l 2! assoc⊕l = assoc⊕r 2! assoc⊕r = assoc⊕l 2! assoc⊗l = assoc⊗r 2! assoc⊗r = assoc⊗l 2! dist⇔ = factor⇔ 2! factor⇔ = dist⇔ 2! idl◎l = idl◎r 2! idl◎r = idl◎l 2! idr◎l = idr◎r 2! idr◎r = idr◎l 2! linv◎l = linv◎r 2! linv◎r = linv◎l 2! rinv◎l = rinv◎r 2! rinv◎r = rinv◎l 2! unitel₊⇔ = uniter₊⇔ 2! uniter₊⇔ = unitel₊⇔ 2! unitil₊⇔ = unitir₊⇔ 2! unitir₊⇔ = unitil₊⇔ 2! swapl₊⇔ = swapr₊⇔ 2! swapr₊⇔ = swapl₊⇔ 2! unitial₊⇔ = unitiar₊⇔ 2! unitiar₊⇔ = unitial₊⇔ 2! unitel⋆⇔ = uniter⋆⇔ 2! uniter⋆⇔ = unitel⋆⇔ 2! unitil⋆⇔ = unitir⋆⇔ 2! unitir⋆⇔ = unitil⋆⇔ 2! unitial⋆⇔ = unitiar⋆⇔ 2! unitiar⋆⇔ = unitial⋆⇔ 2! swapl⋆⇔ = swapr⋆⇔ 2! swapr⋆⇔ = swapl⋆⇔ 2! swapfl⋆⇔ = swapfr⋆⇔ 2! swapfr⋆⇔ = swapfl⋆⇔ 2! id⇔ = id⇔ 2! (trans⇔ α β) = trans⇔ (2! β) (2! α) 2! (resp◎⇔ α β) = resp◎⇔ (2! α) (2! β) 2! (resp⊕⇔ α β) = resp⊕⇔ (2! α) (2! β) 2! (resp⊗⇔ α β) = resp⊗⇔ (2! α) (2! β) -- a nice example of 2 paths negEx : neg₅ ⇔ neg₁ negEx = uniti⋆ ◎ (swap⋆ ◎ ((swap₊ ⊗ id⟷) ◎ (swap⋆ ◎ unite⋆))) ⇔⟨ resp◎⇔ id⇔ assoc◎l ⟩ uniti⋆ ◎ ((swap⋆ ◎ (swap₊ ⊗ id⟷)) ◎ (swap⋆ ◎ unite⋆)) ⇔⟨ resp◎⇔ id⇔ (resp◎⇔ swapl⋆⇔ id⇔) ⟩ uniti⋆ ◎ (((id⟷ ⊗ swap₊) ◎ swap⋆) ◎ (swap⋆ ◎ unite⋆)) ⇔⟨ resp◎⇔ id⇔ assoc◎r ⟩ uniti⋆ ◎ ((id⟷ ⊗ swap₊) ◎ (swap⋆ ◎ (swap⋆ ◎ unite⋆))) ⇔⟨ resp◎⇔ id⇔ (resp◎⇔ id⇔ assoc◎l) ⟩ uniti⋆ ◎ ((id⟷ ⊗ swap₊) ◎ ((swap⋆ ◎ swap⋆) ◎ unite⋆)) ⇔⟨ resp◎⇔ id⇔ (resp◎⇔ id⇔ (resp◎⇔ linv◎l id⇔)) ⟩ uniti⋆ ◎ ((id⟷ ⊗ swap₊) ◎ (id⟷ ◎ unite⋆)) ⇔⟨ resp◎⇔ id⇔ (resp◎⇔ id⇔ idl◎l) ⟩ uniti⋆ ◎ ((id⟷ ⊗ swap₊) ◎ unite⋆) ⇔⟨ assoc◎l ⟩ (uniti⋆ ◎ (id⟷ ⊗ swap₊)) ◎ unite⋆ ⇔⟨ resp◎⇔ unitil⋆⇔ id⇔ ⟩ (swap₊ ◎ uniti⋆) ◎ unite⋆ ⇔⟨ assoc◎r ⟩ swap₊ ◎ (uniti⋆ ◎ unite⋆) ⇔⟨ resp◎⇔ id⇔ linv◎l ⟩ swap₊ ◎ id⟷ ⇔⟨ idr◎l ⟩ swap₊ ▤ -- The equivalence ⇔ of paths is rich enough to make U a 1groupoid: -- the points are types (t : U); the 1paths are ⟷; and the 2paths -- between them are based on the simplification rules ⇔ G' : 1Groupoid G' = record { set = U ; _↝_ = _⟷_ ; _≈_ = _⇔_ ; id = id⟷ ; _∘_ = λ p q → q ◎ p ; _⁻¹ = ! ; lneutr = λ _ → idr◎l ; rneutr = λ _ → idl◎l ; assoc = λ _ _ _ → assoc◎l ; equiv = record { refl = id⇔ ; sym = 2! ; trans = trans⇔ } ; linv = λ {t₁} {t₂} α → linv◎l ; rinv = λ {t₁} {t₂} α → rinv◎l ; ∘-resp-≈ = λ p∼q r∼s → resp◎⇔ r∼s p∼q } ------------------------------------------------------------------------------ -- Soundness and completeness -- -- Proof of soundness and completeness: now we want to verify that ⇔ -- is sound and complete with respect to ∼. The statement to prove is -- that for all c₁ and c₂, we have c₁ ∼ c₂ iff c₁ ⇔ c₂ postulate -- to do eventually but should be fairly easy soundnessP : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ⇔ c₂) → (c₁ ∼ c₂) -- postulate -- proved below -- completenessP : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ∼ c₂) → (c₁ ⇔ c₂) -- The idea is to invert evaluation and use that to extract from each -- extensional representation of a combinator, a canonical syntactic -- representative postulate invertP : {t₁ t₂ : U} → (⟦ t₁ ⟧ → ⟦ t₂ ⟧) → (t₁ ⟷ t₂) canonical : {t₁ t₂ : U} → (t₁ ⟷ t₂) → (t₁ ⟷ t₂) canonical c = invertP (ap c) -- Note that if c₁ ⇔ c₂, then by soundness c₁ ∼ c₂ and hence their -- canonical representatives are identical. canonicalWellDefined : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ⇔ c₂) → (canonical c₁ ≡ canonical c₂) canonicalWellDefined {t₁} {t₂} {c₁} {c₂} α = cong invertP (ext2id {t₁} {t₂} {c₁} {c₂} (soundnessP α)) -- If we can prove that every combinator is equal to its normal form -- then we can prove completeness. postulate inversionP : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → c ⇔ canonical c resp≡⇔ : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ≡ c₂) → (c₁ ⇔ c₂) resp≡⇔ {t₁} {t₂} {c₁} {c₂} p rewrite p = id⇔ completeness : {t₁ t₂ : U} {c₁ c₂ : t₁ ⟷ t₂} → (c₁ ∼ c₂) → (c₁ ⇔ c₂) completeness {t₁} {t₂} {c₁} {c₂} c₁∼c₂ = c₁ ⇔⟨ inversionP ⟩ canonical c₁ ⇔⟨ resp≡⇔ (cong invertP (ext2id {t₁} {t₂} {c₁} {c₂} c₁∼c₂)) ⟩ canonical c₂ ⇔⟨ 2! inversionP ⟩ c₂ ▤ -- To summarize, completeness can be proved if we can define the following -- two functions: -- -- * a function that extracts a canonical combinator out of the -- semantic representation of a permutation: -- invertP : {t₁ t₂ : U} → (⟦ t₁ ⟧ → ⟦ t₂ ⟧) → (t₁ ⟷ t₂) -- * a function that proves that every combinator can be rewritten to this -- canonical form: -- inversionP : {t₁ t₂ : U} {c : t₁ ⟷ t₂} → c ⇔ canonical c -- -- This all uses function extensionality. It is possible to get rid of -- that if we use an accurate representation of permutations. ------------------------------------------------------------------------------
programs/oeis/005/A005861.asm
jmorken/loda
1
22209
; A005861: The coding-theoretic function A(n,14,9). ; 1,1,1,1,1,1,1,2,2,2,2,2,3,3,3,4,5,6,6,7 mul $0,2 mov $2,$0 sub $2,1 sub $3,$0 mov $4,$0 lpb $4 sub $0,$2 sub $4,9 lpe sub $0,3 lpb $0 lpb $0 div $0,6 add $3,$2 mov $2,$0 div $3,2 lpe sub $1,$3 lpe add $1,1
Cubical/Data/Bool/SwitchStatement.agda
dan-iel-lee/cubical
0
11306
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Bool.SwitchStatement where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Data.Bool.Base open import Cubical.Data.Nat {- Switch-case: _==_ : A → A → Bool _ : B _ = switch (λ x → x == fixedValue) cases case value1 ⇒ result1 break case value2 ⇒ result2 break ... case valueN ⇒ resultN break default⇒ defaultResult -} private variable ℓ ℓ′ : Level infixr 6 default⇒_ infixr 5 case_⇒_break_ infixr 4 switch_cases_ switch_cases_ : {A : Type ℓ} {B : Type ℓ′} → (A → Bool) → ((A → Bool) → B) → B switch caseIndicator cases caseData = caseData caseIndicator case_⇒_break_ : {A : Type ℓ} {B : Type ℓ′} → A → B → (otherCases : (A → Bool) → B) → (A → Bool) → B case forValue ⇒ result break otherCases = λ caseIndicator → if (caseIndicator forValue) then result else (otherCases caseIndicator) default⇒_ : {A : Type ℓ} {B : Type ℓ′} → B → (A → Bool) → B default⇒_ value caseIndicator = value
programs/oeis/140/A140345.asm
karttu/loda
1
84501
; A140345: a(n)=a(n-1)^2-a(n-2)-a(n-3)-a(n-4), a(1)=a(2)=a(3)=a(4)=1. ; 1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2,1,1,1,1,-2 mod $0,5 sub $1,$0 div $1,4 mul $1,3 add $1,1
src/net-buffers.ads
stcarrez/ada-enet
16
26605
<filename>src/net-buffers.ads ----------------------------------------------------------------------- -- net-buffers -- Network buffers -- Copyright (C) 2016, 2017, 2018 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with System; with Net.Headers; -- === Network Buffers === -- The <b>Net.Buffers</b> package provides support for network buffer management. -- A network buffer can hold a single packet frame so that it is limited to 1500 bytes -- of payload with 14 or 16 bytes for the Ethernet header. The network buffers are -- allocated by the Ethernet driver during the initialization to setup the -- Ethernet receive queue. The allocation of network buffers for the transmission -- is under the responsibility of the application. -- -- Before receiving a packet, the application also has to allocate a network buffer. -- Upon successful reception of a packet by the <b>Receive</b> procedure, the allocated -- network buffer will be given to the Ethernet receive queue and the application -- will get back the received buffer. There is no memory copy. -- -- The package defines two important types: <b>Buffer_Type</b> and <b>Buffer_List</b>. -- These two types are limited types to forbid copies and force a strict design to -- applications. The <b>Buffer_Type</b> describes the packet frame and it provides -- various operations to access the buffer. The <b>Buffer_List</b> defines a list of buffers. -- -- The network buffers are kept within a single linked list managed by a protected object. -- Because interrupt handlers can release a buffer, that protected object has the priority -- <b>System.Max_Interrupt_Priority</b>. The protected operations are very basic and are -- in O(1) complexity so that their execution is bounded in time whatever the arguments. -- -- Before anything, the network buffers have to be allocated. The application can do this -- by reserving some memory region (using <b>STM32.SDRAM.Reserve</b>) and adding the region with -- the <b>Add_Region</b> procedure. The region must be a multiple of <b>NET_ALLOC_SIZE</b> -- constant. To allocate 32 buffers, you can do the following: -- -- NET_BUFFER_SIZE : constant Interfaces.Unsigned_32 := Net.Buffers.NET_ALLOC_SIZE * 32; -- ... -- Net.Buffers.Add_Region (STM32.SDRAM.Reserve (Amount => NET_BUFFER_SIZE), NET_BUFFER_SIZE); -- -- An application will allocate a buffer by using the <b>Allocate</b> operation and this is as -- easy as: -- -- Packet : Net.Buffers.Buffer_Type; -- ... -- Net.Buffers.Allocate (Packet); -- -- What happens if there is no available buffer? No exception is raised because the networks -- stack is intended to be used in embedded systems where exceptions are not available. -- You have to check if the allocation succeeded by using the <b>Is_Null</b> function: -- -- if Packet.Is_Null then -- null; -- Oops -- end if; -- -- === Serialization === -- Several serialization operations are provided to build or extract information from a packet. -- Before proceeding to the serialization, it is necessary to set the packet type. The packet -- type is necessary to reserve room for the protocol headers. To build a UDP packet, the -- <tt>UDP_PACKET</tt> type will be used: -- -- Packet.Set_Type (Net.Buffers.UDP_PACKET); -- -- Then, several <tt>Put</tt> operations are provided to serialize the data. By default -- integers are serialized in network byte order. The <tt>Put_Uint8</tt> serializes one byte, -- the <tt>Put_Uint16</tt> two bytes, the <tt>Put_Uint32</tt> four bytes. The <tt>Put_String</tt> -- operation will serialize a string. A NUL byte is optional and can be added when the -- <tt>With_Null</tt> optional parameter is set. The example below creates a DNS query packet: -- -- Packet.Put_Uint16 (1234); -- XID -- Packet.Put_Uint16 (16#0100#); -- Flags -- Packet.Put_Uint16 (1); -- # queries -- Packet.Put_Uint16 (0); -- Packet.Put_Uint32 (0); -- Packet.Put_Uint8 (16#3#); -- Query -- Packet.Put_String ("www.google.fr", With_Null => True); -- Packet.Put_Uint16 (16#1#); -- A record -- Packet.Put_Uint16 (16#1#); -- IN class -- -- After a packet is serialized, the length get be obtained by using the -- -- Len : Net.Uint16 := Packet.Get_Data_Length; package Net.Buffers is pragma Preelaborate; -- The size of a packet buffer for memory allocation. NET_ALLOC_SIZE : constant Uint32; -- The maximum available size of the packet buffer for the application. -- We always have NET_BUF_SIZE < NET_ALLOC_SIZE. NET_BUF_SIZE : constant Uint32; -- The packet type identifies the content of the packet for the serialization/deserialization. type Packet_Type is (RAW_PACKET, ETHER_PACKET, ARP_PACKET, IP_PACKET, UDP_PACKET, ICMP_PACKET, DHCP_PACKET); type Data_Type is array (Net.Uint16 range 0 .. 1500 + 31) of aliased Uint8 with Alignment => 32; type Buffer_Type is tagged limited private; -- Returns true if the buffer is null (allocation failed). function Is_Null (Buf : in Buffer_Type) return Boolean; -- Allocate a buffer from the pool. No exception is raised if there is no available buffer. -- The <tt>Is_Null</tt> operation must be used to check the buffer allocation. procedure Allocate (Buf : out Buffer_Type); -- Release the buffer back to the pool. procedure Release (Buf : in out Buffer_Type) with Post => Buf.Is_Null; -- Transfer the ownership of the buffer from <tt>From</tt> to <tt>To</tt>. -- If the destination has a buffer, it is first released. procedure Transfer (To : in out Buffer_Type; From : in out Buffer_Type) with Pre => not From.Is_Null, Post => From.Is_Null and not To.Is_Null; -- Switch the ownership of the two buffers. The typical usage is on the Ethernet receive -- ring to peek a received packet and install a new buffer on the ring so that there is -- always a buffer on the ring. procedure Switch (To : in out Buffer_Type; From : in out Buffer_Type) with Pre => not From.Is_Null and not To.Is_Null, Post => not From.Is_Null and not To.Is_Null; -- function Get_Data_Address (Buf : in Buffer_Type) return System.Address; function Get_Data_Size (Buf : in Buffer_Type; Kind : in Packet_Type) return Uint16; procedure Set_Data_Size (Buf : in out Buffer_Type; Size : in Uint16); function Get_Length (Buf : in Buffer_Type) return Uint16; procedure Set_Length (Buf : in out Buffer_Type; Size : in Uint16); -- Set the packet type. procedure Set_Type (Buf : in out Buffer_Type; Kind : in Packet_Type); -- Add a byte to the buffer data, moving the buffer write position. procedure Put_Uint8 (Buf : in out Buffer_Type; Value : in Net.Uint8) with Pre => not Buf.Is_Null; -- Add a 16-bit value in network byte order to the buffer data, -- moving the buffer write position. procedure Put_Uint16 (Buf : in out Buffer_Type; Value : in Net.Uint16) with Pre => not Buf.Is_Null; -- Add a 32-bit value in network byte order to the buffer data, -- moving the buffer write position. procedure Put_Uint32 (Buf : in out Buffer_Type; Value : in Net.Uint32) with Pre => not Buf.Is_Null; -- Add a string to the buffer data, moving the buffer write position. -- When <tt>With_Null</tt> is set, a NUL byte is added after the string. procedure Put_String (Buf : in out Buffer_Type; Value : in String; With_Null : in Boolean := False) with Pre => not Buf.Is_Null; -- Add an IP address to the buffer data, moving the buffer write position. procedure Put_Ip (Buf : in out Buffer_Type; Value : in Ip_Addr) with Pre => not Buf.Is_Null; -- Get a byte from the buffer, moving the buffer read position. function Get_Uint8 (Buf : in out Buffer_Type) return Net.Uint8 with Pre => not Buf.Is_Null; -- Get a 16-bit value in network byte order from the buffer, moving the buffer read position. function Get_Uint16 (Buf : in out Buffer_Type) return Net.Uint16 with Pre => not Buf.Is_Null; -- Get a 32-bit value in network byte order from the buffer, moving the buffer read position. function Get_Uint32 (Buf : in out Buffer_Type) return Net.Uint32 with Pre => not Buf.Is_Null; -- Get an IPv4 value from the buffer, moving the buffer read position. function Get_Ip (Buf : in out Buffer_Type) return Net.Ip_Addr with Pre => not Buf.Is_Null; -- Get a string whose length is specified by the target value. procedure Get_String (Buf : in out Buffer_Type; Into : out String) with Pre => not Buf.Is_Null; -- Skip a number of bytes in the buffer, moving the buffer position <tt>Size<tt> bytes ahead. procedure Skip (Buf : in out Buffer_Type; Size : in Net.Uint16) with Pre => not Buf.Is_Null; -- Get the number of bytes still available when reading the packet. function Available (Buf : in Buffer_Type) return Net.Uint16 with Pre => not Buf.Is_Null; -- Get access to the Ethernet header. function Ethernet (Buf : in Buffer_Type) return Net.Headers.Ether_Header_Access with Pre => not Buf.Is_Null; -- Get access to the ARP packet. function Arp (Buf : in Buffer_Type) return Net.Headers.Arp_Packet_Access with Pre => not Buf.Is_Null; -- Get access to the IPv4 header. function IP (Buf : in Buffer_Type) return Net.Headers.IP_Header_Access with Pre => not Buf.Is_Null; -- Get access to the UDP header. function UDP (Buf : in Buffer_Type) return Net.Headers.UDP_Header_Access with Pre => not Buf.Is_Null; -- Get access to the TCP header. function TCP (Buf : in Buffer_Type) return Net.Headers.TCP_Header_Access with Pre => not Buf.Is_Null; -- Get access to the IGMP header. function IGMP (Buf : in Buffer_Type) return Net.Headers.IGMP_Header_Access with Pre => not Buf.Is_Null; -- Get access to the ICMP header. function ICMP (Buf : in Buffer_Type) return Net.Headers.ICMP_Header_Access with Pre => not Buf.Is_Null; -- Get access to the DHCP header. function DHCP (Buf : in Buffer_Type) return Net.Headers.DHCP_Header_Access with Pre => not Buf.Is_Null; -- The <tt>Buffer_List</tt> holds a set of network buffers. type Buffer_List is limited private; -- Returns True if the list is empty. function Is_Empty (List : in Buffer_List) return Boolean; -- Insert the buffer to the list. procedure Insert (Into : in out Buffer_List; Buf : in out Buffer_Type) with Pre => not Buf.Is_Null, Post => Buf.Is_Null and not Is_Empty (Into); -- Release all the buffers held by the list. procedure Release (List : in out Buffer_List); -- Allocate <tt>Count</tt> buffers and add them to the list. -- There is no guarantee that the required number of buffers will be allocated. procedure Allocate (List : in out Buffer_List; Count : in Natural); -- Peek a buffer from the list. procedure Peek (From : in out Buffer_List; Buf : in out Buffer_Type); -- Transfer the list of buffers held by <tt>From</tt> at end of the list held -- by <tt>To</tt>. After the transfer, the <tt>From</tt> list is empty. -- The complexity is in O(1). procedure Transfer (To : in out Buffer_List; From : in out Buffer_List) with Post => Is_Empty (From); use type System.Address; -- Add a memory region to the buffer pool. procedure Add_Region (Addr : in System.Address; Size : in Uint32) with Pre => Size mod NET_ALLOC_SIZE = 0 and Size > 0 and Addr /= System.Null_Address; private type Packet_Buffer; type Packet_Buffer_Access is access all Packet_Buffer; type Packet_Buffer is limited record Next : Packet_Buffer_Access; Size : Uint16; Data : aliased Data_Type; end record; type Buffer_Type is tagged limited record Kind : Packet_Type := RAW_PACKET; Size : Uint16 := 0; Pos : Uint16 := 0; Packet : Packet_Buffer_Access; end record; type Buffer_List is limited record Head : Packet_Buffer_Access := null; Tail : Packet_Buffer_Access := null; end record; NET_ALLOC_SIZE : constant Uint32 := 4 + (Packet_Buffer'Size / 8); NET_BUF_SIZE : constant Uint32 := Data_Type'Size / 8; end Net.Buffers;
programs/oeis/143/A143960.asm
karttu/loda
1
163802
<gh_stars>1-10 ; A143960: a(n) = the n-th positive integer with exactly n zeros and n ones in its binary representation. ; 2,10,38,142,542,2110,8318,33022,131582,525310,2099198,8392702,33562622,134234110,536903678,2147549182,8590065662,34360000510,137439477758,549756862462,2199025352702,8796097216510,35184380477438,140737505132542,562949986975742 mov $1,2 pow $1,$0 add $1,1 bin $1,2 mul $1,4 sub $1,2
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1685.asm
ljhsiun2/medusa
9
173323
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1ecaf, %rsi lea addresses_A_ht+0x542a, %rdi nop nop and $27279, %r12 mov $55, %rcx rep movsb nop cmp %rbp, %rbp lea addresses_A_ht+0x130af, %r9 nop nop nop cmp $2177, %r13 mov (%r9), %esi nop nop nop nop nop and %r12, %r12 lea addresses_normal_ht+0x7d2f, %rsi lea addresses_A_ht+0x19fef, %rdi xor %rbx, %rbx mov $105, %rcx rep movsl nop dec %r9 lea addresses_WC_ht+0x24af, %rdi nop nop nop nop cmp %rcx, %rcx mov $0x6162636465666768, %r9 movq %r9, %xmm7 and $0xffffffffffffffc0, %rdi movntdq %xmm7, (%rdi) nop nop nop cmp %rsi, %rsi lea addresses_WT_ht+0x198af, %rsi lea addresses_D_ht+0xb2e5, %rdi nop xor %r9, %r9 mov $26, %rcx rep movsw nop nop cmp %rcx, %rcx lea addresses_WT_ht+0xb8af, %rsi lea addresses_A_ht+0x12a2f, %rdi nop nop nop nop nop lfence mov $56, %rcx rep movsl nop nop nop xor %r9, %r9 lea addresses_A_ht+0x1d407, %rsi lea addresses_A_ht+0x20af, %rdi nop inc %rbp mov $22, %rcx rep movsq nop nop nop nop sub %r13, %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r8 push %r9 push %rbp push %rbx // Store lea addresses_WC+0x1153f, %r13 nop nop nop cmp %r14, %r14 movw $0x5152, (%r13) nop nop nop xor %r13, %r13 // Store lea addresses_A+0x15f92, %rbx nop nop nop nop nop inc %r9 movw $0x5152, (%rbx) nop nop add $59414, %rbx // Store lea addresses_RW+0xa6af, %r9 nop xor %rbx, %rbx mov $0x5152535455565758, %r14 movq %r14, (%r9) nop xor %rbx, %rbx // Store lea addresses_US+0x47cf, %rbx clflush (%rbx) nop nop nop sub $59327, %r8 mov $0x5152535455565758, %r10 movq %r10, (%rbx) cmp $56357, %r14 // Store lea addresses_PSE+0x142af, %rbp clflush (%rbp) nop nop cmp %r8, %r8 mov $0x5152535455565758, %rbx movq %rbx, (%rbp) nop cmp $29158, %r14 // Store lea addresses_RW+0xf6e8, %r13 cmp %r9, %r9 movl $0x51525354, (%r13) nop and $7435, %r10 // Store lea addresses_A+0xdaaf, %rbp nop cmp $35432, %r13 mov $0x5152535455565758, %r9 movq %r9, (%rbp) nop nop xor $24587, %r14 // Store lea addresses_A+0x1d9af, %r10 sub $25599, %r13 mov $0x5152535455565758, %r9 movq %r9, (%r10) nop nop nop inc %r14 // Store lea addresses_UC+0x1742f, %r14 nop nop nop nop cmp $22771, %r13 mov $0x5152535455565758, %r10 movq %r10, (%r14) nop nop add %r14, %r14 // Load lea addresses_D+0x9723, %r10 nop nop nop nop xor $59902, %rbx vmovups (%r10), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %r14 nop nop add $46522, %r10 // Store lea addresses_normal+0x38af, %r8 nop nop nop cmp $8778, %rbp movl $0x51525354, (%r8) nop nop nop and %r10, %r10 // Faulty Load lea addresses_normal+0x11caf, %rbp xor %r9, %r9 mov (%rbp), %r14w lea oracles, %r8 and $0xff, %r14 shlq $12, %r14 mov (%r8,%r14,1), %r14 pop %rbx pop %rbp pop %r9 pop %r8 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': True, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}} {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 5}} [Faulty Load] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 9}} {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
tests/test1.asm
felix-hoenikker/masm
25
178878
<gh_stars>10-100 j exit L1: addi $s0, $zero ,42 l1: add $s1, $zero, $0 bne $s1 , $0 l1 beq $s1 $0 L1 hang: j hang exit:
src/data/lib/prim/Agda/Builtin/Coinduction.agda
redfish64/autonomic-agda
0
13364
<gh_stars>0 module Agda.Builtin.Coinduction where infix 1000 ♯_ postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-}
tests/tk-mainwindow-test_data-tests.adb
thindil/tashy2
2
23944
-- This package has been generated automatically by GNATtest. -- You are allowed to add your code to the bodies of test routines. -- Such changes will be kept during further regeneration of this file. -- All code placed outside of test routine bodies will be lost. The -- code intended to set up and tear down the test environment should be -- placed into Tk.MainWindow.Test_Data. with AUnit.Assertions; use AUnit.Assertions; with System.Assertions; -- begin read only -- id:2.2/00/ -- -- This section can be used to add with clauses if necessary. -- -- end read only with Ada.Environment_Variables; use Ada.Environment_Variables; with Tk.Widget; use Tk.Widget; -- begin read only -- end read only package body Tk.MainWindow.Test_Data.Tests is -- begin read only -- id:2.2/01/ -- -- This section can be used to add global variables and other elements. -- -- end read only -- begin read only -- end read only -- begin read only function Wrap_Test_Get_Main_Window_d38719_603916 (Interpreter: Tcl_Interpreter := Get_Interpreter) return Tk.TopLevel.Tk_Toplevel is begin begin pragma Assert(Interpreter /= Null_Interpreter); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "req_sloc(tk-mainwindow.ads:0):Test_Main_Window test requirement violated"); end; declare Test_Get_Main_Window_d38719_603916_Result: constant Tk.TopLevel .Tk_Toplevel := GNATtest_Generated.GNATtest_Standard.Tk.MainWindow.Get_Main_Window (Interpreter); begin begin pragma Assert(True); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "ens_sloc(tk-mainwindow.ads:0:):Test_Main_Window test commitment violated"); end; return Test_Get_Main_Window_d38719_603916_Result; end; end Wrap_Test_Get_Main_Window_d38719_603916; -- end read only -- begin read only procedure Test_Get_Main_Window_test_main_window(Gnattest_T: in out Test); procedure Test_Get_Main_Window_d38719_603916 (Gnattest_T: in out Test) renames Test_Get_Main_Window_test_main_window; -- id:2.2/d38719cbce978992/Get_Main_Window/1/0/test_main_window/ procedure Test_Get_Main_Window_test_main_window(Gnattest_T: in out Test) is function Get_Main_Window (Interpreter: Tcl_Interpreter := Get_Interpreter) return Tk.TopLevel.Tk_Toplevel renames Wrap_Test_Get_Main_Window_d38719_603916; -- end read only pragma Unreferenced(Gnattest_T); begin if Value("DISPLAY", "")'Length = 0 then Assert(True, "No display, can't test"); return; end if; Assert (Get_Main_Window /= Null_Widget, "Failed to get main window of Tk application."); -- begin read only end Test_Get_Main_Window_test_main_window; -- end read only -- begin read only -- id:2.2/02/ -- -- This section can be used to add elaboration code for the global state. -- begin -- end read only null; -- begin read only -- end read only end Tk.MainWindow.Test_Data.Tests;
programs/oeis/003/A003434.asm
jmorken/loda
1
166268
<reponame>jmorken/loda ; A003434: Number of iterations of phi(x) at n needed to reach 1. ; 0,1,2,2,3,2,3,3,3,3,4,3,4,3,4,4,5,3,4,4,4,4,5,4,5,4,4,4,5,4,5,5,5,5,5,4,5,4,5,5,6,4,5,5,5,5,6,5,5,5,6,5,6,4,6,5,5,5,6,5,6,5,5,6,6,5,6,6,6,5,6,5,6,5,6,5,6,5,6,6,5,6,7,5,7,5,6,6,7,5,6,6,6,6,6,6,7,5,6,6,7,6,7,6,6,6,7,5,6,6,6,6,7,5,7,6,6,6,7,6,7,6,7,6,7,5,6,7,6,6,7,6,6,6,6,7,8,6,7,6,7,6,7,6,7,6,6,6,7,6,7,6,7,6,7,6,7,6,7,7,7,5,6,7,7,7,8,6,7,7,6,6,7,6,7,7,7,7,8,6,7,6,7,7,7,6,8,7,6,6,7,7,8,7,7,6,7,6,7,7,7,7,7,7,8,7,7,7,7,6,7,7,7,7,7,6,7,6,7,7,8,6,7,7,7,7,8,6,7,7,7,7,8,6,8,7,7,7,8,7,8,7,6,7,7,7,7,7,8,7 lpb $0 cal $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n. sub $0,1 add $1,1 lpe
SVD2ada/svd/stm32_svd-rcc.ads
JCGobbi/Nucleo-STM32H743ZI
0
7598
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32H743x.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.RCC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_HSIDIV_Field is HAL.UInt2; -- clock control register type CR_Register is record -- Internal high-speed clock enable HSION : Boolean := True; -- High Speed Internal clock enable in Stop mode HSIKERON : Boolean := True; -- HSI clock ready flag HSIRDY : Boolean := False; -- HSI clock divider HSIDIV : CR_HSIDIV_Field := 16#0#; -- HSI divider flag HSIDIVF : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- CSI clock enable CSION : Boolean := True; -- CSI clock ready flag CSIRDY : Boolean := False; -- CSI clock enable in Stop mode CSIKERON : Boolean := False; -- unspecified Reserved_10_11 : HAL.UInt2 := 16#0#; -- RC48 clock enable HSI48ON : Boolean := False; -- RC48 clock ready flag HSI48RDY : Boolean := False; -- D1 domain clocks ready flag D1CKRDY : Boolean := False; -- D2 domain clocks ready flag D2CKRDY : Boolean := False; -- HSE clock enable HSEON : Boolean := False; -- HSE clock ready flag HSERDY : Boolean := False; -- HSE clock bypass HSEBYP : Boolean := False; -- HSE Clock Security System enable HSECSSON : Boolean := False; -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; -- PLL1 enable PLL1ON : Boolean := False; -- PLL1 clock ready flag PLL1RDY : Boolean := False; -- PLL2 enable PLL2ON : Boolean := False; -- PLL2 clock ready flag PLL2RDY : Boolean := False; -- PLL3 enable PLL3ON : Boolean := False; -- PLL3 clock ready flag PLL3RDY : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record HSION at 0 range 0 .. 0; HSIKERON at 0 range 1 .. 1; HSIRDY at 0 range 2 .. 2; HSIDIV at 0 range 3 .. 4; HSIDIVF at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; CSION at 0 range 7 .. 7; CSIRDY at 0 range 8 .. 8; CSIKERON at 0 range 9 .. 9; Reserved_10_11 at 0 range 10 .. 11; HSI48ON at 0 range 12 .. 12; HSI48RDY at 0 range 13 .. 13; D1CKRDY at 0 range 14 .. 14; D2CKRDY at 0 range 15 .. 15; HSEON at 0 range 16 .. 16; HSERDY at 0 range 17 .. 17; HSEBYP at 0 range 18 .. 18; HSECSSON at 0 range 19 .. 19; Reserved_20_23 at 0 range 20 .. 23; PLL1ON at 0 range 24 .. 24; PLL1RDY at 0 range 25 .. 25; PLL2ON at 0 range 26 .. 26; PLL2RDY at 0 range 27 .. 27; PLL3ON at 0 range 28 .. 28; PLL3RDY at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype ICSCR_HSICAL_Field is HAL.UInt12; subtype ICSCR_HSITRIM_Field is HAL.UInt6; subtype ICSCR_CSICAL_Field is HAL.UInt8; subtype ICSCR_CSITRIM_Field is HAL.UInt5; -- RCC Internal Clock Source Calibration Register type ICSCR_Register is record -- Read-only. HSI clock calibration HSICAL : ICSCR_HSICAL_Field := 16#0#; -- HSI clock trimming HSITRIM : ICSCR_HSITRIM_Field := 16#0#; -- Read-only. CSI clock calibration CSICAL : ICSCR_CSICAL_Field := 16#0#; -- CSI clock trimming CSITRIM : ICSCR_CSITRIM_Field := 16#10#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ICSCR_Register use record HSICAL at 0 range 0 .. 11; HSITRIM at 0 range 12 .. 17; CSICAL at 0 range 18 .. 25; CSITRIM at 0 range 26 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype CRRCR_RC48CAL_Field is HAL.UInt10; -- RCC Clock Recovery RC Register type CRRCR_Register is record -- Read-only. Internal RC 48 MHz clock calibration RC48CAL : CRRCR_RC48CAL_Field; -- unspecified Reserved_10_31 : HAL.UInt22; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CRRCR_Register use record RC48CAL at 0 range 0 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype CFGR_SW_Field is HAL.UInt3; subtype CFGR_SWS_Field is HAL.UInt3; subtype CFGR_RTCPRE_Field is HAL.UInt6; subtype CFGR_MCO1PRE_Field is HAL.UInt4; subtype CFGR_MCO1SEL_Field is HAL.UInt3; subtype CFGR_MCO2PRE_Field is HAL.UInt4; subtype CFGR_MCO2SEL_Field is HAL.UInt3; -- RCC Clock Configuration Register type CFGR_Register is record -- System clock switch SW : CFGR_SW_Field := 16#0#; -- System clock switch status SWS : CFGR_SWS_Field := 16#0#; -- System clock selection after a wake up from system Stop STOPWUCK : Boolean := False; -- Kernel clock selection after a wake up from system Stop STOPKERWUCK : Boolean := False; -- HSE division factor for RTC clock RTCPRE : CFGR_RTCPRE_Field := 16#0#; -- High Resolution Timer clock prescaler selection HRTIMSEL : Boolean := False; -- Timers clocks prescaler selection TIMPRE : Boolean := False; -- unspecified Reserved_16_17 : HAL.UInt2 := 16#0#; -- MCO1 prescaler MCO1PRE : CFGR_MCO1PRE_Field := 16#0#; -- Micro-controller clock output 1 MCO1SEL : CFGR_MCO1SEL_Field := 16#0#; -- MCO2 prescaler MCO2PRE : CFGR_MCO2PRE_Field := 16#0#; -- Micro-controller clock output 2 MCO2SEL : CFGR_MCO2SEL_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CFGR_Register use record SW at 0 range 0 .. 2; SWS at 0 range 3 .. 5; STOPWUCK at 0 range 6 .. 6; STOPKERWUCK at 0 range 7 .. 7; RTCPRE at 0 range 8 .. 13; HRTIMSEL at 0 range 14 .. 14; TIMPRE at 0 range 15 .. 15; Reserved_16_17 at 0 range 16 .. 17; MCO1PRE at 0 range 18 .. 21; MCO1SEL at 0 range 22 .. 24; MCO2PRE at 0 range 25 .. 28; MCO2SEL at 0 range 29 .. 31; end record; subtype D1CFGR_HPRE_Field is HAL.UInt4; subtype D1CFGR_D1PPRE_Field is HAL.UInt3; subtype D1CFGR_D1CPRE_Field is HAL.UInt4; -- RCC Domain 1 Clock Configuration Register type D1CFGR_Register is record -- D1 domain AHB prescaler HPRE : D1CFGR_HPRE_Field := 16#0#; -- D1 domain APB3 prescaler D1PPRE : D1CFGR_D1PPRE_Field := 16#0#; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- D1 domain Core prescaler D1CPRE : D1CFGR_D1CPRE_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D1CFGR_Register use record HPRE at 0 range 0 .. 3; D1PPRE at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; D1CPRE at 0 range 8 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype D2CFGR_D2PPRE1_Field is HAL.UInt3; subtype D2CFGR_D2PPRE2_Field is HAL.UInt3; -- RCC Domain 2 Clock Configuration Register type D2CFGR_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- D2 domain APB1 prescaler D2PPRE1 : D2CFGR_D2PPRE1_Field := 16#0#; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- D2 domain APB2 prescaler D2PPRE2 : D2CFGR_D2PPRE2_Field := 16#0#; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D2CFGR_Register use record Reserved_0_3 at 0 range 0 .. 3; D2PPRE1 at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; D2PPRE2 at 0 range 8 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; subtype D3CFGR_D3PPRE_Field is HAL.UInt3; -- RCC Domain 3 Clock Configuration Register type D3CFGR_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- D3 domain APB4 prescaler D3PPRE : D3CFGR_D3PPRE_Field := 16#0#; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D3CFGR_Register use record Reserved_0_3 at 0 range 0 .. 3; D3PPRE at 0 range 4 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype PLLCKSELR_PLLSRC_Field is HAL.UInt2; subtype PLLCKSELR_DIVM1_Field is HAL.UInt6; subtype PLLCKSELR_DIVM2_Field is HAL.UInt6; subtype PLLCKSELR_DIVM3_Field is HAL.UInt6; -- RCC PLLs Clock Source Selection Register type PLLCKSELR_Register is record -- DIVMx and PLLs clock source selection PLLSRC : PLLCKSELR_PLLSRC_Field := 16#0#; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- Prescaler for PLL1 DIVM1 : PLLCKSELR_DIVM1_Field := 16#20#; -- unspecified Reserved_10_11 : HAL.UInt2 := 16#0#; -- Prescaler for PLL2 DIVM2 : PLLCKSELR_DIVM2_Field := 16#20#; -- unspecified Reserved_18_19 : HAL.UInt2 := 16#0#; -- Prescaler for PLL3 DIVM3 : PLLCKSELR_DIVM3_Field := 16#20#; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLLCKSELR_Register use record PLLSRC at 0 range 0 .. 1; Reserved_2_3 at 0 range 2 .. 3; DIVM1 at 0 range 4 .. 9; Reserved_10_11 at 0 range 10 .. 11; DIVM2 at 0 range 12 .. 17; Reserved_18_19 at 0 range 18 .. 19; DIVM3 at 0 range 20 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; subtype PLLCFGR_PLL1RGE_Field is HAL.UInt2; subtype PLLCFGR_PLL2RGE_Field is HAL.UInt2; subtype PLLCFGR_PLL3RGE_Field is HAL.UInt2; -- RCC PLLs Configuration Register type PLLCFGR_Register is record -- PLL1 fractional latch enable PLL1FRACEN : Boolean := False; -- PLL1 VCO selection PLL1VCOSEL : Boolean := False; -- PLL1 input frequency range PLL1RGE : PLLCFGR_PLL1RGE_Field := 16#0#; -- PLL2 fractional latch enable PLL2FRACEN : Boolean := False; -- PLL2 VCO selection PLL2VCOSEL : Boolean := False; -- PLL2 input frequency range PLL2RGE : PLLCFGR_PLL2RGE_Field := 16#0#; -- PLL3 fractional latch enable PLL3FRACEN : Boolean := False; -- PLL3 VCO selection PLL3VCOSEL : Boolean := False; -- PLL3 input frequency range PLL3RGE : PLLCFGR_PLL3RGE_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- PLL1 DIVP divider output enable DIVP1EN : Boolean := True; -- PLL1 DIVQ divider output enable DIVQ1EN : Boolean := True; -- PLL1 DIVR divider output enable DIVR1EN : Boolean := True; -- PLL2 DIVP divider output enable DIVP2EN : Boolean := True; -- PLL2 DIVQ divider output enable DIVQ2EN : Boolean := True; -- PLL2 DIVR divider output enable DIVR2EN : Boolean := True; -- PLL3 DIVP divider output enable DIVP3EN : Boolean := True; -- PLL3 DIVQ divider output enable DIVQ3EN : Boolean := True; -- PLL3 DIVR divider output enable DIVR3EN : Boolean := True; -- unspecified Reserved_25_31 : HAL.UInt7 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLLCFGR_Register use record PLL1FRACEN at 0 range 0 .. 0; PLL1VCOSEL at 0 range 1 .. 1; PLL1RGE at 0 range 2 .. 3; PLL2FRACEN at 0 range 4 .. 4; PLL2VCOSEL at 0 range 5 .. 5; PLL2RGE at 0 range 6 .. 7; PLL3FRACEN at 0 range 8 .. 8; PLL3VCOSEL at 0 range 9 .. 9; PLL3RGE at 0 range 10 .. 11; Reserved_12_15 at 0 range 12 .. 15; DIVP1EN at 0 range 16 .. 16; DIVQ1EN at 0 range 17 .. 17; DIVR1EN at 0 range 18 .. 18; DIVP2EN at 0 range 19 .. 19; DIVQ2EN at 0 range 20 .. 20; DIVR2EN at 0 range 21 .. 21; DIVP3EN at 0 range 22 .. 22; DIVQ3EN at 0 range 23 .. 23; DIVR3EN at 0 range 24 .. 24; Reserved_25_31 at 0 range 25 .. 31; end record; subtype PLL1DIVR_DIVN1_Field is HAL.UInt9; subtype PLL1DIVR_DIVP1_Field is HAL.UInt7; subtype PLL1DIVR_DIVQ1_Field is HAL.UInt7; subtype PLL1DIVR_DIVR1_Field is HAL.UInt7; -- RCC PLL1 Dividers Configuration Register type PLL1DIVR_Register is record -- Multiplication factor for PLL1 VCO DIVN1 : PLL1DIVR_DIVN1_Field := 16#80#; -- PLL1 DIVP division factor DIVP1 : PLL1DIVR_DIVP1_Field := 16#1#; -- PLL1 DIVQ division factor DIVQ1 : PLL1DIVR_DIVQ1_Field := 16#1#; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- PLL1 DIVR division factor DIVR1 : PLL1DIVR_DIVR1_Field := 16#1#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL1DIVR_Register use record DIVN1 at 0 range 0 .. 8; DIVP1 at 0 range 9 .. 15; DIVQ1 at 0 range 16 .. 22; Reserved_23_23 at 0 range 23 .. 23; DIVR1 at 0 range 24 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype PLL1FRACR_FRACN1_Field is HAL.UInt13; -- RCC PLL1 Fractional Divider Register type PLL1FRACR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Fractional part of the multiplication factor for PLL1 VCO FRACN1 : PLL1FRACR_FRACN1_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL1FRACR_Register use record Reserved_0_2 at 0 range 0 .. 2; FRACN1 at 0 range 3 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype PLL2DIVR_DIVN2_Field is HAL.UInt9; subtype PLL2DIVR_DIVP2_Field is HAL.UInt7; subtype PLL2DIVR_DIVQ2_Field is HAL.UInt7; subtype PLL2DIVR_DIVR2_Field is HAL.UInt7; -- RCC PLL2 Dividers Configuration Register type PLL2DIVR_Register is record -- Multiplication factor for PLL2 VCO DIVN2 : PLL2DIVR_DIVN2_Field := 16#80#; -- PLL2 DIVP division factor DIVP2 : PLL2DIVR_DIVP2_Field := 16#1#; -- PLL2 DIVQ division factor DIVQ2 : PLL2DIVR_DIVQ2_Field := 16#1#; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- PLL2 DIVR division factor DIVR2 : PLL2DIVR_DIVR2_Field := 16#1#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL2DIVR_Register use record DIVN2 at 0 range 0 .. 8; DIVP2 at 0 range 9 .. 15; DIVQ2 at 0 range 16 .. 22; Reserved_23_23 at 0 range 23 .. 23; DIVR2 at 0 range 24 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype PLL2FRACR_FRACN2_Field is HAL.UInt13; -- RCC PLL2 Fractional Divider Register type PLL2FRACR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Fractional part of the multiplication factor for PLL VCO FRACN2 : PLL2FRACR_FRACN2_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL2FRACR_Register use record Reserved_0_2 at 0 range 0 .. 2; FRACN2 at 0 range 3 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype PLL3DIVR_DIVN3_Field is HAL.UInt9; subtype PLL3DIVR_DIVP3_Field is HAL.UInt7; subtype PLL3DIVR_DIVQ3_Field is HAL.UInt7; subtype PLL3DIVR_DIVR3_Field is HAL.UInt7; -- RCC PLL3 Dividers Configuration Register type PLL3DIVR_Register is record -- Multiplication factor for PLL3 VCO DIVN3 : PLL3DIVR_DIVN3_Field := 16#80#; -- PLL3 DIVP division factor DIVP3 : PLL3DIVR_DIVP3_Field := 16#1#; -- PLL3 DIVQ division factor DIVQ3 : PLL3DIVR_DIVQ3_Field := 16#1#; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- PLL3 DIVR division factor DIVR3 : PLL3DIVR_DIVR3_Field := 16#1#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL3DIVR_Register use record DIVN3 at 0 range 0 .. 8; DIVP3 at 0 range 9 .. 15; DIVQ3 at 0 range 16 .. 22; Reserved_23_23 at 0 range 23 .. 23; DIVR3 at 0 range 24 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype PLL3FRACR_FRACN3_Field is HAL.UInt13; -- RCC PLL3 Fractional Divider Register type PLL3FRACR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Fractional part of the multiplication factor for PLL3 VCO FRACN3 : PLL3FRACR_FRACN3_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PLL3FRACR_Register use record Reserved_0_2 at 0 range 0 .. 2; FRACN3 at 0 range 3 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype D1CCIPR_FMCSEL_Field is HAL.UInt2; subtype D1CCIPR_QSPISEL_Field is HAL.UInt2; subtype D1CCIPR_CKPERSEL_Field is HAL.UInt2; -- RCC Domain 1 Kernel Clock Configuration Register type D1CCIPR_Register is record -- FMC kernel clock source selection FMCSEL : D1CCIPR_FMCSEL_Field := 16#0#; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- QUADSPI kernel clock source selection QSPISEL : D1CCIPR_QSPISEL_Field := 16#0#; -- unspecified Reserved_6_15 : HAL.UInt10 := 16#0#; -- SDMMC kernel clock source selection SDMMCSEL : Boolean := False; -- unspecified Reserved_17_27 : HAL.UInt11 := 16#0#; -- per_ck clock source selection CKPERSEL : D1CCIPR_CKPERSEL_Field := 16#0#; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D1CCIPR_Register use record FMCSEL at 0 range 0 .. 1; Reserved_2_3 at 0 range 2 .. 3; QSPISEL at 0 range 4 .. 5; Reserved_6_15 at 0 range 6 .. 15; SDMMCSEL at 0 range 16 .. 16; Reserved_17_27 at 0 range 17 .. 27; CKPERSEL at 0 range 28 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype D2CCIP1R_SAI1SEL_Field is HAL.UInt3; subtype D2CCIP1R_SAI23SEL_Field is HAL.UInt3; subtype D2CCIP1R_SPI123SEL_Field is HAL.UInt3; subtype D2CCIP1R_SPI45SEL_Field is HAL.UInt3; subtype D2CCIP1R_SPDIFSEL_Field is HAL.UInt2; subtype D2CCIP1R_FDCANSEL_Field is HAL.UInt2; -- RCC Domain 2 Kernel Clock Configuration Register type D2CCIP1R_Register is record -- SAI1 and DFSDM1 kernel Aclk clock source selection SAI1SEL : D2CCIP1R_SAI1SEL_Field := 16#0#; -- unspecified Reserved_3_5 : HAL.UInt3 := 16#0#; -- SAI2 and SAI3 kernel clock source selection SAI23SEL : D2CCIP1R_SAI23SEL_Field := 16#0#; -- unspecified Reserved_9_11 : HAL.UInt3 := 16#0#; -- SPI/I2S1,2 and 3 kernel clock source selection SPI123SEL : D2CCIP1R_SPI123SEL_Field := 16#0#; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SPI4 and 5 kernel clock source selection SPI45SEL : D2CCIP1R_SPI45SEL_Field := 16#0#; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPDIFRX kernel clock source selection SPDIFSEL : D2CCIP1R_SPDIFSEL_Field := 16#0#; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- DFSDM1 kernel Clk clock source selection DFSDM1SEL : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- FDCAN kernel clock source selection FDCANSEL : D2CCIP1R_FDCANSEL_Field := 16#0#; -- unspecified Reserved_30_30 : HAL.Bit := 16#0#; -- SWPMI kernel clock source selection SWPSEL : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D2CCIP1R_Register use record SAI1SEL at 0 range 0 .. 2; Reserved_3_5 at 0 range 3 .. 5; SAI23SEL at 0 range 6 .. 8; Reserved_9_11 at 0 range 9 .. 11; SPI123SEL at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; SPI45SEL at 0 range 16 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPDIFSEL at 0 range 20 .. 21; Reserved_22_23 at 0 range 22 .. 23; DFSDM1SEL at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; FDCANSEL at 0 range 28 .. 29; Reserved_30_30 at 0 range 30 .. 30; SWPSEL at 0 range 31 .. 31; end record; subtype D2CCIP2R_USART234578SEL_Field is HAL.UInt3; subtype D2CCIP2R_USART16SEL_Field is HAL.UInt3; subtype D2CCIP2R_RNGSEL_Field is HAL.UInt2; subtype D2CCIP2R_I2C123SEL_Field is HAL.UInt2; subtype D2CCIP2R_USBSEL_Field is HAL.UInt2; subtype D2CCIP2R_CECSEL_Field is HAL.UInt2; subtype D2CCIP2R_LPTIM1SEL_Field is HAL.UInt3; -- RCC Domain 2 Kernel Clock Configuration Register type D2CCIP2R_Register is record -- USART2/3, UART4,5, 7/8 (APB1) kernel clock source selection USART234578SEL : D2CCIP2R_USART234578SEL_Field := 16#0#; -- USART1 and 6 kernel clock source selection USART16SEL : D2CCIP2R_USART16SEL_Field := 16#0#; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- RNG kernel clock source selection RNGSEL : D2CCIP2R_RNGSEL_Field := 16#0#; -- unspecified Reserved_10_11 : HAL.UInt2 := 16#0#; -- I2C1,2,3 kernel clock source selection I2C123SEL : D2CCIP2R_I2C123SEL_Field := 16#0#; -- unspecified Reserved_14_19 : HAL.UInt6 := 16#0#; -- USBOTG 1 and 2 kernel clock source selection USBSEL : D2CCIP2R_USBSEL_Field := 16#0#; -- HDMI-CEC kernel clock source selection CECSEL : D2CCIP2R_CECSEL_Field := 16#0#; -- unspecified Reserved_24_27 : HAL.UInt4 := 16#0#; -- LPTIM1 kernel clock source selection LPTIM1SEL : D2CCIP2R_LPTIM1SEL_Field := 16#0#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D2CCIP2R_Register use record USART234578SEL at 0 range 0 .. 2; USART16SEL at 0 range 3 .. 5; Reserved_6_7 at 0 range 6 .. 7; RNGSEL at 0 range 8 .. 9; Reserved_10_11 at 0 range 10 .. 11; I2C123SEL at 0 range 12 .. 13; Reserved_14_19 at 0 range 14 .. 19; USBSEL at 0 range 20 .. 21; CECSEL at 0 range 22 .. 23; Reserved_24_27 at 0 range 24 .. 27; LPTIM1SEL at 0 range 28 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype D3CCIPR_LPUART1SEL_Field is HAL.UInt3; subtype D3CCIPR_I2C4SEL_Field is HAL.UInt2; subtype D3CCIPR_LPTIM2SEL_Field is HAL.UInt3; subtype D3CCIPR_LPTIM345SEL_Field is HAL.UInt3; subtype D3CCIPR_ADCSEL_Field is HAL.UInt2; subtype D3CCIPR_SAI4ASEL_Field is HAL.UInt3; subtype D3CCIPR_SAI4BSEL_Field is HAL.UInt3; subtype D3CCIPR_SPI6SEL_Field is HAL.UInt3; -- RCC Domain 3 Kernel Clock Configuration Register type D3CCIPR_Register is record -- LPUART1 kernel clock source selection LPUART1SEL : D3CCIPR_LPUART1SEL_Field := 16#0#; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- I2C4 kernel clock source selection I2C4SEL : D3CCIPR_I2C4SEL_Field := 16#0#; -- LPTIM2 kernel clock source selection LPTIM2SEL : D3CCIPR_LPTIM2SEL_Field := 16#0#; -- LPTIM3,4,5 kernel clock source selection LPTIM345SEL : D3CCIPR_LPTIM345SEL_Field := 16#0#; -- SAR ADC kernel clock source selection ADCSEL : D3CCIPR_ADCSEL_Field := 16#0#; -- unspecified Reserved_18_20 : HAL.UInt3 := 16#0#; -- Sub-Block A of SAI4 kernel clock source selection SAI4ASEL : D3CCIPR_SAI4ASEL_Field := 16#0#; -- Sub-Block B of SAI4 kernel clock source selection SAI4BSEL : D3CCIPR_SAI4BSEL_Field := 16#0#; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- SPI6 kernel clock source selection SPI6SEL : D3CCIPR_SPI6SEL_Field := 16#0#; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D3CCIPR_Register use record LPUART1SEL at 0 range 0 .. 2; Reserved_3_7 at 0 range 3 .. 7; I2C4SEL at 0 range 8 .. 9; LPTIM2SEL at 0 range 10 .. 12; LPTIM345SEL at 0 range 13 .. 15; ADCSEL at 0 range 16 .. 17; Reserved_18_20 at 0 range 18 .. 20; SAI4ASEL at 0 range 21 .. 23; SAI4BSEL at 0 range 24 .. 26; Reserved_27_27 at 0 range 27 .. 27; SPI6SEL at 0 range 28 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; -- RCC Clock Source Interrupt Enable Register type CIER_Register is record -- LSI ready Interrupt Enable LSIRDYIE : Boolean := False; -- LSE ready Interrupt Enable LSERDYIE : Boolean := False; -- HSI ready Interrupt Enable HSIRDYIE : Boolean := False; -- HSE ready Interrupt Enable HSERDYIE : Boolean := False; -- CSI ready Interrupt Enable CSIRDYIE : Boolean := False; -- RC48 ready Interrupt Enable RC48RDYIE : Boolean := False; -- PLL1 ready Interrupt Enable PLL1RDYIE : Boolean := False; -- PLL2 ready Interrupt Enable PLL2RDYIE : Boolean := False; -- PLL3 ready Interrupt Enable PLL3RDYIE : Boolean := False; -- LSE clock security system Interrupt Enable LSECSSIE : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CIER_Register use record LSIRDYIE at 0 range 0 .. 0; LSERDYIE at 0 range 1 .. 1; HSIRDYIE at 0 range 2 .. 2; HSERDYIE at 0 range 3 .. 3; CSIRDYIE at 0 range 4 .. 4; RC48RDYIE at 0 range 5 .. 5; PLL1RDYIE at 0 range 6 .. 6; PLL2RDYIE at 0 range 7 .. 7; PLL3RDYIE at 0 range 8 .. 8; LSECSSIE at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- RCC Clock Source Interrupt Flag Register type CIFR_Register is record -- LSI ready Interrupt Flag LSIRDYF : Boolean := False; -- LSE ready Interrupt Flag LSERDYF : Boolean := False; -- HSI ready Interrupt Flag HSIRDYF : Boolean := False; -- HSE ready Interrupt Flag HSERDYF : Boolean := False; -- CSI ready Interrupt Flag CSIRDY : Boolean := False; -- RC48 ready Interrupt Flag RC48RDYF : Boolean := False; -- PLL1 ready Interrupt Flag PLL1RDYF : Boolean := False; -- PLL2 ready Interrupt Flag PLL2RDYF : Boolean := False; -- PLL3 ready Interrupt Flag PLL3RDYF : Boolean := False; -- LSE clock security system Interrupt Flag LSECSSF : Boolean := False; -- HSE clock security system Interrupt Flag HSECSSF : Boolean := False; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CIFR_Register use record LSIRDYF at 0 range 0 .. 0; LSERDYF at 0 range 1 .. 1; HSIRDYF at 0 range 2 .. 2; HSERDYF at 0 range 3 .. 3; CSIRDY at 0 range 4 .. 4; RC48RDYF at 0 range 5 .. 5; PLL1RDYF at 0 range 6 .. 6; PLL2RDYF at 0 range 7 .. 7; PLL3RDYF at 0 range 8 .. 8; LSECSSF at 0 range 9 .. 9; HSECSSF at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; -- RCC Clock Source Interrupt Clear Register type CICR_Register is record -- LSI ready Interrupt Clear LSIRDYC : Boolean := False; -- LSE ready Interrupt Clear LSERDYC : Boolean := False; -- HSI ready Interrupt Clear HSIRDYC : Boolean := False; -- HSE ready Interrupt Clear HSERDYC : Boolean := False; -- CSI ready Interrupt Clear HSE_ready_Interrupt_Clear : Boolean := False; -- RC48 ready Interrupt Clear RC48RDYC : Boolean := False; -- PLL1 ready Interrupt Clear PLL1RDYC : Boolean := False; -- PLL2 ready Interrupt Clear PLL2RDYC : Boolean := False; -- PLL3 ready Interrupt Clear PLL3RDYC : Boolean := False; -- LSE clock security system Interrupt Clear LSECSSC : Boolean := False; -- HSE clock security system Interrupt Clear HSECSSC : Boolean := False; -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CICR_Register use record LSIRDYC at 0 range 0 .. 0; LSERDYC at 0 range 1 .. 1; HSIRDYC at 0 range 2 .. 2; HSERDYC at 0 range 3 .. 3; HSE_ready_Interrupt_Clear at 0 range 4 .. 4; RC48RDYC at 0 range 5 .. 5; PLL1RDYC at 0 range 6 .. 6; PLL2RDYC at 0 range 7 .. 7; PLL3RDYC at 0 range 8 .. 8; LSECSSC at 0 range 9 .. 9; HSECSSC at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; subtype BDCR_LSEDRV_Field is HAL.UInt2; subtype BDCR_RTCSEL_Field is HAL.UInt2; -- RCC Backup Domain Control Register type BDCR_Register is record -- LSE oscillator enabled LSEON : Boolean := False; -- LSE oscillator ready LSERDY : Boolean := False; -- LSE oscillator bypass LSEBYP : Boolean := False; -- LSE oscillator driving capability LSEDRV : BDCR_LSEDRV_Field := 16#0#; -- LSE clock security system enable LSECSSON : Boolean := False; -- LSE clock security system failure detection LSECSSD : Boolean := False; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- RTC clock source selection RTCSEL : BDCR_RTCSEL_Field := 16#0#; -- unspecified Reserved_10_14 : HAL.UInt5 := 16#0#; -- RTC clock enable RTCEN : Boolean := False; -- BDRST domain software reset BDRST : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BDCR_Register use record LSEON at 0 range 0 .. 0; LSERDY at 0 range 1 .. 1; LSEBYP at 0 range 2 .. 2; LSEDRV at 0 range 3 .. 4; LSECSSON at 0 range 5 .. 5; LSECSSD at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; RTCSEL at 0 range 8 .. 9; Reserved_10_14 at 0 range 10 .. 14; RTCEN at 0 range 15 .. 15; BDRST at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- RCC Clock Control and Status Register type CSR_Register is record -- LSI oscillator enable LSION : Boolean := False; -- LSI oscillator ready LSIRDY : Boolean := False; -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CSR_Register use record LSION at 0 range 0 .. 0; LSIRDY at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; -- RCC AHB3 Reset Register type AHB3RSTR_Register is record -- MDMA block reset MDMARST : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- DMA2D block reset DMA2DRST : Boolean := False; -- JPGDEC block reset JPGDECRST : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- FMC block reset FMCRST : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QUADSPI and QUADSPI delay block reset QSPIRST : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SDMMC1 and SDMMC1 delay block reset SDMMC1RST : Boolean := False; -- unspecified Reserved_17_30 : HAL.UInt14 := 16#0#; -- CPU reset CPURST : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB3RSTR_Register use record MDMARST at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; DMA2DRST at 0 range 4 .. 4; JPGDECRST at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; FMCRST at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPIRST at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; SDMMC1RST at 0 range 16 .. 16; Reserved_17_30 at 0 range 17 .. 30; CPURST at 0 range 31 .. 31; end record; -- RCC AHB1 Peripheral Reset Register type AHB1RSTR_Register is record -- DMA1 block reset DMA1RST : Boolean := False; -- DMA2 block reset DMA2RST : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- ADC1&2 block reset ADC12RST : Boolean := False; -- unspecified Reserved_6_14 : HAL.UInt9 := 16#0#; -- ETH1MAC block reset ETH1MACRST : Boolean := False; -- unspecified Reserved_16_24 : HAL.UInt9 := 16#0#; -- USB1OTG block reset USB1OTGRST : Boolean := False; -- unspecified Reserved_26_26 : HAL.Bit := 16#0#; -- USB2OTG block reset USB2OTGRST : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB1RSTR_Register use record DMA1RST at 0 range 0 .. 0; DMA2RST at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; ADC12RST at 0 range 5 .. 5; Reserved_6_14 at 0 range 6 .. 14; ETH1MACRST at 0 range 15 .. 15; Reserved_16_24 at 0 range 16 .. 24; USB1OTGRST at 0 range 25 .. 25; Reserved_26_26 at 0 range 26 .. 26; USB2OTGRST at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- RCC AHB2 Peripheral Reset Register type AHB2RSTR_Register is record -- CAMITF block reset CAMITFRST : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- Cryptography block reset CRYPTRST : Boolean := False; -- Hash block reset HASHRST : Boolean := False; -- Random Number Generator block reset RNGRST : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- SDMMC2 and SDMMC2 Delay block reset SDMMC2RST : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB2RSTR_Register use record CAMITFRST at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; CRYPTRST at 0 range 4 .. 4; HASHRST at 0 range 5 .. 5; RNGRST at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; SDMMC2RST at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- RCC AHB4 Peripheral Reset Register type AHB4RSTR_Register is record -- GPIO block reset GPIOARST : Boolean := False; -- GPIO block reset GPIOBRST : Boolean := False; -- GPIO block reset GPIOCRST : Boolean := False; -- GPIO block reset GPIODRST : Boolean := False; -- GPIO block reset GPIOERST : Boolean := False; -- GPIO block reset GPIOFRST : Boolean := False; -- GPIO block reset GPIOGRST : Boolean := False; -- GPIO block reset GPIOHRST : Boolean := False; -- GPIO block reset GPIOIRST : Boolean := False; -- GPIO block reset GPIOJRST : Boolean := False; -- GPIO block reset GPIOKRST : Boolean := False; -- unspecified Reserved_11_18 : HAL.UInt8 := 16#0#; -- CRC block reset CRCRST : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- BDMA block reset BDMARST : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 block reset ADC3RST : Boolean := False; -- HSEM block reset HSEMRST : Boolean := False; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB4RSTR_Register use record GPIOARST at 0 range 0 .. 0; GPIOBRST at 0 range 1 .. 1; GPIOCRST at 0 range 2 .. 2; GPIODRST at 0 range 3 .. 3; GPIOERST at 0 range 4 .. 4; GPIOFRST at 0 range 5 .. 5; GPIOGRST at 0 range 6 .. 6; GPIOHRST at 0 range 7 .. 7; GPIOIRST at 0 range 8 .. 8; GPIOJRST at 0 range 9 .. 9; GPIOKRST at 0 range 10 .. 10; Reserved_11_18 at 0 range 11 .. 18; CRCRST at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; BDMARST at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3RST at 0 range 24 .. 24; HSEMRST at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; -- RCC APB3 Peripheral Reset Register type APB3RSTR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- LTDC block reset LTDCRST : Boolean := False; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB3RSTR_Register use record Reserved_0_2 at 0 range 0 .. 2; LTDCRST at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- RCC APB1 Peripheral Reset Register type APB1LRSTR_Register is record -- TIM block reset TIM2RST : Boolean := False; -- TIM block reset TIM3RST : Boolean := False; -- TIM block reset TIM4RST : Boolean := False; -- TIM block reset TIM5RST : Boolean := False; -- TIM block reset TIM6RST : Boolean := False; -- TIM block reset TIM7RST : Boolean := False; -- TIM block reset TIM12RST : Boolean := False; -- TIM block reset TIM13RST : Boolean := False; -- TIM block reset TIM14RST : Boolean := False; -- TIM block reset LPTIM1RST : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- SPI2 block reset SPI2RST : Boolean := False; -- SPI3 block reset SPI3RST : Boolean := False; -- SPDIFRX block reset SPDIFRXRST : Boolean := False; -- USART2 block reset USART2RST : Boolean := False; -- USART3 block reset USART3RST : Boolean := False; -- UART4 block reset UART4RST : Boolean := False; -- UART5 block reset UART5RST : Boolean := False; -- I2C1 block reset I2C1RST : Boolean := False; -- I2C2 block reset I2C2RST : Boolean := False; -- I2C3 block reset I2C3RST : Boolean := False; -- unspecified Reserved_24_26 : HAL.UInt3 := 16#0#; -- HDMI-CEC block reset CECRST : Boolean := False; -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- DAC1 and 2 Blocks Reset DAC12RST : Boolean := False; -- UART7 block reset UART7RST : Boolean := False; -- UART8 block reset UART8RST : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1LRSTR_Register use record TIM2RST at 0 range 0 .. 0; TIM3RST at 0 range 1 .. 1; TIM4RST at 0 range 2 .. 2; TIM5RST at 0 range 3 .. 3; TIM6RST at 0 range 4 .. 4; TIM7RST at 0 range 5 .. 5; TIM12RST at 0 range 6 .. 6; TIM13RST at 0 range 7 .. 7; TIM14RST at 0 range 8 .. 8; LPTIM1RST at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; SPI2RST at 0 range 14 .. 14; SPI3RST at 0 range 15 .. 15; SPDIFRXRST at 0 range 16 .. 16; USART2RST at 0 range 17 .. 17; USART3RST at 0 range 18 .. 18; UART4RST at 0 range 19 .. 19; UART5RST at 0 range 20 .. 20; I2C1RST at 0 range 21 .. 21; I2C2RST at 0 range 22 .. 22; I2C3RST at 0 range 23 .. 23; Reserved_24_26 at 0 range 24 .. 26; CECRST at 0 range 27 .. 27; Reserved_28_28 at 0 range 28 .. 28; DAC12RST at 0 range 29 .. 29; UART7RST at 0 range 30 .. 30; UART8RST at 0 range 31 .. 31; end record; -- RCC APB1 Peripheral Reset Register type APB1HRSTR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Clock Recovery System reset CRSRST : Boolean := False; -- SWPMI block reset SWPRST : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- OPAMP block reset OPAMPRST : Boolean := False; -- MDIOS block reset MDIOSRST : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FDCAN block reset FDCANRST : Boolean := False; -- unspecified Reserved_9_31 : HAL.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1HRSTR_Register use record Reserved_0_0 at 0 range 0 .. 0; CRSRST at 0 range 1 .. 1; SWPRST at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; OPAMPRST at 0 range 4 .. 4; MDIOSRST at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FDCANRST at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- RCC APB2 Peripheral Reset Register type APB2RSTR_Register is record -- TIM1 block reset TIM1RST : Boolean := False; -- TIM8 block reset TIM8RST : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- USART1 block reset USART1RST : Boolean := False; -- USART6 block reset USART6RST : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- SPI1 block reset SPI1RST : Boolean := False; -- SPI4 block reset SPI4RST : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- TIM15 block reset TIM15RST : Boolean := False; -- TIM16 block reset TIM16RST : Boolean := False; -- TIM17 block reset TIM17RST : Boolean := False; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPI5 block reset SPI5RST : Boolean := False; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- SAI1 block reset SAI1RST : Boolean := False; -- SAI2 block reset SAI2RST : Boolean := False; -- SAI3 block reset SAI3RST : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- DFSDM1 block reset DFSDM1RST : Boolean := False; -- HRTIM block reset HRTIMRST : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB2RSTR_Register use record TIM1RST at 0 range 0 .. 0; TIM8RST at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; USART1RST at 0 range 4 .. 4; USART6RST at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; SPI1RST at 0 range 12 .. 12; SPI4RST at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; TIM15RST at 0 range 16 .. 16; TIM16RST at 0 range 17 .. 17; TIM17RST at 0 range 18 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPI5RST at 0 range 20 .. 20; Reserved_21_21 at 0 range 21 .. 21; SAI1RST at 0 range 22 .. 22; SAI2RST at 0 range 23 .. 23; SAI3RST at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; DFSDM1RST at 0 range 28 .. 28; HRTIMRST at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB4 Peripheral Reset Register type APB4RSTR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SYSCFG block reset SYSCFGRST : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- LPUART1 block reset LPUART1RST : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 block reset SPI6RST : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 block reset I2C4RST : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 block reset LPTIM2RST : Boolean := False; -- LPTIM3 block reset LPTIM3RST : Boolean := False; -- LPTIM4 block reset LPTIM4RST : Boolean := False; -- LPTIM5 block reset LPTIM5RST : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP12 Blocks Reset COMP12RST : Boolean := False; -- VREF block reset VREFRST : Boolean := False; -- unspecified Reserved_16_20 : HAL.UInt5 := 16#0#; -- SAI4 block reset SAI4RST : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB4RSTR_Register use record Reserved_0_0 at 0 range 0 .. 0; SYSCFGRST at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; LPUART1RST at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6RST at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4RST at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2RST at 0 range 9 .. 9; LPTIM3RST at 0 range 10 .. 10; LPTIM4RST at 0 range 11 .. 11; LPTIM5RST at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12RST at 0 range 14 .. 14; VREFRST at 0 range 15 .. 15; Reserved_16_20 at 0 range 16 .. 20; SAI4RST at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- RCC Global Control Register type GCR_Register is record -- WWDG1 reset scope control WW1RSC : Boolean := False; -- unspecified Reserved_1_31 : HAL.UInt31 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for GCR_Register use record WW1RSC at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; -- RCC D3 Autonomous mode Register type D3AMR_Register is record -- BDMA and DMAMUX Autonomous mode enable BDMAAMEN : Boolean := False; -- unspecified Reserved_1_2 : HAL.UInt2 := 16#0#; -- LPUART1 Autonomous mode enable LPUART1AMEN : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 Autonomous mode enable SPI6AMEN : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 Autonomous mode enable I2C4AMEN : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 Autonomous mode enable LPTIM2AMEN : Boolean := False; -- LPTIM3 Autonomous mode enable LPTIM3AMEN : Boolean := False; -- LPTIM4 Autonomous mode enable LPTIM4AMEN : Boolean := False; -- LPTIM5 Autonomous mode enable LPTIM5AMEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP12 Autonomous mode enable COMP12AMEN : Boolean := False; -- VREF Autonomous mode enable VREFAMEN : Boolean := False; -- RTC Autonomous mode enable RTCAMEN : Boolean := False; -- unspecified Reserved_17_18 : HAL.UInt2 := 16#0#; -- CRC Autonomous mode enable CRCAMEN : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- SAI4 Autonomous mode enable SAI4AMEN : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 Autonomous mode enable ADC3AMEN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- Backup RAM Autonomous mode enable BKPRAMAMEN : Boolean := False; -- SRAM4 Autonomous mode enable SRAM4AMEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for D3AMR_Register use record BDMAAMEN at 0 range 0 .. 0; Reserved_1_2 at 0 range 1 .. 2; LPUART1AMEN at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6AMEN at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4AMEN at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2AMEN at 0 range 9 .. 9; LPTIM3AMEN at 0 range 10 .. 10; LPTIM4AMEN at 0 range 11 .. 11; LPTIM5AMEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12AMEN at 0 range 14 .. 14; VREFAMEN at 0 range 15 .. 15; RTCAMEN at 0 range 16 .. 16; Reserved_17_18 at 0 range 17 .. 18; CRCAMEN at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; SAI4AMEN at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3AMEN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; BKPRAMAMEN at 0 range 28 .. 28; SRAM4AMEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC Reset Status Register type RSR_Register is record -- unspecified Reserved_0_15 : HAL.UInt16 := 16#0#; -- Remove reset flag RMVF : Boolean := False; -- CPU reset flag CPURSTF : Boolean := False; -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- D1 domain power switch reset flag D1RSTF : Boolean := False; -- D2 domain power switch reset flag D2RSTF : Boolean := False; -- BOR reset flag BORRSTF : Boolean := False; -- Pin reset flag (NRST) PINRSTF : Boolean := False; -- POR/PDR reset flag PORRSTF : Boolean := False; -- System reset from CPU reset flag SFTRSTF : Boolean := False; -- unspecified Reserved_25_25 : HAL.Bit := 16#0#; -- Independent Watchdog reset flag IWDG1RSTF : Boolean := False; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- Window Watchdog reset flag WWDG1RSTF : Boolean := False; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- Reset due to illegal D1 DStandby or CPU CStop flag LPWRRSTF : Boolean := False; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RSR_Register use record Reserved_0_15 at 0 range 0 .. 15; RMVF at 0 range 16 .. 16; CPURSTF at 0 range 17 .. 17; Reserved_18_18 at 0 range 18 .. 18; D1RSTF at 0 range 19 .. 19; D2RSTF at 0 range 20 .. 20; BORRSTF at 0 range 21 .. 21; PINRSTF at 0 range 22 .. 22; PORRSTF at 0 range 23 .. 23; SFTRSTF at 0 range 24 .. 24; Reserved_25_25 at 0 range 25 .. 25; IWDG1RSTF at 0 range 26 .. 26; Reserved_27_27 at 0 range 27 .. 27; WWDG1RSTF at 0 range 28 .. 28; Reserved_29_29 at 0 range 29 .. 29; LPWRRSTF at 0 range 30 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; -- RCC AHB3 Clock Register type AHB3ENR_Register is record -- MDMA Peripheral Clock Enable MDMAEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- DMA2D Peripheral Clock Enable DMA2DEN : Boolean := False; -- JPGDEC Peripheral Clock Enable JPGDECEN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- FMC Peripheral Clocks Enable FMCEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QUADSPI and QUADSPI Delay Clock Enable QSPIEN : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SDMMC1 and SDMMC1 Delay Clock Enable SDMMC1EN : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB3ENR_Register use record MDMAEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; DMA2DEN at 0 range 4 .. 4; JPGDECEN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; FMCEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPIEN at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; SDMMC1EN at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- RCC AHB1 Clock Register type AHB1ENR_Register is record -- DMA1 Clock Enable DMA1EN : Boolean := False; -- DMA2 Clock Enable DMA2EN : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- ADC1/2 Peripheral Clocks Enable ADC12EN : Boolean := False; -- unspecified Reserved_6_14 : HAL.UInt9 := 16#0#; -- Ethernet MAC bus interface Clock Enable ETH1MACEN : Boolean := False; -- Ethernet Transmission Clock Enable ETH1TXEN : Boolean := False; -- Ethernet Reception Clock Enable ETH1RXEN : Boolean := False; -- Enable USB_PHY2 clocks USB2OTGHSULPIEN : Boolean := False; -- unspecified Reserved_19_24 : HAL.UInt6 := 16#0#; -- USB1OTG Peripheral Clocks Enable USB1OTGEN : Boolean := False; -- USB_PHY1 Clocks Enable USB1ULPIEN : Boolean := False; -- USB2OTG Peripheral Clocks Enable USB2OTGEN : Boolean := False; -- USB_PHY2 Clocks Enable USB2ULPIEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB1ENR_Register use record DMA1EN at 0 range 0 .. 0; DMA2EN at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; ADC12EN at 0 range 5 .. 5; Reserved_6_14 at 0 range 6 .. 14; ETH1MACEN at 0 range 15 .. 15; ETH1TXEN at 0 range 16 .. 16; ETH1RXEN at 0 range 17 .. 17; USB2OTGHSULPIEN at 0 range 18 .. 18; Reserved_19_24 at 0 range 19 .. 24; USB1OTGEN at 0 range 25 .. 25; USB1ULPIEN at 0 range 26 .. 26; USB2OTGEN at 0 range 27 .. 27; USB2ULPIEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC AHB2 Clock Register type AHB2ENR_Register is record -- CAMITF peripheral clock enable CAMITFEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- CRYPT peripheral clock enable CRYPTEN : Boolean := False; -- HASH peripheral clock enable HASHEN : Boolean := False; -- RNG peripheral clocks enable RNGEN : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- SDMMC2 and SDMMC2 delay clock enable SDMMC2EN : Boolean := False; -- unspecified Reserved_10_28 : HAL.UInt19 := 16#0#; -- SRAM1 block enable SRAM1EN : Boolean := False; -- SRAM2 block enable SRAM2EN : Boolean := False; -- SRAM3 block enable SRAM3EN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB2ENR_Register use record CAMITFEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; CRYPTEN at 0 range 4 .. 4; HASHEN at 0 range 5 .. 5; RNGEN at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; SDMMC2EN at 0 range 9 .. 9; Reserved_10_28 at 0 range 10 .. 28; SRAM1EN at 0 range 29 .. 29; SRAM2EN at 0 range 30 .. 30; SRAM3EN at 0 range 31 .. 31; end record; -- RCC AHB4 Clock Register type AHB4ENR_Register is record -- 0GPIO peripheral clock enable GPIOAEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOBEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOCEN : Boolean := False; -- 0GPIO peripheral clock enable GPIODEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOEEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOFEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOGEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOHEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOIEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOJEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOKEN : Boolean := False; -- unspecified Reserved_11_18 : HAL.UInt8 := 16#0#; -- CRC peripheral clock enable CRCEN : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- BDMA and DMAMUX2 Clock Enable BDMAEN : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 Peripheral Clocks Enable ADC3EN : Boolean := False; -- HSEM peripheral clock enable HSEMEN : Boolean := False; -- unspecified Reserved_26_27 : HAL.UInt2 := 16#0#; -- Backup RAM Clock Enable BKPRAMEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB4ENR_Register use record GPIOAEN at 0 range 0 .. 0; GPIOBEN at 0 range 1 .. 1; GPIOCEN at 0 range 2 .. 2; GPIODEN at 0 range 3 .. 3; GPIOEEN at 0 range 4 .. 4; GPIOFEN at 0 range 5 .. 5; GPIOGEN at 0 range 6 .. 6; GPIOHEN at 0 range 7 .. 7; GPIOIEN at 0 range 8 .. 8; GPIOJEN at 0 range 9 .. 9; GPIOKEN at 0 range 10 .. 10; Reserved_11_18 at 0 range 11 .. 18; CRCEN at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; BDMAEN at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3EN at 0 range 24 .. 24; HSEMEN at 0 range 25 .. 25; Reserved_26_27 at 0 range 26 .. 27; BKPRAMEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC APB3 Clock Register type APB3ENR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- LTDC peripheral clock enable LTDCEN : Boolean := False; -- unspecified Reserved_4_5 : HAL.UInt2 := 16#0#; -- WWDG1 Clock Enable WWDG1EN : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB3ENR_Register use record Reserved_0_2 at 0 range 0 .. 2; LTDCEN at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; WWDG1EN at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- RCC APB1 Clock Register type APB1LENR_Register is record -- TIM peripheral clock enable TIM2EN : Boolean := False; -- TIM peripheral clock enable TIM3EN : Boolean := False; -- TIM peripheral clock enable TIM4EN : Boolean := False; -- TIM peripheral clock enable TIM5EN : Boolean := False; -- TIM peripheral clock enable TIM6EN : Boolean := False; -- TIM peripheral clock enable TIM7EN : Boolean := False; -- TIM peripheral clock enable TIM12EN : Boolean := False; -- TIM peripheral clock enable TIM13EN : Boolean := False; -- TIM peripheral clock enable TIM14EN : Boolean := False; -- LPTIM1 Peripheral Clocks Enable LPTIM1EN : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- SPI2 Peripheral Clocks Enable SPI2EN : Boolean := False; -- SPI3 Peripheral Clocks Enable SPI3EN : Boolean := False; -- SPDIFRX Peripheral Clocks Enable SPDIFRXEN : Boolean := False; -- USART2 Peripheral Clocks Enable USART2EN : Boolean := False; -- USART3 Peripheral Clocks Enable USART3EN : Boolean := False; -- UART4 Peripheral Clocks Enable UART4EN : Boolean := False; -- UART5 Peripheral Clocks Enable UART5EN : Boolean := False; -- I2C1 Peripheral Clocks Enable I2C1EN : Boolean := False; -- I2C2 Peripheral Clocks Enable I2C2EN : Boolean := False; -- I2C3 Peripheral Clocks Enable I2C3EN : Boolean := False; -- unspecified Reserved_24_26 : HAL.UInt3 := 16#0#; -- HDMI-CEC peripheral clock enable CECEN : Boolean := False; -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- DAC1&2 peripheral clock enable DAC12EN : Boolean := False; -- UART7 Peripheral Clocks Enable UART7EN : Boolean := False; -- UART8 Peripheral Clocks Enable UART8EN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1LENR_Register use record TIM2EN at 0 range 0 .. 0; TIM3EN at 0 range 1 .. 1; TIM4EN at 0 range 2 .. 2; TIM5EN at 0 range 3 .. 3; TIM6EN at 0 range 4 .. 4; TIM7EN at 0 range 5 .. 5; TIM12EN at 0 range 6 .. 6; TIM13EN at 0 range 7 .. 7; TIM14EN at 0 range 8 .. 8; LPTIM1EN at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; SPI2EN at 0 range 14 .. 14; SPI3EN at 0 range 15 .. 15; SPDIFRXEN at 0 range 16 .. 16; USART2EN at 0 range 17 .. 17; USART3EN at 0 range 18 .. 18; UART4EN at 0 range 19 .. 19; UART5EN at 0 range 20 .. 20; I2C1EN at 0 range 21 .. 21; I2C2EN at 0 range 22 .. 22; I2C3EN at 0 range 23 .. 23; Reserved_24_26 at 0 range 24 .. 26; CECEN at 0 range 27 .. 27; Reserved_28_28 at 0 range 28 .. 28; DAC12EN at 0 range 29 .. 29; UART7EN at 0 range 30 .. 30; UART8EN at 0 range 31 .. 31; end record; -- RCC APB1 Clock Register type APB1HENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Clock Recovery System peripheral clock enable CRSEN : Boolean := False; -- SWPMI Peripheral Clocks Enable SWPEN : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- OPAMP peripheral clock enable OPAMPEN : Boolean := False; -- MDIOS peripheral clock enable MDIOSEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FDCAN Peripheral Clocks Enable FDCANEN : Boolean := False; -- unspecified Reserved_9_31 : HAL.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1HENR_Register use record Reserved_0_0 at 0 range 0 .. 0; CRSEN at 0 range 1 .. 1; SWPEN at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; OPAMPEN at 0 range 4 .. 4; MDIOSEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FDCANEN at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- RCC APB2 Clock Register type APB2ENR_Register is record -- TIM1 peripheral clock enable TIM1EN : Boolean := False; -- TIM8 peripheral clock enable TIM8EN : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- USART1 Peripheral Clocks Enable USART1EN : Boolean := False; -- USART6 Peripheral Clocks Enable USART6EN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- SPI1 Peripheral Clocks Enable SPI1EN : Boolean := False; -- SPI4 Peripheral Clocks Enable SPI4EN : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- TIM15 peripheral clock enable TIM15EN : Boolean := False; -- TIM16 peripheral clock enable TIM16EN : Boolean := False; -- TIM17 peripheral clock enable TIM17EN : Boolean := False; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPI5 Peripheral Clocks Enable SPI5EN : Boolean := False; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- SAI1 Peripheral Clocks Enable SAI1EN : Boolean := False; -- SAI2 Peripheral Clocks Enable SAI2EN : Boolean := False; -- SAI3 Peripheral Clocks Enable SAI3EN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- DFSDM1 Peripheral Clocks Enable DFSDM1EN : Boolean := False; -- HRTIM peripheral clock enable HRTIMEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB2ENR_Register use record TIM1EN at 0 range 0 .. 0; TIM8EN at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; USART1EN at 0 range 4 .. 4; USART6EN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; SPI1EN at 0 range 12 .. 12; SPI4EN at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; TIM15EN at 0 range 16 .. 16; TIM16EN at 0 range 17 .. 17; TIM17EN at 0 range 18 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPI5EN at 0 range 20 .. 20; Reserved_21_21 at 0 range 21 .. 21; SAI1EN at 0 range 22 .. 22; SAI2EN at 0 range 23 .. 23; SAI3EN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; DFSDM1EN at 0 range 28 .. 28; HRTIMEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB4 Clock Register type APB4ENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SYSCFG peripheral clock enable SYSCFGEN : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- LPUART1 Peripheral Clocks Enable LPUART1EN : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 Peripheral Clocks Enable SPI6EN : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 Peripheral Clocks Enable I2C4EN : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 Peripheral Clocks Enable LPTIM2EN : Boolean := False; -- LPTIM3 Peripheral Clocks Enable LPTIM3EN : Boolean := False; -- LPTIM4 Peripheral Clocks Enable LPTIM4EN : Boolean := False; -- LPTIM5 Peripheral Clocks Enable LPTIM5EN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP1/2 peripheral clock enable COMP12EN : Boolean := False; -- VREF peripheral clock enable VREFEN : Boolean := False; -- RTC APB Clock Enable RTCAPBEN : Boolean := False; -- unspecified Reserved_17_20 : HAL.UInt4 := 16#0#; -- SAI4 Peripheral Clocks Enable SAI4EN : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB4ENR_Register use record Reserved_0_0 at 0 range 0 .. 0; SYSCFGEN at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; LPUART1EN at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6EN at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4EN at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2EN at 0 range 9 .. 9; LPTIM3EN at 0 range 10 .. 10; LPTIM4EN at 0 range 11 .. 11; LPTIM5EN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12EN at 0 range 14 .. 14; VREFEN at 0 range 15 .. 15; RTCAPBEN at 0 range 16 .. 16; Reserved_17_20 at 0 range 17 .. 20; SAI4EN at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- RCC AHB3 Sleep Clock Register type AHB3LPENR_Register is record -- MDMA Clock Enable During CSleep Mode MDMALPEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- DMA2D Clock Enable During CSleep Mode DMA2DLPEN : Boolean := False; -- JPGDEC Clock Enable During CSleep Mode JPGDECLPEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FLITF Clock Enable During CSleep Mode FLASHLPEN : Boolean := False; -- unspecified Reserved_9_11 : HAL.UInt3 := 16#0#; -- FMC Peripheral Clocks Enable During CSleep Mode FMCLPEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QUADSPI and QUADSPI Delay Clock Enable During CSleep Mode QSPILPEN : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SDMMC1 and SDMMC1 Delay Clock Enable During CSleep Mode SDMMC1LPEN : Boolean := False; -- unspecified Reserved_17_27 : HAL.UInt11 := 16#0#; -- D1DTCM1 Block Clock Enable During CSleep mode D1DTCM1LPEN : Boolean := False; -- D1 DTCM2 Block Clock Enable During CSleep mode DTCM2LPEN : Boolean := False; -- D1ITCM Block Clock Enable During CSleep mode ITCMLPEN : Boolean := False; -- AXISRAM Block Clock Enable During CSleep mode AXISRAMLPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB3LPENR_Register use record MDMALPEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; DMA2DLPEN at 0 range 4 .. 4; JPGDECLPEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FLASHLPEN at 0 range 8 .. 8; Reserved_9_11 at 0 range 9 .. 11; FMCLPEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPILPEN at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; SDMMC1LPEN at 0 range 16 .. 16; Reserved_17_27 at 0 range 17 .. 27; D1DTCM1LPEN at 0 range 28 .. 28; DTCM2LPEN at 0 range 29 .. 29; ITCMLPEN at 0 range 30 .. 30; AXISRAMLPEN at 0 range 31 .. 31; end record; -- RCC AHB1 Sleep Clock Register type AHB1LPENR_Register is record -- DMA1 Clock Enable During CSleep Mode DMA1LPEN : Boolean := False; -- DMA2 Clock Enable During CSleep Mode DMA2LPEN : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- ADC1/2 Peripheral Clocks Enable During CSleep Mode ADC12LPEN : Boolean := False; -- unspecified Reserved_6_14 : HAL.UInt9 := 16#0#; -- Ethernet MAC bus interface Clock Enable During CSleep Mode ETH1MACLPEN : Boolean := False; -- Ethernet Transmission Clock Enable During CSleep Mode ETH1TXLPEN : Boolean := False; -- Ethernet Reception Clock Enable During CSleep Mode ETH1RXLPEN : Boolean := False; -- unspecified Reserved_18_24 : HAL.UInt7 := 16#0#; -- USB1OTG peripheral clock enable during CSleep mode USB1OTGHSLPEN : Boolean := False; -- USB_PHY1 clock enable during CSleep mode USB1OTGHSULPILPEN : Boolean := False; -- USB2OTG peripheral clock enable during CSleep mode USB2OTGHSLPEN : Boolean := False; -- USB_PHY2 clocks enable during CSleep mode USB2OTGHSULPILPEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB1LPENR_Register use record DMA1LPEN at 0 range 0 .. 0; DMA2LPEN at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; ADC12LPEN at 0 range 5 .. 5; Reserved_6_14 at 0 range 6 .. 14; ETH1MACLPEN at 0 range 15 .. 15; ETH1TXLPEN at 0 range 16 .. 16; ETH1RXLPEN at 0 range 17 .. 17; Reserved_18_24 at 0 range 18 .. 24; USB1OTGHSLPEN at 0 range 25 .. 25; USB1OTGHSULPILPEN at 0 range 26 .. 26; USB2OTGHSLPEN at 0 range 27 .. 27; USB2OTGHSULPILPEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC AHB2 Sleep Clock Register type AHB2LPENR_Register is record -- CAMITF peripheral clock enable during CSleep mode CAMITFLPEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- CRYPT peripheral clock enable during CSleep mode CRYPTLPEN : Boolean := False; -- HASH peripheral clock enable during CSleep mode HASHLPEN : Boolean := False; -- RNG peripheral clock enable during CSleep mode RNGLPEN : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- SDMMC2 and SDMMC2 Delay Clock Enable During CSleep Mode SDMMC2LPEN : Boolean := False; -- unspecified Reserved_10_28 : HAL.UInt19 := 16#0#; -- SRAM1 Clock Enable During CSleep Mode SRAM1LPEN : Boolean := False; -- SRAM2 Clock Enable During CSleep Mode SRAM2LPEN : Boolean := False; -- SRAM3 Clock Enable During CSleep Mode SRAM3LPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB2LPENR_Register use record CAMITFLPEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; CRYPTLPEN at 0 range 4 .. 4; HASHLPEN at 0 range 5 .. 5; RNGLPEN at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; SDMMC2LPEN at 0 range 9 .. 9; Reserved_10_28 at 0 range 10 .. 28; SRAM1LPEN at 0 range 29 .. 29; SRAM2LPEN at 0 range 30 .. 30; SRAM3LPEN at 0 range 31 .. 31; end record; -- RCC AHB4 Sleep Clock Register type AHB4LPENR_Register is record -- GPIO peripheral clock enable during CSleep mode GPIOALPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOBLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOCLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIODLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOELPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOFLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOGLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOHLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOILPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOJLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOKLPEN : Boolean := False; -- unspecified Reserved_11_18 : HAL.UInt8 := 16#0#; -- CRC peripheral clock enable during CSleep mode CRCLPEN : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- BDMA Clock Enable During CSleep Mode BDMALPEN : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 Peripheral Clocks Enable During CSleep Mode ADC3LPEN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- Backup RAM Clock Enable During CSleep Mode BKPRAMLPEN : Boolean := False; -- SRAM4 Clock Enable During CSleep Mode SRAM4LPEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for AHB4LPENR_Register use record GPIOALPEN at 0 range 0 .. 0; GPIOBLPEN at 0 range 1 .. 1; GPIOCLPEN at 0 range 2 .. 2; GPIODLPEN at 0 range 3 .. 3; GPIOELPEN at 0 range 4 .. 4; GPIOFLPEN at 0 range 5 .. 5; GPIOGLPEN at 0 range 6 .. 6; GPIOHLPEN at 0 range 7 .. 7; GPIOILPEN at 0 range 8 .. 8; GPIOJLPEN at 0 range 9 .. 9; GPIOKLPEN at 0 range 10 .. 10; Reserved_11_18 at 0 range 11 .. 18; CRCLPEN at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; BDMALPEN at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3LPEN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; BKPRAMLPEN at 0 range 28 .. 28; SRAM4LPEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB3 Sleep Clock Register type APB3LPENR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- LTDC peripheral clock enable during CSleep mode LTDCLPEN : Boolean := False; -- unspecified Reserved_4_5 : HAL.UInt2 := 16#0#; -- WWDG1 Clock Enable During CSleep Mode WWDG1LPEN : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB3LPENR_Register use record Reserved_0_2 at 0 range 0 .. 2; LTDCLPEN at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; WWDG1LPEN at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- RCC APB1 Low Sleep Clock Register type APB1LLPENR_Register is record -- TIM2 peripheral clock enable during CSleep mode TIM2LPEN : Boolean := False; -- TIM3 peripheral clock enable during CSleep mode TIM3LPEN : Boolean := False; -- TIM4 peripheral clock enable during CSleep mode TIM4LPEN : Boolean := False; -- TIM5 peripheral clock enable during CSleep mode TIM5LPEN : Boolean := False; -- TIM6 peripheral clock enable during CSleep mode TIM6LPEN : Boolean := False; -- TIM7 peripheral clock enable during CSleep mode TIM7LPEN : Boolean := False; -- TIM12 peripheral clock enable during CSleep mode TIM12LPEN : Boolean := False; -- TIM13 peripheral clock enable during CSleep mode TIM13LPEN : Boolean := False; -- TIM14 peripheral clock enable during CSleep mode TIM14LPEN : Boolean := False; -- LPTIM1 Peripheral Clocks Enable During CSleep Mode LPTIM1LPEN : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- SPI2 Peripheral Clocks Enable During CSleep Mode SPI2LPEN : Boolean := False; -- SPI3 Peripheral Clocks Enable During CSleep Mode SPI3LPEN : Boolean := False; -- SPDIFRX Peripheral Clocks Enable During CSleep Mode SPDIFRXLPEN : Boolean := False; -- USART2 Peripheral Clocks Enable During CSleep Mode USART2LPEN : Boolean := False; -- USART3 Peripheral Clocks Enable During CSleep Mode USART3LPEN : Boolean := False; -- UART4 Peripheral Clocks Enable During CSleep Mode UART4LPEN : Boolean := False; -- UART5 Peripheral Clocks Enable During CSleep Mode UART5LPEN : Boolean := False; -- I2C1 Peripheral Clocks Enable During CSleep Mode I2C1LPEN : Boolean := False; -- I2C2 Peripheral Clocks Enable During CSleep Mode I2C2LPEN : Boolean := False; -- I2C3 Peripheral Clocks Enable During CSleep Mode I2C3LPEN : Boolean := False; -- unspecified Reserved_24_26 : HAL.UInt3 := 16#0#; -- HDMI-CEC Peripheral Clocks Enable During CSleep Mode HDMICECLPEN : Boolean := False; -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- DAC1/2 peripheral clock enable during CSleep mode DAC12LPEN : Boolean := False; -- UART7 Peripheral Clocks Enable During CSleep Mode UART7LPEN : Boolean := False; -- UART8 Peripheral Clocks Enable During CSleep Mode UART8LPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1LLPENR_Register use record TIM2LPEN at 0 range 0 .. 0; TIM3LPEN at 0 range 1 .. 1; TIM4LPEN at 0 range 2 .. 2; TIM5LPEN at 0 range 3 .. 3; TIM6LPEN at 0 range 4 .. 4; TIM7LPEN at 0 range 5 .. 5; TIM12LPEN at 0 range 6 .. 6; TIM13LPEN at 0 range 7 .. 7; TIM14LPEN at 0 range 8 .. 8; LPTIM1LPEN at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; SPI2LPEN at 0 range 14 .. 14; SPI3LPEN at 0 range 15 .. 15; SPDIFRXLPEN at 0 range 16 .. 16; USART2LPEN at 0 range 17 .. 17; USART3LPEN at 0 range 18 .. 18; UART4LPEN at 0 range 19 .. 19; UART5LPEN at 0 range 20 .. 20; I2C1LPEN at 0 range 21 .. 21; I2C2LPEN at 0 range 22 .. 22; I2C3LPEN at 0 range 23 .. 23; Reserved_24_26 at 0 range 24 .. 26; HDMICECLPEN at 0 range 27 .. 27; Reserved_28_28 at 0 range 28 .. 28; DAC12LPEN at 0 range 29 .. 29; UART7LPEN at 0 range 30 .. 30; UART8LPEN at 0 range 31 .. 31; end record; -- RCC APB1 High Sleep Clock Register type APB1HLPENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Clock Recovery System peripheral clock enable during CSleep mode CRSLPEN : Boolean := False; -- SWPMI Peripheral Clocks Enable During CSleep Mode SWPLPEN : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- OPAMP peripheral clock enable during CSleep mode OPAMPLPEN : Boolean := False; -- MDIOS peripheral clock enable during CSleep mode MDIOSLPEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FDCAN Peripheral Clocks Enable During CSleep Mode FDCANLPEN : Boolean := False; -- unspecified Reserved_9_31 : HAL.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB1HLPENR_Register use record Reserved_0_0 at 0 range 0 .. 0; CRSLPEN at 0 range 1 .. 1; SWPLPEN at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; OPAMPLPEN at 0 range 4 .. 4; MDIOSLPEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FDCANLPEN at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- RCC APB2 Sleep Clock Register type APB2LPENR_Register is record -- TIM1 peripheral clock enable during CSleep mode TIM1LPEN : Boolean := False; -- TIM8 peripheral clock enable during CSleep mode TIM8LPEN : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- USART1 Peripheral Clocks Enable During CSleep Mode USART1LPEN : Boolean := False; -- USART6 Peripheral Clocks Enable During CSleep Mode USART6LPEN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- SPI1 Peripheral Clocks Enable During CSleep Mode SPI1LPEN : Boolean := False; -- SPI4 Peripheral Clocks Enable During CSleep Mode SPI4LPEN : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- TIM15 peripheral clock enable during CSleep mode TIM15LPEN : Boolean := False; -- TIM16 peripheral clock enable during CSleep mode TIM16LPEN : Boolean := False; -- TIM17 peripheral clock enable during CSleep mode TIM17LPEN : Boolean := False; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPI5 Peripheral Clocks Enable During CSleep Mode SPI5LPEN : Boolean := False; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- SAI1 Peripheral Clocks Enable During CSleep Mode SAI1LPEN : Boolean := False; -- SAI2 Peripheral Clocks Enable During CSleep Mode SAI2LPEN : Boolean := False; -- SAI3 Peripheral Clocks Enable During CSleep Mode SAI3LPEN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- DFSDM1 Peripheral Clocks Enable During CSleep Mode DFSDM1LPEN : Boolean := False; -- HRTIM peripheral clock enable during CSleep mode HRTIMLPEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB2LPENR_Register use record TIM1LPEN at 0 range 0 .. 0; TIM8LPEN at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; USART1LPEN at 0 range 4 .. 4; USART6LPEN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; SPI1LPEN at 0 range 12 .. 12; SPI4LPEN at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; TIM15LPEN at 0 range 16 .. 16; TIM16LPEN at 0 range 17 .. 17; TIM17LPEN at 0 range 18 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPI5LPEN at 0 range 20 .. 20; Reserved_21_21 at 0 range 21 .. 21; SAI1LPEN at 0 range 22 .. 22; SAI2LPEN at 0 range 23 .. 23; SAI3LPEN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; DFSDM1LPEN at 0 range 28 .. 28; HRTIMLPEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB4 Sleep Clock Register type APB4LPENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SYSCFG peripheral clock enable during CSleep mode SYSCFGLPEN : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- LPUART1 Peripheral Clocks Enable During CSleep Mode LPUART1LPEN : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 Peripheral Clocks Enable During CSleep Mode SPI6LPEN : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 Peripheral Clocks Enable During CSleep Mode I2C4LPEN : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 Peripheral Clocks Enable During CSleep Mode LPTIM2LPEN : Boolean := False; -- LPTIM3 Peripheral Clocks Enable During CSleep Mode LPTIM3LPEN : Boolean := False; -- LPTIM4 Peripheral Clocks Enable During CSleep Mode LPTIM4LPEN : Boolean := False; -- LPTIM5 Peripheral Clocks Enable During CSleep Mode LPTIM5LPEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP1/2 peripheral clock enable during CSleep mode COMP12LPEN : Boolean := False; -- VREF peripheral clock enable during CSleep mode VREFLPEN : Boolean := False; -- RTC APB Clock Enable During CSleep Mode RTCAPBLPEN : Boolean := False; -- unspecified Reserved_17_20 : HAL.UInt4 := 16#0#; -- SAI4 Peripheral Clocks Enable During CSleep Mode SAI4LPEN : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for APB4LPENR_Register use record Reserved_0_0 at 0 range 0 .. 0; SYSCFGLPEN at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; LPUART1LPEN at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6LPEN at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4LPEN at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2LPEN at 0 range 9 .. 9; LPTIM3LPEN at 0 range 10 .. 10; LPTIM4LPEN at 0 range 11 .. 11; LPTIM5LPEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12LPEN at 0 range 14 .. 14; VREFLPEN at 0 range 15 .. 15; RTCAPBLPEN at 0 range 16 .. 16; Reserved_17_20 at 0 range 17 .. 20; SAI4LPEN at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- RCC Reset Status Register type C1_RSR_Register is record -- unspecified Reserved_0_15 : HAL.UInt16 := 16#0#; -- Remove reset flag RMVF : Boolean := False; -- CPU reset flag CPURSTF : Boolean := False; -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- D1 domain power switch reset flag D1RSTF : Boolean := False; -- D2 domain power switch reset flag D2RSTF : Boolean := False; -- BOR reset flag BORRSTF : Boolean := False; -- Pin reset flag (NRST) PINRSTF : Boolean := False; -- POR/PDR reset flag PORRSTF : Boolean := False; -- System reset from CPU reset flag SFTRSTF : Boolean := False; -- unspecified Reserved_25_25 : HAL.Bit := 16#0#; -- Independent Watchdog reset flag IWDG1RSTF : Boolean := False; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- Window Watchdog reset flag WWDG1RSTF : Boolean := False; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- Reset due to illegal D1 DStandby or CPU CStop flag LPWRRSTF : Boolean := False; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_RSR_Register use record Reserved_0_15 at 0 range 0 .. 15; RMVF at 0 range 16 .. 16; CPURSTF at 0 range 17 .. 17; Reserved_18_18 at 0 range 18 .. 18; D1RSTF at 0 range 19 .. 19; D2RSTF at 0 range 20 .. 20; BORRSTF at 0 range 21 .. 21; PINRSTF at 0 range 22 .. 22; PORRSTF at 0 range 23 .. 23; SFTRSTF at 0 range 24 .. 24; Reserved_25_25 at 0 range 25 .. 25; IWDG1RSTF at 0 range 26 .. 26; Reserved_27_27 at 0 range 27 .. 27; WWDG1RSTF at 0 range 28 .. 28; Reserved_29_29 at 0 range 29 .. 29; LPWRRSTF at 0 range 30 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; -- RCC AHB3 Clock Register type C1_AHB3ENR_Register is record -- MDMA Peripheral Clock Enable MDMAEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- DMA2D Peripheral Clock Enable DMA2DEN : Boolean := False; -- JPGDEC Peripheral Clock Enable JPGDECEN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- FMC Peripheral Clocks Enable FMCEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QUADSPI and QUADSPI Delay Clock Enable QSPIEN : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SDMMC1 and SDMMC1 Delay Clock Enable SDMMC1EN : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB3ENR_Register use record MDMAEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; DMA2DEN at 0 range 4 .. 4; JPGDECEN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; FMCEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPIEN at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; SDMMC1EN at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- RCC AHB1 Clock Register type C1_AHB1ENR_Register is record -- DMA1 Clock Enable DMA1EN : Boolean := False; -- DMA2 Clock Enable DMA2EN : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- ADC1/2 Peripheral Clocks Enable ADC12EN : Boolean := False; -- unspecified Reserved_6_14 : HAL.UInt9 := 16#0#; -- Ethernet MAC bus interface Clock Enable ETH1MACEN : Boolean := False; -- Ethernet Transmission Clock Enable ETH1TXEN : Boolean := False; -- Ethernet Reception Clock Enable ETH1RXEN : Boolean := False; -- unspecified Reserved_18_24 : HAL.UInt7 := 16#0#; -- USB1OTG Peripheral Clocks Enable USB1OTGEN : Boolean := False; -- USB_PHY1 Clocks Enable USB1ULPIEN : Boolean := False; -- USB2OTG Peripheral Clocks Enable USB2OTGEN : Boolean := False; -- USB_PHY2 Clocks Enable USB2ULPIEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB1ENR_Register use record DMA1EN at 0 range 0 .. 0; DMA2EN at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; ADC12EN at 0 range 5 .. 5; Reserved_6_14 at 0 range 6 .. 14; ETH1MACEN at 0 range 15 .. 15; ETH1TXEN at 0 range 16 .. 16; ETH1RXEN at 0 range 17 .. 17; Reserved_18_24 at 0 range 18 .. 24; USB1OTGEN at 0 range 25 .. 25; USB1ULPIEN at 0 range 26 .. 26; USB2OTGEN at 0 range 27 .. 27; USB2ULPIEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC AHB2 Clock Register type C1_AHB2ENR_Register is record -- CAMITF peripheral clock enable CAMITFEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- CRYPT peripheral clock enable CRYPTEN : Boolean := False; -- HASH peripheral clock enable HASHEN : Boolean := False; -- RNG peripheral clocks enable RNGEN : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- SDMMC2 and SDMMC2 delay clock enable SDMMC2EN : Boolean := False; -- unspecified Reserved_10_28 : HAL.UInt19 := 16#0#; -- SRAM1 block enable SRAM1EN : Boolean := False; -- SRAM2 block enable SRAM2EN : Boolean := False; -- SRAM3 block enable SRAM3EN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB2ENR_Register use record CAMITFEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; CRYPTEN at 0 range 4 .. 4; HASHEN at 0 range 5 .. 5; RNGEN at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; SDMMC2EN at 0 range 9 .. 9; Reserved_10_28 at 0 range 10 .. 28; SRAM1EN at 0 range 29 .. 29; SRAM2EN at 0 range 30 .. 30; SRAM3EN at 0 range 31 .. 31; end record; -- RCC AHB4 Clock Register type C1_AHB4ENR_Register is record -- 0GPIO peripheral clock enable GPIOAEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOBEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOCEN : Boolean := False; -- 0GPIO peripheral clock enable GPIODEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOEEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOFEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOGEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOHEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOIEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOJEN : Boolean := False; -- 0GPIO peripheral clock enable GPIOKEN : Boolean := False; -- unspecified Reserved_11_18 : HAL.UInt8 := 16#0#; -- CRC peripheral clock enable CRCEN : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- BDMA and DMAMUX2 Clock Enable BDMAEN : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 Peripheral Clocks Enable ADC3EN : Boolean := False; -- HSEM peripheral clock enable HSEMEN : Boolean := False; -- unspecified Reserved_26_27 : HAL.UInt2 := 16#0#; -- Backup RAM Clock Enable BKPRAMEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB4ENR_Register use record GPIOAEN at 0 range 0 .. 0; GPIOBEN at 0 range 1 .. 1; GPIOCEN at 0 range 2 .. 2; GPIODEN at 0 range 3 .. 3; GPIOEEN at 0 range 4 .. 4; GPIOFEN at 0 range 5 .. 5; GPIOGEN at 0 range 6 .. 6; GPIOHEN at 0 range 7 .. 7; GPIOIEN at 0 range 8 .. 8; GPIOJEN at 0 range 9 .. 9; GPIOKEN at 0 range 10 .. 10; Reserved_11_18 at 0 range 11 .. 18; CRCEN at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; BDMAEN at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3EN at 0 range 24 .. 24; HSEMEN at 0 range 25 .. 25; Reserved_26_27 at 0 range 26 .. 27; BKPRAMEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC APB3 Clock Register type C1_APB3ENR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- LTDC peripheral clock enable LTDCEN : Boolean := False; -- unspecified Reserved_4_5 : HAL.UInt2 := 16#0#; -- WWDG1 Clock Enable WWDG1EN : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB3ENR_Register use record Reserved_0_2 at 0 range 0 .. 2; LTDCEN at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; WWDG1EN at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- RCC APB1 Clock Register type C1_APB1LENR_Register is record -- TIM peripheral clock enable TIM2EN : Boolean := False; -- TIM peripheral clock enable TIM3EN : Boolean := False; -- TIM peripheral clock enable TIM4EN : Boolean := False; -- TIM peripheral clock enable TIM5EN : Boolean := False; -- TIM peripheral clock enable TIM6EN : Boolean := False; -- TIM peripheral clock enable TIM7EN : Boolean := False; -- TIM peripheral clock enable TIM12EN : Boolean := False; -- TIM peripheral clock enable TIM13EN : Boolean := False; -- TIM peripheral clock enable TIM14EN : Boolean := False; -- LPTIM1 Peripheral Clocks Enable LPTIM1EN : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- SPI2 Peripheral Clocks Enable SPI2EN : Boolean := False; -- SPI3 Peripheral Clocks Enable SPI3EN : Boolean := False; -- SPDIFRX Peripheral Clocks Enable SPDIFRXEN : Boolean := False; -- USART2 Peripheral Clocks Enable USART2EN : Boolean := False; -- USART3 Peripheral Clocks Enable USART3EN : Boolean := False; -- UART4 Peripheral Clocks Enable UART4EN : Boolean := False; -- UART5 Peripheral Clocks Enable UART5EN : Boolean := False; -- I2C1 Peripheral Clocks Enable I2C1EN : Boolean := False; -- I2C2 Peripheral Clocks Enable I2C2EN : Boolean := False; -- I2C3 Peripheral Clocks Enable I2C3EN : Boolean := False; -- unspecified Reserved_24_26 : HAL.UInt3 := 16#0#; -- HDMI-CEC peripheral clock enable HDMICECEN : Boolean := False; -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- DAC1&2 peripheral clock enable DAC12EN : Boolean := False; -- UART7 Peripheral Clocks Enable UART7EN : Boolean := False; -- UART8 Peripheral Clocks Enable UART8EN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB1LENR_Register use record TIM2EN at 0 range 0 .. 0; TIM3EN at 0 range 1 .. 1; TIM4EN at 0 range 2 .. 2; TIM5EN at 0 range 3 .. 3; TIM6EN at 0 range 4 .. 4; TIM7EN at 0 range 5 .. 5; TIM12EN at 0 range 6 .. 6; TIM13EN at 0 range 7 .. 7; TIM14EN at 0 range 8 .. 8; LPTIM1EN at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; SPI2EN at 0 range 14 .. 14; SPI3EN at 0 range 15 .. 15; SPDIFRXEN at 0 range 16 .. 16; USART2EN at 0 range 17 .. 17; USART3EN at 0 range 18 .. 18; UART4EN at 0 range 19 .. 19; UART5EN at 0 range 20 .. 20; I2C1EN at 0 range 21 .. 21; I2C2EN at 0 range 22 .. 22; I2C3EN at 0 range 23 .. 23; Reserved_24_26 at 0 range 24 .. 26; HDMICECEN at 0 range 27 .. 27; Reserved_28_28 at 0 range 28 .. 28; DAC12EN at 0 range 29 .. 29; UART7EN at 0 range 30 .. 30; UART8EN at 0 range 31 .. 31; end record; -- RCC APB1 Clock Register type C1_APB1HENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Clock Recovery System peripheral clock enable CRSEN : Boolean := False; -- SWPMI Peripheral Clocks Enable SWPEN : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- OPAMP peripheral clock enable OPAMPEN : Boolean := False; -- MDIOS peripheral clock enable MDIOSEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FDCAN Peripheral Clocks Enable FDCANEN : Boolean := False; -- unspecified Reserved_9_31 : HAL.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB1HENR_Register use record Reserved_0_0 at 0 range 0 .. 0; CRSEN at 0 range 1 .. 1; SWPEN at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; OPAMPEN at 0 range 4 .. 4; MDIOSEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FDCANEN at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- RCC APB2 Clock Register type C1_APB2ENR_Register is record -- TIM1 peripheral clock enable TIM1EN : Boolean := False; -- TIM8 peripheral clock enable TIM8EN : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- USART1 Peripheral Clocks Enable USART1EN : Boolean := False; -- USART6 Peripheral Clocks Enable USART6EN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- SPI1 Peripheral Clocks Enable SPI1EN : Boolean := False; -- SPI4 Peripheral Clocks Enable SPI4EN : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- TIM15 peripheral clock enable TIM15EN : Boolean := False; -- TIM16 peripheral clock enable TIM16EN : Boolean := False; -- TIM17 peripheral clock enable TIM17EN : Boolean := False; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPI5 Peripheral Clocks Enable SPI5EN : Boolean := False; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- SAI1 Peripheral Clocks Enable SAI1EN : Boolean := False; -- SAI2 Peripheral Clocks Enable SAI2EN : Boolean := False; -- SAI3 Peripheral Clocks Enable SAI3EN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- DFSDM1 Peripheral Clocks Enable DFSDM1EN : Boolean := False; -- HRTIM peripheral clock enable HRTIMEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB2ENR_Register use record TIM1EN at 0 range 0 .. 0; TIM8EN at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; USART1EN at 0 range 4 .. 4; USART6EN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; SPI1EN at 0 range 12 .. 12; SPI4EN at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; TIM15EN at 0 range 16 .. 16; TIM16EN at 0 range 17 .. 17; TIM17EN at 0 range 18 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPI5EN at 0 range 20 .. 20; Reserved_21_21 at 0 range 21 .. 21; SAI1EN at 0 range 22 .. 22; SAI2EN at 0 range 23 .. 23; SAI3EN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; DFSDM1EN at 0 range 28 .. 28; HRTIMEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB4 Clock Register type C1_APB4ENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SYSCFG peripheral clock enable SYSCFGEN : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- LPUART1 Peripheral Clocks Enable LPUART1EN : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 Peripheral Clocks Enable SPI6EN : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 Peripheral Clocks Enable I2C4EN : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 Peripheral Clocks Enable LPTIM2EN : Boolean := False; -- LPTIM3 Peripheral Clocks Enable LPTIM3EN : Boolean := False; -- LPTIM4 Peripheral Clocks Enable LPTIM4EN : Boolean := False; -- LPTIM5 Peripheral Clocks Enable LPTIM5EN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP1/2 peripheral clock enable COMP12EN : Boolean := False; -- VREF peripheral clock enable VREFEN : Boolean := False; -- RTC APB Clock Enable RTCAPBEN : Boolean := False; -- unspecified Reserved_17_20 : HAL.UInt4 := 16#0#; -- SAI4 Peripheral Clocks Enable SAI4EN : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB4ENR_Register use record Reserved_0_0 at 0 range 0 .. 0; SYSCFGEN at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; LPUART1EN at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6EN at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4EN at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2EN at 0 range 9 .. 9; LPTIM3EN at 0 range 10 .. 10; LPTIM4EN at 0 range 11 .. 11; LPTIM5EN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12EN at 0 range 14 .. 14; VREFEN at 0 range 15 .. 15; RTCAPBEN at 0 range 16 .. 16; Reserved_17_20 at 0 range 17 .. 20; SAI4EN at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- RCC AHB3 Sleep Clock Register type C1_AHB3LPENR_Register is record -- MDMA Clock Enable During CSleep Mode MDMALPEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- DMA2D Clock Enable During CSleep Mode DMA2DLPEN : Boolean := False; -- JPGDEC Clock Enable During CSleep Mode JPGDECLPEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FLITF Clock Enable During CSleep Mode FLITFLPEN : Boolean := False; -- unspecified Reserved_9_11 : HAL.UInt3 := 16#0#; -- FMC Peripheral Clocks Enable During CSleep Mode FMCLPEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- QUADSPI and QUADSPI Delay Clock Enable During CSleep Mode QSPILPEN : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- SDMMC1 and SDMMC1 Delay Clock Enable During CSleep Mode SDMMC1LPEN : Boolean := False; -- unspecified Reserved_17_27 : HAL.UInt11 := 16#0#; -- D1DTCM1 Block Clock Enable During CSleep mode D1DTCM1LPEN : Boolean := False; -- D1 DTCM2 Block Clock Enable During CSleep mode DTCM2LPEN : Boolean := False; -- D1ITCM Block Clock Enable During CSleep mode ITCMLPEN : Boolean := False; -- AXISRAM Block Clock Enable During CSleep mode AXISRAMLPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB3LPENR_Register use record MDMALPEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; DMA2DLPEN at 0 range 4 .. 4; JPGDECLPEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FLITFLPEN at 0 range 8 .. 8; Reserved_9_11 at 0 range 9 .. 11; FMCLPEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; QSPILPEN at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; SDMMC1LPEN at 0 range 16 .. 16; Reserved_17_27 at 0 range 17 .. 27; D1DTCM1LPEN at 0 range 28 .. 28; DTCM2LPEN at 0 range 29 .. 29; ITCMLPEN at 0 range 30 .. 30; AXISRAMLPEN at 0 range 31 .. 31; end record; -- RCC AHB1 Sleep Clock Register type C1_AHB1LPENR_Register is record -- DMA1 Clock Enable During CSleep Mode DMA1LPEN : Boolean := False; -- DMA2 Clock Enable During CSleep Mode DMA2LPEN : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- ADC1/2 Peripheral Clocks Enable During CSleep Mode ADC12LPEN : Boolean := False; -- unspecified Reserved_6_14 : HAL.UInt9 := 16#0#; -- Ethernet MAC bus interface Clock Enable During CSleep Mode ETH1MACLPEN : Boolean := False; -- Ethernet Transmission Clock Enable During CSleep Mode ETH1TXLPEN : Boolean := False; -- Ethernet Reception Clock Enable During CSleep Mode ETH1RXLPEN : Boolean := False; -- unspecified Reserved_18_24 : HAL.UInt7 := 16#0#; -- USB1OTG peripheral clock enable during CSleep mode USB1OTGLPEN : Boolean := False; -- USB_PHY1 clock enable during CSleep mode USB1ULPILPEN : Boolean := False; -- USB2OTG peripheral clock enable during CSleep mode USB2OTGLPEN : Boolean := False; -- USB_PHY2 clocks enable during CSleep mode USB2ULPILPEN : Boolean := False; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB1LPENR_Register use record DMA1LPEN at 0 range 0 .. 0; DMA2LPEN at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; ADC12LPEN at 0 range 5 .. 5; Reserved_6_14 at 0 range 6 .. 14; ETH1MACLPEN at 0 range 15 .. 15; ETH1TXLPEN at 0 range 16 .. 16; ETH1RXLPEN at 0 range 17 .. 17; Reserved_18_24 at 0 range 18 .. 24; USB1OTGLPEN at 0 range 25 .. 25; USB1ULPILPEN at 0 range 26 .. 26; USB2OTGLPEN at 0 range 27 .. 27; USB2ULPILPEN at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; -- RCC AHB2 Sleep Clock Register type C1_AHB2LPENR_Register is record -- CAMITF peripheral clock enable during CSleep mode CAMITFLPEN : Boolean := False; -- unspecified Reserved_1_3 : HAL.UInt3 := 16#0#; -- CRYPT peripheral clock enable during CSleep mode CRYPTLPEN : Boolean := False; -- HASH peripheral clock enable during CSleep mode HASHLPEN : Boolean := False; -- RNG peripheral clock enable during CSleep mode RNGLPEN : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- SDMMC2 and SDMMC2 Delay Clock Enable During CSleep Mode SDMMC2LPEN : Boolean := False; -- unspecified Reserved_10_28 : HAL.UInt19 := 16#0#; -- SRAM1 Clock Enable During CSleep Mode SRAM1LPEN : Boolean := False; -- SRAM2 Clock Enable During CSleep Mode SRAM2LPEN : Boolean := False; -- SRAM3 Clock Enable During CSleep Mode SRAM3LPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB2LPENR_Register use record CAMITFLPEN at 0 range 0 .. 0; Reserved_1_3 at 0 range 1 .. 3; CRYPTLPEN at 0 range 4 .. 4; HASHLPEN at 0 range 5 .. 5; RNGLPEN at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; SDMMC2LPEN at 0 range 9 .. 9; Reserved_10_28 at 0 range 10 .. 28; SRAM1LPEN at 0 range 29 .. 29; SRAM2LPEN at 0 range 30 .. 30; SRAM3LPEN at 0 range 31 .. 31; end record; -- RCC AHB4 Sleep Clock Register type C1_AHB4LPENR_Register is record -- GPIO peripheral clock enable during CSleep mode GPIOALPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOBLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOCLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIODLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOELPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOFLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOGLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOHLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOILPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOJLPEN : Boolean := False; -- GPIO peripheral clock enable during CSleep mode GPIOKLPEN : Boolean := False; -- unspecified Reserved_11_18 : HAL.UInt8 := 16#0#; -- CRC peripheral clock enable during CSleep mode CRCLPEN : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- BDMA Clock Enable During CSleep Mode BDMALPEN : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- ADC3 Peripheral Clocks Enable During CSleep Mode ADC3LPEN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- Backup RAM Clock Enable During CSleep Mode BKPRAMLPEN : Boolean := False; -- SRAM4 Clock Enable During CSleep Mode SRAM4LPEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_AHB4LPENR_Register use record GPIOALPEN at 0 range 0 .. 0; GPIOBLPEN at 0 range 1 .. 1; GPIOCLPEN at 0 range 2 .. 2; GPIODLPEN at 0 range 3 .. 3; GPIOELPEN at 0 range 4 .. 4; GPIOFLPEN at 0 range 5 .. 5; GPIOGLPEN at 0 range 6 .. 6; GPIOHLPEN at 0 range 7 .. 7; GPIOILPEN at 0 range 8 .. 8; GPIOJLPEN at 0 range 9 .. 9; GPIOKLPEN at 0 range 10 .. 10; Reserved_11_18 at 0 range 11 .. 18; CRCLPEN at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; BDMALPEN at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; ADC3LPEN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; BKPRAMLPEN at 0 range 28 .. 28; SRAM4LPEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB3 Sleep Clock Register type C1_APB3LPENR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- LTDC peripheral clock enable during CSleep mode LTDCLPEN : Boolean := False; -- unspecified Reserved_4_5 : HAL.UInt2 := 16#0#; -- WWDG1 Clock Enable During CSleep Mode WWDG1LPEN : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB3LPENR_Register use record Reserved_0_2 at 0 range 0 .. 2; LTDCLPEN at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; WWDG1LPEN at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- RCC APB1 Low Sleep Clock Register type C1_APB1LLPENR_Register is record -- TIM2 peripheral clock enable during CSleep mode TIM2LPEN : Boolean := False; -- TIM3 peripheral clock enable during CSleep mode TIM3LPEN : Boolean := False; -- TIM4 peripheral clock enable during CSleep mode TIM4LPEN : Boolean := False; -- TIM5 peripheral clock enable during CSleep mode TIM5LPEN : Boolean := False; -- TIM6 peripheral clock enable during CSleep mode TIM6LPEN : Boolean := False; -- TIM7 peripheral clock enable during CSleep mode TIM7LPEN : Boolean := False; -- TIM12 peripheral clock enable during CSleep mode TIM12LPEN : Boolean := False; -- TIM13 peripheral clock enable during CSleep mode TIM13LPEN : Boolean := False; -- TIM14 peripheral clock enable during CSleep mode TIM14LPEN : Boolean := False; -- LPTIM1 Peripheral Clocks Enable During CSleep Mode LPTIM1LPEN : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- SPI2 Peripheral Clocks Enable During CSleep Mode SPI2LPEN : Boolean := False; -- SPI3 Peripheral Clocks Enable During CSleep Mode SPI3LPEN : Boolean := False; -- SPDIFRX Peripheral Clocks Enable During CSleep Mode SPDIFRXLPEN : Boolean := False; -- USART2 Peripheral Clocks Enable During CSleep Mode USART2LPEN : Boolean := False; -- USART3 Peripheral Clocks Enable During CSleep Mode USART3LPEN : Boolean := False; -- UART4 Peripheral Clocks Enable During CSleep Mode UART4LPEN : Boolean := False; -- UART5 Peripheral Clocks Enable During CSleep Mode UART5LPEN : Boolean := False; -- I2C1 Peripheral Clocks Enable During CSleep Mode I2C1LPEN : Boolean := False; -- I2C2 Peripheral Clocks Enable During CSleep Mode I2C2LPEN : Boolean := False; -- I2C3 Peripheral Clocks Enable During CSleep Mode I2C3LPEN : Boolean := False; -- unspecified Reserved_24_26 : HAL.UInt3 := 16#0#; -- HDMI-CEC Peripheral Clocks Enable During CSleep Mode HDMICECLPEN : Boolean := False; -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- DAC1/2 peripheral clock enable during CSleep mode DAC12LPEN : Boolean := False; -- UART7 Peripheral Clocks Enable During CSleep Mode UART7LPEN : Boolean := False; -- UART8 Peripheral Clocks Enable During CSleep Mode UART8LPEN : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB1LLPENR_Register use record TIM2LPEN at 0 range 0 .. 0; TIM3LPEN at 0 range 1 .. 1; TIM4LPEN at 0 range 2 .. 2; TIM5LPEN at 0 range 3 .. 3; TIM6LPEN at 0 range 4 .. 4; TIM7LPEN at 0 range 5 .. 5; TIM12LPEN at 0 range 6 .. 6; TIM13LPEN at 0 range 7 .. 7; TIM14LPEN at 0 range 8 .. 8; LPTIM1LPEN at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; SPI2LPEN at 0 range 14 .. 14; SPI3LPEN at 0 range 15 .. 15; SPDIFRXLPEN at 0 range 16 .. 16; USART2LPEN at 0 range 17 .. 17; USART3LPEN at 0 range 18 .. 18; UART4LPEN at 0 range 19 .. 19; UART5LPEN at 0 range 20 .. 20; I2C1LPEN at 0 range 21 .. 21; I2C2LPEN at 0 range 22 .. 22; I2C3LPEN at 0 range 23 .. 23; Reserved_24_26 at 0 range 24 .. 26; HDMICECLPEN at 0 range 27 .. 27; Reserved_28_28 at 0 range 28 .. 28; DAC12LPEN at 0 range 29 .. 29; UART7LPEN at 0 range 30 .. 30; UART8LPEN at 0 range 31 .. 31; end record; -- RCC APB1 High Sleep Clock Register type C1_APB1HLPENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Clock Recovery System peripheral clock enable during CSleep mode CRSLPEN : Boolean := False; -- SWPMI Peripheral Clocks Enable During CSleep Mode SWPLPEN : Boolean := False; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- OPAMP peripheral clock enable during CSleep mode OPAMPLPEN : Boolean := False; -- MDIOS peripheral clock enable during CSleep mode MDIOSLPEN : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- FDCAN Peripheral Clocks Enable During CSleep Mode FDCANLPEN : Boolean := False; -- unspecified Reserved_9_31 : HAL.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB1HLPENR_Register use record Reserved_0_0 at 0 range 0 .. 0; CRSLPEN at 0 range 1 .. 1; SWPLPEN at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; OPAMPLPEN at 0 range 4 .. 4; MDIOSLPEN at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; FDCANLPEN at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- RCC APB2 Sleep Clock Register type C1_APB2LPENR_Register is record -- TIM1 peripheral clock enable during CSleep mode TIM1LPEN : Boolean := False; -- TIM8 peripheral clock enable during CSleep mode TIM8LPEN : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- USART1 Peripheral Clocks Enable During CSleep Mode USART1LPEN : Boolean := False; -- USART6 Peripheral Clocks Enable During CSleep Mode USART6LPEN : Boolean := False; -- unspecified Reserved_6_11 : HAL.UInt6 := 16#0#; -- SPI1 Peripheral Clocks Enable During CSleep Mode SPI1LPEN : Boolean := False; -- SPI4 Peripheral Clocks Enable During CSleep Mode SPI4LPEN : Boolean := False; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- TIM15 peripheral clock enable during CSleep mode TIM15LPEN : Boolean := False; -- TIM16 peripheral clock enable during CSleep mode TIM16LPEN : Boolean := False; -- TIM17 peripheral clock enable during CSleep mode TIM17LPEN : Boolean := False; -- unspecified Reserved_19_19 : HAL.Bit := 16#0#; -- SPI5 Peripheral Clocks Enable During CSleep Mode SPI5LPEN : Boolean := False; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- SAI1 Peripheral Clocks Enable During CSleep Mode SAI1LPEN : Boolean := False; -- SAI2 Peripheral Clocks Enable During CSleep Mode SAI2LPEN : Boolean := False; -- SAI3 Peripheral Clocks Enable During CSleep Mode SAI3LPEN : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- DFSDM1 Peripheral Clocks Enable During CSleep Mode DFSDM1LPEN : Boolean := False; -- HRTIM peripheral clock enable during CSleep mode HRTIMLPEN : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB2LPENR_Register use record TIM1LPEN at 0 range 0 .. 0; TIM8LPEN at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; USART1LPEN at 0 range 4 .. 4; USART6LPEN at 0 range 5 .. 5; Reserved_6_11 at 0 range 6 .. 11; SPI1LPEN at 0 range 12 .. 12; SPI4LPEN at 0 range 13 .. 13; Reserved_14_15 at 0 range 14 .. 15; TIM15LPEN at 0 range 16 .. 16; TIM16LPEN at 0 range 17 .. 17; TIM17LPEN at 0 range 18 .. 18; Reserved_19_19 at 0 range 19 .. 19; SPI5LPEN at 0 range 20 .. 20; Reserved_21_21 at 0 range 21 .. 21; SAI1LPEN at 0 range 22 .. 22; SAI2LPEN at 0 range 23 .. 23; SAI3LPEN at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; DFSDM1LPEN at 0 range 28 .. 28; HRTIMLPEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- RCC APB4 Sleep Clock Register type C1_APB4LPENR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SYSCFG peripheral clock enable during CSleep mode SYSCFGLPEN : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- LPUART1 Peripheral Clocks Enable During CSleep Mode LPUART1LPEN : Boolean := False; -- unspecified Reserved_4_4 : HAL.Bit := 16#0#; -- SPI6 Peripheral Clocks Enable During CSleep Mode SPI6LPEN : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- I2C4 Peripheral Clocks Enable During CSleep Mode I2C4LPEN : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- LPTIM2 Peripheral Clocks Enable During CSleep Mode LPTIM2LPEN : Boolean := False; -- LPTIM3 Peripheral Clocks Enable During CSleep Mode LPTIM3LPEN : Boolean := False; -- LPTIM4 Peripheral Clocks Enable During CSleep Mode LPTIM4LPEN : Boolean := False; -- LPTIM5 Peripheral Clocks Enable During CSleep Mode LPTIM5LPEN : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- COMP1/2 peripheral clock enable during CSleep mode COMP12LPEN : Boolean := False; -- VREF peripheral clock enable during CSleep mode VREFLPEN : Boolean := False; -- RTC APB Clock Enable During CSleep Mode RTCAPBLPEN : Boolean := False; -- unspecified Reserved_17_20 : HAL.UInt4 := 16#0#; -- SAI4 Peripheral Clocks Enable During CSleep Mode SAI4LPEN : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for C1_APB4LPENR_Register use record Reserved_0_0 at 0 range 0 .. 0; SYSCFGLPEN at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; LPUART1LPEN at 0 range 3 .. 3; Reserved_4_4 at 0 range 4 .. 4; SPI6LPEN at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; I2C4LPEN at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; LPTIM2LPEN at 0 range 9 .. 9; LPTIM3LPEN at 0 range 10 .. 10; LPTIM4LPEN at 0 range 11 .. 11; LPTIM5LPEN at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; COMP12LPEN at 0 range 14 .. 14; VREFLPEN at 0 range 15 .. 15; RTCAPBLPEN at 0 range 16 .. 16; Reserved_17_20 at 0 range 17 .. 20; SAI4LPEN at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Reset and clock control type RCC_Peripheral is record -- clock control register CR : aliased CR_Register; -- RCC Internal Clock Source Calibration Register ICSCR : aliased ICSCR_Register; -- RCC Clock Recovery RC Register CRRCR : aliased CRRCR_Register; -- RCC Clock Configuration Register CFGR : aliased CFGR_Register; -- RCC Domain 1 Clock Configuration Register D1CFGR : aliased D1CFGR_Register; -- RCC Domain 2 Clock Configuration Register D2CFGR : aliased D2CFGR_Register; -- RCC Domain 3 Clock Configuration Register D3CFGR : aliased D3CFGR_Register; -- RCC PLLs Clock Source Selection Register PLLCKSELR : aliased PLLCKSELR_Register; -- RCC PLLs Configuration Register PLLCFGR : aliased PLLCFGR_Register; -- RCC PLL1 Dividers Configuration Register PLL1DIVR : aliased PLL1DIVR_Register; -- RCC PLL1 Fractional Divider Register PLL1FRACR : aliased PLL1FRACR_Register; -- RCC PLL2 Dividers Configuration Register PLL2DIVR : aliased PLL2DIVR_Register; -- RCC PLL2 Fractional Divider Register PLL2FRACR : aliased PLL2FRACR_Register; -- RCC PLL3 Dividers Configuration Register PLL3DIVR : aliased PLL3DIVR_Register; -- RCC PLL3 Fractional Divider Register PLL3FRACR : aliased PLL3FRACR_Register; -- RCC Domain 1 Kernel Clock Configuration Register D1CCIPR : aliased D1CCIPR_Register; -- RCC Domain 2 Kernel Clock Configuration Register D2CCIP1R : aliased D2CCIP1R_Register; -- RCC Domain 2 Kernel Clock Configuration Register D2CCIP2R : aliased D2CCIP2R_Register; -- RCC Domain 3 Kernel Clock Configuration Register D3CCIPR : aliased D3CCIPR_Register; -- RCC Clock Source Interrupt Enable Register CIER : aliased CIER_Register; -- RCC Clock Source Interrupt Flag Register CIFR : aliased CIFR_Register; -- RCC Clock Source Interrupt Clear Register CICR : aliased CICR_Register; -- RCC Backup Domain Control Register BDCR : aliased BDCR_Register; -- RCC Clock Control and Status Register CSR : aliased CSR_Register; -- RCC AHB3 Reset Register AHB3RSTR : aliased AHB3RSTR_Register; -- RCC AHB1 Peripheral Reset Register AHB1RSTR : aliased AHB1RSTR_Register; -- RCC AHB2 Peripheral Reset Register AHB2RSTR : aliased AHB2RSTR_Register; -- RCC AHB4 Peripheral Reset Register AHB4RSTR : aliased AHB4RSTR_Register; -- RCC APB3 Peripheral Reset Register APB3RSTR : aliased APB3RSTR_Register; -- RCC APB1 Peripheral Reset Register APB1LRSTR : aliased APB1LRSTR_Register; -- RCC APB1 Peripheral Reset Register APB1HRSTR : aliased APB1HRSTR_Register; -- RCC APB2 Peripheral Reset Register APB2RSTR : aliased APB2RSTR_Register; -- RCC APB4 Peripheral Reset Register APB4RSTR : aliased APB4RSTR_Register; -- RCC Global Control Register GCR : aliased GCR_Register; -- RCC D3 Autonomous mode Register D3AMR : aliased D3AMR_Register; -- RCC Reset Status Register RSR : aliased RSR_Register; -- RCC AHB3 Clock Register AHB3ENR : aliased AHB3ENR_Register; -- RCC AHB1 Clock Register AHB1ENR : aliased AHB1ENR_Register; -- RCC AHB2 Clock Register AHB2ENR : aliased AHB2ENR_Register; -- RCC AHB4 Clock Register AHB4ENR : aliased AHB4ENR_Register; -- RCC APB3 Clock Register APB3ENR : aliased APB3ENR_Register; -- RCC APB1 Clock Register APB1LENR : aliased APB1LENR_Register; -- RCC APB1 Clock Register APB1HENR : aliased APB1HENR_Register; -- RCC APB2 Clock Register APB2ENR : aliased APB2ENR_Register; -- RCC APB4 Clock Register APB4ENR : aliased APB4ENR_Register; -- RCC AHB3 Sleep Clock Register AHB3LPENR : aliased AHB3LPENR_Register; -- RCC AHB1 Sleep Clock Register AHB1LPENR : aliased AHB1LPENR_Register; -- RCC AHB2 Sleep Clock Register AHB2LPENR : aliased AHB2LPENR_Register; -- RCC AHB4 Sleep Clock Register AHB4LPENR : aliased AHB4LPENR_Register; -- RCC APB3 Sleep Clock Register APB3LPENR : aliased APB3LPENR_Register; -- RCC APB1 Low Sleep Clock Register APB1LLPENR : aliased APB1LLPENR_Register; -- RCC APB1 High Sleep Clock Register APB1HLPENR : aliased APB1HLPENR_Register; -- RCC APB2 Sleep Clock Register APB2LPENR : aliased APB2LPENR_Register; -- RCC APB4 Sleep Clock Register APB4LPENR : aliased APB4LPENR_Register; -- RCC Reset Status Register C1_RSR : aliased C1_RSR_Register; -- RCC AHB3 Clock Register C1_AHB3ENR : aliased C1_AHB3ENR_Register; -- RCC AHB1 Clock Register C1_AHB1ENR : aliased C1_AHB1ENR_Register; -- RCC AHB2 Clock Register C1_AHB2ENR : aliased C1_AHB2ENR_Register; -- RCC AHB4 Clock Register C1_AHB4ENR : aliased C1_AHB4ENR_Register; -- RCC APB3 Clock Register C1_APB3ENR : aliased C1_APB3ENR_Register; -- RCC APB1 Clock Register C1_APB1LENR : aliased C1_APB1LENR_Register; -- RCC APB1 Clock Register C1_APB1HENR : aliased C1_APB1HENR_Register; -- RCC APB2 Clock Register C1_APB2ENR : aliased C1_APB2ENR_Register; -- RCC APB4 Clock Register C1_APB4ENR : aliased C1_APB4ENR_Register; -- RCC AHB3 Sleep Clock Register C1_AHB3LPENR : aliased C1_AHB3LPENR_Register; -- RCC AHB1 Sleep Clock Register C1_AHB1LPENR : aliased C1_AHB1LPENR_Register; -- RCC AHB2 Sleep Clock Register C1_AHB2LPENR : aliased C1_AHB2LPENR_Register; -- RCC AHB4 Sleep Clock Register C1_AHB4LPENR : aliased C1_AHB4LPENR_Register; -- RCC APB3 Sleep Clock Register C1_APB3LPENR : aliased C1_APB3LPENR_Register; -- RCC APB1 Low Sleep Clock Register C1_APB1LLPENR : aliased C1_APB1LLPENR_Register; -- RCC APB1 High Sleep Clock Register C1_APB1HLPENR : aliased C1_APB1HLPENR_Register; -- RCC APB2 Sleep Clock Register C1_APB2LPENR : aliased C1_APB2LPENR_Register; -- RCC APB4 Sleep Clock Register C1_APB4LPENR : aliased C1_APB4LPENR_Register; end record with Volatile; for RCC_Peripheral use record CR at 16#0# range 0 .. 31; ICSCR at 16#4# range 0 .. 31; CRRCR at 16#8# range 0 .. 31; CFGR at 16#10# range 0 .. 31; D1CFGR at 16#18# range 0 .. 31; D2CFGR at 16#1C# range 0 .. 31; D3CFGR at 16#20# range 0 .. 31; PLLCKSELR at 16#28# range 0 .. 31; PLLCFGR at 16#2C# range 0 .. 31; PLL1DIVR at 16#30# range 0 .. 31; PLL1FRACR at 16#34# range 0 .. 31; PLL2DIVR at 16#38# range 0 .. 31; PLL2FRACR at 16#3C# range 0 .. 31; PLL3DIVR at 16#40# range 0 .. 31; PLL3FRACR at 16#44# range 0 .. 31; D1CCIPR at 16#4C# range 0 .. 31; D2CCIP1R at 16#50# range 0 .. 31; D2CCIP2R at 16#54# range 0 .. 31; D3CCIPR at 16#58# range 0 .. 31; CIER at 16#60# range 0 .. 31; CIFR at 16#64# range 0 .. 31; CICR at 16#68# range 0 .. 31; BDCR at 16#70# range 0 .. 31; CSR at 16#74# range 0 .. 31; AHB3RSTR at 16#7C# range 0 .. 31; AHB1RSTR at 16#80# range 0 .. 31; AHB2RSTR at 16#84# range 0 .. 31; AHB4RSTR at 16#88# range 0 .. 31; APB3RSTR at 16#8C# range 0 .. 31; APB1LRSTR at 16#90# range 0 .. 31; APB1HRSTR at 16#94# range 0 .. 31; APB2RSTR at 16#98# range 0 .. 31; APB4RSTR at 16#9C# range 0 .. 31; GCR at 16#A0# range 0 .. 31; D3AMR at 16#A8# range 0 .. 31; RSR at 16#D0# range 0 .. 31; AHB3ENR at 16#D4# range 0 .. 31; AHB1ENR at 16#D8# range 0 .. 31; AHB2ENR at 16#DC# range 0 .. 31; AHB4ENR at 16#E0# range 0 .. 31; APB3ENR at 16#E4# range 0 .. 31; APB1LENR at 16#E8# range 0 .. 31; APB1HENR at 16#EC# range 0 .. 31; APB2ENR at 16#F0# range 0 .. 31; APB4ENR at 16#F4# range 0 .. 31; AHB3LPENR at 16#FC# range 0 .. 31; AHB1LPENR at 16#100# range 0 .. 31; AHB2LPENR at 16#104# range 0 .. 31; AHB4LPENR at 16#108# range 0 .. 31; APB3LPENR at 16#10C# range 0 .. 31; APB1LLPENR at 16#110# range 0 .. 31; APB1HLPENR at 16#114# range 0 .. 31; APB2LPENR at 16#118# range 0 .. 31; APB4LPENR at 16#11C# range 0 .. 31; C1_RSR at 16#130# range 0 .. 31; C1_AHB3ENR at 16#134# range 0 .. 31; C1_AHB1ENR at 16#138# range 0 .. 31; C1_AHB2ENR at 16#13C# range 0 .. 31; C1_AHB4ENR at 16#140# range 0 .. 31; C1_APB3ENR at 16#144# range 0 .. 31; C1_APB1LENR at 16#148# range 0 .. 31; C1_APB1HENR at 16#14C# range 0 .. 31; C1_APB2ENR at 16#150# range 0 .. 31; C1_APB4ENR at 16#154# range 0 .. 31; C1_AHB3LPENR at 16#15C# range 0 .. 31; C1_AHB1LPENR at 16#160# range 0 .. 31; C1_AHB2LPENR at 16#164# range 0 .. 31; C1_AHB4LPENR at 16#168# range 0 .. 31; C1_APB3LPENR at 16#16C# range 0 .. 31; C1_APB1LLPENR at 16#170# range 0 .. 31; C1_APB1HLPENR at 16#174# range 0 .. 31; C1_APB2LPENR at 16#178# range 0 .. 31; C1_APB4LPENR at 16#17C# range 0 .. 31; end record; -- Reset and clock control RCC_Periph : aliased RCC_Peripheral with Import, Address => RCC_Base; end STM32_SVD.RCC;
test/Compiler/simple/InlineRecursive.agda
cruhland/agda
1,989
5327
{-# OPTIONS -v treeless.opt:20 #-} -- Test that inlining a recursive function doesn't throw -- the compiler into a loop. module _ where open import Common.Prelude f : Nat → Nat f zero = zero f (suc n) = f n {-# INLINE f #-} main : IO Unit main = printNat (f 4)
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/aggr15.ads
best08618/asylo
7
23932
package Aggr15 is type T is tagged record I : Integer; end record; type DATA_T is record D : T; end record; type ALL_DATA_T is array (1..2, 1..2) of DATA_T; function ALL_CREATE return ALL_DATA_T; end Aggr15;
libsrc/_DEVELOPMENT/adt/p_list/c/sccz80/p_list_next.asm
jpoikela/z88dk
640
247754
; void *p_list_next(void *item) SECTION code_clib SECTION code_adt_p_list PUBLIC p_list_next EXTERN asm_p_list_next defc p_list_next = asm_p_list_next ; SDCC bridge for Classic IF __CLASSIC PUBLIC _p_list_next defc _p_list_next = p_list_next ENDIF
src/main.asm
JackCSheehan/hacker-shell
0
95574
%include "io-utils.asm" ; Useful functions for IO %include "commands.asm" ; Implementations for commands %include "val-comms.asm"; Labels for checking commands %include "errors.asm" ; Labels for printing errors SECTION .data ; Prompts/messages initMsg: db "Welcome to JShell. Copyright (c) 2020 <NAME>.", 0x00 ; Greeting message for user prompt: db "> ", 0x00 ; Prompt to type commands ; Commands quitComm: db "quit", 0x00 ; Command to quit mkfComm: db "mkf", 0x00 ; Command to create a new file mkdrComm: db "mkdr", 0x00 ; Command to create a new directory rmfComm: db "rmf", 0x00 ; Command to remove file rmdrComm: db "rmdr", 0x00 ; Command to remove directory rnComm: db "rn", 0x00 ; Command to rename file printComm: db "print", 0x00 ; Command to print file contents ; Errors tooFewArgsErr: db "Error: The command you entered was not given enough arguments", 0x00 ; Message shown if command isn't provided with enough arguments noCommErr: db "Error: Command not found", 0x00 ; Message show if command typed in isn't found pnfErr: db "Error: path not found", 0x00 ; Message shown if path given in arg isn't found mkErr: db "Error: cannot create file or directory", 0x00 ; Message shown if creating path doesn't work rdFileErr: db "Error: error reading given file", 0x00 ; Message shown if given file couldn't be read SECTION .bss input: resb 100 ; Reserve 100 bytes for input fileBuff: resb 10000 ; Reserve 10,000 bytes for file input SECTION .text global _start _start: ; Display greetting message mov eax, initMsg call println inLoop: ; Input Loop ; Display prompt mov eax, prompt call _print ; Get input mov eax, input ; Move buffer into EAX and get the input call getln ; Remove leading whitespace from input string call skipLeadSpace ; Extract command from input mov ebx, eax ; move pointer to input string into EBX since the command is the first word type ; Check for quit command mov ecx, quitComm ; Move quit command into ECX to compare it with the command call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, then the target command and command read from input string are the same jz callQuit ; Jump to quit if quit command is found ; Check for make file command mov ecx, mkfComm ; Move make file command into ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, then the user called the mkf command jz checkMkf ; Jump to routines for mkf command ; Check for make directory command mov ecx, mkdrComm ; Move make directory command into ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, the user called the mkdr command jz checkMkdr ; Jump to routines for mkdr command ; Check for remove file command mov ecx, rmfComm ; Move remove file comamnd int ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, the user called the rmf command jz checkRmf ; Jump to routines for rmf command ; Check for remove directory command mov ecx, rmdrComm ; Move remove directory command into ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, user called rmdr command jz checkRmdr ; Jump to routines for rmdr command ; Check for rename command mov ecx, rnComm ; Move rename command into ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, the user called the rn command jz checkRn ; Jump to routines for rn commands ; Check for print command mov ecx, printComm ; Move print command into ECX call cmpStr ; Compare target command with command pulled from input string cmp edx, 0 ; If EDX is 0, user called print command jz checkPrint ; If no other command works, show error jmp showNoCommErr repeat: ; Label to jump to when commands need to repeat input loop mov edx, 100 ; Size of input buffer call clrBuff ; Clear the input buffer mov eax, fileBuff ; Move file buffer into EAX to clear it mov edx, 10000 ; Size of file buffer call clrBuff ; Clear file buffer jmp inLoop
grammar/BrightScript.g4
slheavner/wist
0
6153
grammar BrightScript; startRule : component EOF ; component : componentHead* componentBody ; componentHead : endOfLine* componentHeadElement (endOfLine+ componentHeadElement)* endOfLine* ; componentHeadElement : libraryStatement | conditionalCompilationStatement | comment | componentBody ; componentBody : endOfLine* componentBodyElement (endOfLine+ componentBodyElement)* endOfLine* ; componentBodyElement : functionDeclaration | subDeclaration ; block : blockStatement (endOfStatement blockStatement)* endOfStatement+ ; blockStatement : comment | conditionalCompilationStatement | dimStatement | exitStatement | forStatement | forEachStatement | ifThenElseStatement | gotoStatement | labelStatement | nextStatement | printStatement | returnStatement | stopStatement | whileStatement | endStatement | expression ; arrayInitializer : OPEN_BRACKET NEWLINE* ((expression | arrayInitializer | associativeArrayInitializer) ((COMMA | endOfLine) NEWLINE* (expression | arrayInitializer | associativeArrayInitializer))*)? NEWLINE* CLOSE_BRACKET ; associativeArrayInitializer : OPEN_BRACE NEWLINE* (associativeElementInitializer ((COMMA | endOfLine) NEWLINE* associativeElementInitializer)*)? COMMA? NEWLINE* CLOSE_BRACE ; associativeElementInitializer : (identifier | reservedWord | stringLiteral) COLON assignableExpression ; conditionalCompilationStatement : conditionalCompilationConstStatement | conditionalCompilationErrorStatement | conditionalCompilationIfThenElseStatement ; conditionalCompilationConstStatement : CONDITIONAL_CONST untypedIdentifier EQUALS expression ; conditionalCompilationErrorStatement : CONDITIONAL_ERROR .*? ; conditionalCompilationIfThenElseStatement : conditionalCompilationIfBlockStatement conditionalCompilationIfElseIfBlockStatement* conditionalCompilationIfElseBlockStatement? CONDITIONAL_ENDIF ; conditionalCompilationIfBlockStatement : CONDITIONAL_IF expression THEN? endOfStatement+ (block+ | componentBody+)* ; conditionalCompilationIfElseIfBlockStatement : CONDITIONAL_ELSEIF expression THEN? endOfStatement+ (block+ | componentBody+)* ; conditionalCompilationIfElseBlockStatement : CONDITIONAL_ELSE endOfStatement+ (block+ | componentBody+)* ; dimStatement : DIM identifier OPEN_BRACKET parameterList CLOSE_BRACKET ; endStatement : END ; exitStatement : EXIT WHILE | EXITWHILE | EXIT FOR ; forStatement : FOR identifier EQUALS expression TO expression (STEP expression)? endOfStatement+ block* nextStatement? (END FOR)? ; forEachStatement : FOR EACH identifier IN expression endOfStatement+ block* nextStatement? (END FOR)? ; gotoStatement : GOTO IDENTIFIER ; ifThenElseStatement : ifSingleLineStatement | ifBlockStatement ifElseIfBlockStatement* ifElseBlockStatement? (END IF | ENDIF) ; ifSingleLineStatement : IF expression THEN? blockStatement (ELSE blockStatement)? ; ifBlockStatement : IF expression THEN? endOfStatement+ block* ; ifElseIfBlockStatement : (ELSE IF | ELSEIF) expression THEN? endOfStatement+ block* ; ifElseBlockStatement : ELSE endOfStatement+ block* ; labelStatement : IDENTIFIER COLON ; libraryStatement : LIBRARY STRING_LITERAL ; nextStatement : NEXT ; printStatement : (PRINT | QUESTION_MARK) (expression (SEMICOLON? expression)* SEMICOLON?)? ; returnStatement : RETURN assignableExpression? ; stopStatement : STOP ; whileStatement : WHILE expression endOfStatement+ block* (ENDWHILE | END WHILE) ; anonymousFunctionDeclaration : FUNCTION parameterList? (AS baseType)? endOfStatement+ block* (ENDFUNCTION | END FUNCTION) ; functionDeclaration : FUNCTION untypedIdentifier parameterList? (AS baseType)? endOfStatement+ block* (ENDFUNCTION | END FUNCTION) ; anonymousSubDeclaration : SUB parameterList? endOfStatement+ block* (ENDSUB | END SUB) ; subDeclaration : SUB untypedIdentifier parameterList? endOfStatement+ block* (ENDSUB | END SUB) ; parameterList : OPEN_PARENTHESIS (parameter (COMMA parameter)*)? CLOSE_PARENTHESIS ; parameter : (literal | identifier) (EQUALS assignableExpression)? (AS baseType)? ; baseType : BOOLEAN | DOUBLE | DYNAMIC | FLOAT | FUNCTION | INTEGER | OBJECT | STRING | VOID ; expressionList : (expression | associativeArrayInitializer | arrayInitializer) (COMMA (expression | associativeArrayInitializer | arrayInitializer))* ; expression : primary | globalFunctionInvocation | expression (DOT | ATTRIBUTE_OPERATOR) (identifier | reservedWord) | expression OPEN_BRACKET expression CLOSE_BRACKET | expression OPEN_PARENTHESIS expressionList? CLOSE_PARENTHESIS | (ADD|SUBTRACT) expression | expression (INCREMENT|DECREMENT) | expression (MULTIPLY|DIVIDE|MOD|DIVIDE_INTEGER) expression | expression (ADD|SUBTRACT) expression | expression (BITSHIFT_LEFT|BITSHIFT_RIGHT) expression | expression (GREATER_THAN|LESS_THAN|EQUALS|NOT_EQUAL|GREATER_THAN_OR_EQUAL|LESS_THAN_OR_EQUAL) expression | NOT expression | expression (AND|OR) expression | <assoc=right> expression (EQUALS|ASSIGNMENT_ADD|ASSIGNMENT_SUBTRACT|ASSIGNMENT_MULTIPLY|ASSIGNMENT_DIVIDE|ASSIGNMENT_DIVIDE_INTEGER|ASSIGNMENT_BITSHIFT_LEFT|ASSIGNMENT_BITSHIFT_RIGHT) assignableExpression ; globalFunctionInvocation : globalFunction OPEN_PARENTHESIS expressionList? CLOSE_PARENTHESIS ; globalFunction : CREATEOBJECT | EVAL | GETLASTRUNCOMPILEERROR | GETGLOBALAA | GETLASTRUNRUNTIMEERROR | RUN | STRING | TAB | TYPE ; primary : OPEN_PARENTHESIS expression CLOSE_PARENTHESIS | literal | identifier ; literal : numberLiteral | stringLiteral | booleanLiteral | invalidLiteral ; assignableExpression : expression | arrayInitializer | associativeArrayInitializer | anonymousFunctionDeclaration | anonymousSubDeclaration ; numberLiteral : INT_LITERAL | FLOAT_LITERAL ; stringLiteral : STRING_LITERAL ; booleanLiteral : TRUE | FALSE ; invalidLiteral : INVALID ; identifier : IDENTIFIER IDENTIFIER_TYPE_DECLARATION? ; untypedIdentifier : IDENTIFIER ; reservedWord : AND | BOX | CREATEOBJECT | DIM | EACH | ELSE | ELSEIF | END | ENDFUNCTION | ENDIF | ENDSUB | ENDWHILE | EVAL | EXIT | EXITWHILE | FALSE | FOR | FUNCTION | GETGLOBALAA | GETLASTRUNCOMPILEERROR | GETLASTRUNRUNTIMEERROR | GOTO | IF | INVALID | LET | LINE_NUM | NEXT | NOT | OBJFUN | OR | POS | PRINT | REM | RETURN | RUN | STEP | STOP | SUB | TAB | THEN | TO | TRUE | TYPE | WHILE ; comment : COMMENT ; endOfLine : (NEWLINE | comment) NEWLINE* ; endOfStatement : (endOfLine | COLON) NEWLINE* ; AND : A N D ; AS : A S ; BOOLEAN : B O O L E A N ; BOX : B O X ; CREATEOBJECT : C R E A T E O B J E C T ; DIM : D I M ; DOUBLE : D O U B L E ; DYNAMIC : D Y N A M I C ; EACH : E A C H ; ELSE : E L S E ; ELSEIF : E L S E I F ; END : E N D ; ENDFUNCTION : E N D F U N C T I O N ; ENDIF : E N D I F ; ENDSUB : E N D S U B ; ENDWHILE : E N D W H I L E ; EXIT : E X I T ; EXITWHILE : E X I T W H I L E ; EVAL : E V A L ; FALSE : F A L S E ; FLOAT : F L O A T ; FOR : F O R ; FUNCTION : F U N C T I O N ; GETGLOBALAA : G E T G L O B A L A A ; GETLASTRUNCOMPILEERROR : G E T L A S T R U N C O M P I L E E R R O R ; GETLASTRUNRUNTIMEERROR : G E T L A S T R U N R U N T I M E E R R O R ; GOTO : G O T O ; IF : I F ; IN : I N ; INTEGER : I N T E G E R ; INTERFACE : I N T E R F A C E ; INVALID : I N V A L I D ; LET : L E T ; LIBRARY : L I B R A R Y ; LINE_NUM : L I N E '_' N U M ; MOD : M O D ; NEXT : N E X T ; NOT : N O T ; OBJECT : O B J E C T ; OBJFUN : O B J F U N ; OR : O R ; POS : P O S ; PRINT : P R I N T ; REM : R E M ; RETURN : R E T U R N ; RUN : R U N ; STEP : S T E P ; STOP : S T O P ; STRING : S T R I N G ; SUB : S U B ; TAB : T A B ; THEN : T H E N ; TO : T O ; TRUE : T R U E ; VOID : V O I D ; TYPE : T Y P E ; WHILE : W H I L E ; STRING_LITERAL : '"' (~["\r\n] | '""')* '"' ; INT_LITERAL : [0-9]+ '&'? | '&' H [0-9A-Fa-f]+ '&'? ; FLOAT_LITERAL : [0-9]* '.' [0-9]+ (((E | D) ('+' | '-') [0-9]+) | ('!' | '#'))? ; IDENTIFIER : [a-zA-Z_][a-zA-Z_0-9]* ; IDENTIFIER_TYPE_DECLARATION : [$%!#&] ; COMMENT : (SINGLE_QUOTE | (REM (WS | NEWLINE))) ~[\r\n\u2028\u2029]* -> channel(HIDDEN) ; NEWLINE : [\r\n\u2028\u2029]+ ; WS : [ \t]+ -> skip ; CONDITIONAL_CONST : '#' C O N S T ; CONDITIONAL_ELSE : '#' ELSE ; CONDITIONAL_ELSEIF : '#' (ELSE WS IF | ELSEIF) ; CONDITIONAL_ENDIF : '#' (END WS IF | ENDIF) ; CONDITIONAL_ERROR : '#' E R R O R ; CONDITIONAL_IF : '#' IF ; SINGLE_QUOTE : '\'' ; QUESTION_MARK : '?' ; ATTRIBUTE_OPERATOR : '@' ; INCREMENT : '++' ; DECREMENT : '--' ; OPEN_BRACKET : '[' ; CLOSE_BRACKET : ']' ; OPEN_BRACE : '{' ; CLOSE_BRACE : '}' ; OPEN_PARENTHESIS : '(' ; CLOSE_PARENTHESIS : ')' ; COMMA : ',' ; SEMICOLON : ';' ; COLON : ':' ; EQUALS : '=' ; DOT : '.' ; ADD : '+' ; SUBTRACT : '-' ; MULTIPLY : '*' ; DIVIDE : '/' ; DIVIDE_INTEGER : '\\' ; BITSHIFT_LEFT : '<<' ; BITSHIFT_RIGHT : '>>' ; GREATER_THAN : '>' ; LESS_THAN : '<' ; GREATER_THAN_OR_EQUAL : '>=' ; LESS_THAN_OR_EQUAL : '<=' ; NOT_EQUAL : '<>' ; ASSIGNMENT_ADD : '+=' ; ASSIGNMENT_SUBTRACT : '-=' ; ASSIGNMENT_MULTIPLY : '*=' ; ASSIGNMENT_DIVIDE : '/=' ; ASSIGNMENT_DIVIDE_INTEGER : '\\=' ; ASSIGNMENT_BITSHIFT_LEFT : '<<=' ; ASSIGNMENT_BITSHIFT_RIGHT : '>>=' ; fragment A : ('a' | 'A') ; fragment B : ('b' | 'B') ; fragment C : ('c' | 'C') ; fragment D : ('d' | 'D') ; fragment E : ('e' | 'E') ; fragment F : ('f' | 'F') ; fragment G : ('g' | 'G') ; fragment H : ('h' | 'H') ; fragment I : ('i' | 'I') ; fragment J : ('j' | 'J') ; fragment K : ('k' | 'K') ; fragment L : ('l' | 'L') ; fragment M : ('m' | 'M') ; fragment N : ('n' | 'N') ; fragment O : ('o' | 'O') ; fragment P : ('p' | 'P') ; fragment Q : ('q' | 'Q') ; fragment R : ('r' | 'R') ; fragment S : ('s' | 'S') ; fragment T : ('t' | 'T') ; fragment U : ('u' | 'U') ; fragment V : ('v' | 'V') ; fragment W : ('w' | 'W') ; fragment X : ('x' | 'X') ; fragment Y : ('y' | 'Y') ; fragment Z : ('z' | 'Z') ;
src/asf-views-nodes-reader.adb
Letractively/ada-asf
0
53
<gh_stars>0 ----------------------------------------------------------------------- -- asf -- XHTML Reader -- Copyright (C) 2009, 2010, 2011, 2012, 2013 <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.Unchecked_Deallocation; with Unicode; with Ada.Exceptions; with Ada.Strings.Fixed; with Util.Log.Loggers; with Util.Serialize.IO.XML; package body ASF.Views.Nodes.Reader is use Sax.Readers; use Sax.Exceptions; use Sax.Locators; use Sax.Attributes; use Unicode; use Unicode.CES; use Ada.Strings.Fixed; -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ASF.Views.Nodes.Reader"); procedure Free is new Ada.Unchecked_Deallocation (Element_Context_Array, Element_Context_Array_Access); procedure Push (Handler : in out Xhtml_Reader'Class); procedure Pop (Handler : in out Xhtml_Reader'Class); -- Freeze the current Text_Tag node, counting the number of elements it contains. procedure Finish_Text_Node (Handler : in out Xhtml_Reader'Class); -- ------------------------------ -- Push the current context when entering in an element. -- ------------------------------ procedure Push (Handler : in out Xhtml_Reader'Class) is begin if Handler.Stack = null then Handler.Stack := new Element_Context_Array (1 .. 100); elsif Handler.Stack_Pos = Handler.Stack'Last then declare Old : Element_Context_Array_Access := Handler.Stack; begin Handler.Stack := new Element_Context_Array (1 .. Old'Last + 100); Handler.Stack (1 .. Old'Last) := Old (1 .. Old'Last); Free (Old); end; end if; if Handler.Stack_Pos /= Handler.Stack'First then Handler.Stack (Handler.Stack_Pos + 1) := Handler.Stack (Handler.Stack_Pos); end if; Handler.Stack_Pos := Handler.Stack_Pos + 1; Handler.Current := Handler.Stack (Handler.Stack_Pos)'Access; end Push; -- ------------------------------ -- Pop the context and restore the previous context when leaving an element -- ------------------------------ procedure Pop (Handler : in out Xhtml_Reader'Class) is begin Handler.Stack_Pos := Handler.Stack_Pos - 1; Handler.Current := Handler.Stack (Handler.Stack_Pos)'Access; end Pop; -- ------------------------------ -- Find the function knowing its name. -- ------------------------------ overriding function Get_Function (Mapper : NS_Function_Mapper; Namespace : String; Name : String) return Function_Access is use NS_Mapping; Pos : constant NS_Mapping.Cursor := NS_Mapping.Find (Mapper.Mapping, Namespace); begin if Has_Element (Pos) then return Mapper.Mapper.Get_Function (Element (Pos), Name); end if; raise No_Function with "Function '" & Namespace & ':' & Name & "' not found"; end Get_Function; -- ------------------------------ -- Bind a name to a function in the given namespace. -- ------------------------------ overriding procedure Set_Function (Mapper : in out NS_Function_Mapper; Namespace : in String; Name : in String; Func : in Function_Access) is begin null; end Set_Function; -- ------------------------------ -- Find the create function bound to the name in the given namespace. -- Returns null if no such binding exist. -- ------------------------------ function Find (Mapper : NS_Function_Mapper; Namespace : String; Name : String) return ASF.Views.Nodes.Binding_Access is use NS_Mapping; begin return ASF.Factory.Find (Mapper.Factory.all, Namespace, Name); end Find; procedure Set_Namespace (Mapper : in out NS_Function_Mapper; Prefix : in String; URI : in String) is use NS_Mapping; begin Log.Debug ("Add namespace {0}:{1}", Prefix, URI); Mapper.Mapping.Include (Prefix, URI); end Set_Namespace; -- ------------------------------ -- Remove the namespace prefix binding. -- ------------------------------ procedure Remove_Namespace (Mapper : in out NS_Function_Mapper; Prefix : in String) is use NS_Mapping; Pos : NS_Mapping.Cursor := NS_Mapping.Find (Mapper.Mapping, Prefix); begin Log.Debug ("Remove namespace {0}", Prefix); if Has_Element (Pos) then NS_Mapping.Delete (Mapper.Mapping, Pos); end if; end Remove_Namespace; -- ------------------------------ -- Warning -- ------------------------------ overriding procedure Warning (Handler : in out Xhtml_Reader; Except : Sax.Exceptions.Sax_Parse_Exception'Class) is pragma Warnings (Off, Handler); begin Log.Warn ("{0}: {1}", Util.Serialize.IO.XML.Get_Location (Except), Get_Message (Except)); end Warning; -- ------------------------------ -- Error -- ------------------------------ overriding procedure Error (Handler : in out Xhtml_Reader; Except : in Sax.Exceptions.Sax_Parse_Exception'Class) is pragma Warnings (Off, Handler); begin Log.Error ("{0}: {1}", Util.Serialize.IO.XML.Get_Location (Except), Get_Message (Except)); end Error; -- ------------------------------ -- Fatal_Error -- ------------------------------ overriding procedure Fatal_Error (Handler : in out Xhtml_Reader; Except : in Sax.Exceptions.Sax_Parse_Exception'Class) is pragma Unreferenced (Handler); begin Log.Error ("{0}: {1}", Util.Serialize.IO.XML.Get_Location (Except), Get_Message (Except)); end Fatal_Error; -- ------------------------------ -- Set_Document_Locator -- ------------------------------ overriding procedure Set_Document_Locator (Handler : in out Xhtml_Reader; Loc : in out Sax.Locators.Locator) is begin Handler.Locator := Loc; end Set_Document_Locator; -- ------------------------------ -- Start_Document -- ------------------------------ overriding procedure Start_Document (Handler : in out Xhtml_Reader) is begin null; end Start_Document; -- ------------------------------ -- End_Document -- ------------------------------ overriding procedure End_Document (Handler : in out Xhtml_Reader) is begin null; end End_Document; -- ------------------------------ -- Start_Prefix_Mapping -- ------------------------------ overriding procedure Start_Prefix_Mapping (Handler : in out Xhtml_Reader; Prefix : in Unicode.CES.Byte_Sequence; URI : in Unicode.CES.Byte_Sequence) is begin if Prefix = "" then Handler.Add_NS := To_Unbounded_String (URI); else Handler.Functions.Set_Namespace (Prefix => Prefix, URI => URI); end if; end Start_Prefix_Mapping; -- ------------------------------ -- End_Prefix_Mapping -- ------------------------------ overriding procedure End_Prefix_Mapping (Handler : in out Xhtml_Reader; Prefix : in Unicode.CES.Byte_Sequence) is begin Handler.Functions.Remove_Namespace (Prefix => Prefix); end End_Prefix_Mapping; -- ------------------------------ -- Collect the text for an EL expression. The EL expression starts -- with either '#{' or with '${' and ends with the matching '}'. -- If the <b>Value</b> string does not contain the whole EL experssion -- the <b>Expr_Buffer</b> stored in the reader is used to collect -- that expression. -- ------------------------------ procedure Collect_Expression (Handler : in out Xhtml_Reader) is use Ada.Exceptions; Expr : constant String := To_String (Handler.Expr_Buffer); Content : constant Tag_Content_Access := Handler.Text.Last; begin Handler.Expr_Buffer := Null_Unbounded_String; Content.Expr := EL.Expressions.Create_Expression (Expr, Handler.ELContext.all); Content.Next := new Tag_Content; Handler.Text.Last := Content.Next; exception when E : EL.Functions.No_Function | EL.Expressions.Invalid_Expression => Log.Error ("{0}: Invalid expression: {1}", To_String (Handler.Locator), Exception_Message (E)); Log.Error ("{0}: {1}", To_String (Handler.Locator), Expr); when E : others => Log.Error ("{0}: Internal error: {1}:{2}", To_String (Handler.Locator), Exception_Name (E), Exception_Message (E)); end Collect_Expression; -- ------------------------------ -- Collect the raw-text in a buffer. The text must be flushed -- when a new element is started or when an exiting element is closed. -- ------------------------------ procedure Collect_Text (Handler : in out Xhtml_Reader; Value : in Unicode.CES.Byte_Sequence) is Pos : Natural := Value'First; C : Character; Content : Tag_Content_Access; Start_Pos : Natural; Last_Pos : Natural; begin while Pos <= Value'Last loop case Handler.State is -- Collect the white spaces and newlines in the 'Spaces' -- buffer to ignore empty lines but still honor indentation. when NO_CONTENT => loop C := Value (Pos); if C = ASCII.CR or C = ASCII.LF then Handler.Spaces := Null_Unbounded_String; elsif C = ' ' or C = ASCII.HT then Append (Handler.Spaces, C); else Handler.State := HAS_CONTENT; exit; end if; Pos := Pos + 1; exit when Pos > Value'Last; end loop; -- Collect an EL expression until the end of that -- expression. Evaluate the expression. when PARSE_EXPR => Start_Pos := Pos; loop C := Value (Pos); Last_Pos := Pos; Pos := Pos + 1; if C = '}' then Handler.State := HAS_CONTENT; exit; end if; exit when Pos > Value'Last; end loop; Append (Handler.Expr_Buffer, Value (Start_Pos .. Last_Pos)); if Handler.State /= PARSE_EXPR then Handler.Collect_Expression; end if; -- Collect the raw text in the current content buffer when HAS_CONTENT => if Handler.Text = null then Handler.Text := new Text_Tag_Node; Initialize (Handler.Text.all'Access, null, Handler.Line, Handler.Current.Parent, null); Handler.Text.Last := Handler.Text.Content'Access; elsif Length (Handler.Expr_Buffer) > 0 then Handler.Collect_Expression; Pos := Pos + 1; end if; Content := Handler.Text.Last; -- Scan until we find the start of an EL expression -- or we have a new line. Start_Pos := Pos; loop C := Value (Pos); -- Check for the EL start #{ or ${ if (C = '#' or C = '$') and then Pos + 1 <= Value'Last and then Value (Pos + 1) = '{' then Handler.State := PARSE_EXPR; Append (Handler.Expr_Buffer, C); Append (Handler.Expr_Buffer, '{'); Last_Pos := Pos - 1; Pos := Pos + 2; exit; -- Handle \#{ and \${ as escape sequence elsif C = '\' and then Pos + 2 <= Value'Last and then Value (Pos + 2) = '{' and then (Value (Pos + 1) = '#' or Value (Pos + 1) = '$') then -- Since we have to strip the '\', flush the spaces and append the text -- but ignore the '\'. Append (Content.Text, Handler.Spaces); Handler.Spaces := Null_Unbounded_String; if Start_Pos < Pos then Append (Content.Text, Value (Start_Pos .. Pos - 1)); end if; Start_Pos := Pos + 1; Pos := Pos + 2; elsif (C = ASCII.CR or C = ASCII.LF) and Handler.Ignore_Empty_Lines then Last_Pos := Pos; Handler.State := NO_CONTENT; exit; end if; Last_Pos := Pos; Pos := Pos + 1; exit when Pos > Value'Last; end loop; -- If we have some pending spaces, add them in the text stream. if Length (Handler.Spaces) > 0 then Append (Content.Text, Handler.Spaces); Handler.Spaces := Null_Unbounded_String; end if; -- If we have some text, append to the current content buffer. if Start_Pos <= Last_Pos then Append (Content.Text, Value (Start_Pos .. Last_Pos)); end if; end case; end loop; end Collect_Text; -- ------------------------------ -- Freeze the current Text_Tag node, counting the number of elements it contains. -- ------------------------------ procedure Finish_Text_Node (Handler : in out Xhtml_Reader'Class) is begin if Handler.Text /= null then Handler.Text.Freeze; Handler.Text := null; end if; end Finish_Text_Node; -- ------------------------------ -- Start_Element -- ------------------------------ overriding procedure Start_Element (Handler : in out Xhtml_Reader; Namespace_URI : in Unicode.CES.Byte_Sequence := ""; Local_Name : in Unicode.CES.Byte_Sequence := ""; Qname : in Unicode.CES.Byte_Sequence := ""; Atts : in Sax.Attributes.Attributes'Class) is use ASF.Factory; use Ada.Exceptions; Attr_Count : Natural; Attributes : Tag_Attribute_Array_Access; Node : Tag_Node_Access; Factory : ASF.Views.Nodes.Binding_Access; begin Handler.Line.Line := Sax.Locators.Get_Line_Number (Handler.Locator); Handler.Line.Column := Sax.Locators.Get_Column_Number (Handler.Locator); -- Push the current context to keep track where we are. Push (Handler); Attr_Count := Get_Length (Atts); Factory := Handler.Functions.Find (Namespace => Namespace_URI, Name => Local_Name); if Factory /= null then if Length (Handler.Add_NS) > 0 then Attributes := new Tag_Attribute_Array (0 .. Attr_Count); Attributes (0).Name := To_Unbounded_String ("xmlns"); Attributes (0).Value := Handler.Add_NS; Handler.Add_NS := To_Unbounded_String (""); else Attributes := new Tag_Attribute_Array (1 .. Attr_Count); end if; for I in 0 .. Attr_Count - 1 loop declare Attr : constant Tag_Attribute_Access := Attributes (I + 1)'Access; Value : constant String := Get_Value (Atts, I); Name : constant String := Get_Qname (Atts, I); Expr : EL.Expressions.Expression_Access; begin Attr.Name := To_Unbounded_String (Name); if Index (Value, "#{") > 0 or Index (Value, "${") > 0 then begin Expr := new EL.Expressions.Expression; Attr.Binding := Expr.all'Access; EL.Expressions.Expression (Expr.all) := EL.Expressions.Create_Expression (Value, Handler.ELContext.all); exception when E : EL.Functions.No_Function => Log.Error ("{0}: Invalid expression: {1}", To_String (Handler.Locator), Exception_Message (E)); Attr.Binding := null; Attr.Value := To_Unbounded_String (""); when E : EL.Expressions.Invalid_Expression => Log.Error ("{0}: Invalid expression: {1}", To_String (Handler.Locator), Exception_Message (E)); Attr.Binding := null; Attr.Value := To_Unbounded_String (""); end; else Attr.Value := To_Unbounded_String (Value); end if; end; end loop; Node := Factory.Tag (Binding => Factory, Line => Handler.Line, Parent => Handler.Current.Parent, Attributes => Attributes); Handler.Current.Parent := Node; Handler.Current.Text := False; Finish_Text_Node (Handler); Handler.Spaces := Null_Unbounded_String; Handler.State := Handler.Default_State; else declare Is_Unknown : constant Boolean := Namespace_URI /= "" and Index (Qname, ":") > 0; begin -- Optimization: we know in which state we are. Handler.State := HAS_CONTENT; Handler.Current.Text := True; if Is_Unknown then Log.Error ("{0}: Element '{1}' not found", To_String (Handler.Locator), Qname); end if; if Handler.Escape_Unknown_Tags and Is_Unknown then Handler.Collect_Text ("&lt;"); else Handler.Collect_Text ("<"); end if; Handler.Collect_Text (Qname); if Length (Handler.Add_NS) > 0 then Handler.Collect_Text (" xmlns="""); Handler.Collect_Text (To_String (Handler.Add_NS)); Handler.Collect_Text (""""); Handler.Add_NS := To_Unbounded_String (""); end if; if Attr_Count /= 0 then for I in 0 .. Attr_Count - 1 loop Handler.Collect_Text (" "); Handler.Collect_Text (Get_Qname (Atts, I)); Handler.Collect_Text ("="""); declare Value : constant String := Get_Value (Atts, I); begin Handler.Collect_Text (Value); end; Handler.Collect_Text (""""); end loop; end if; if Handler.Escape_Unknown_Tags and Is_Unknown then Handler.Collect_Text ("&gt;"); else Handler.Collect_Text (">"); end if; end; end if; end Start_Element; -- ------------------------------ -- End_Element -- ------------------------------ overriding procedure End_Element (Handler : in out Xhtml_Reader; Namespace_URI : in Unicode.CES.Byte_Sequence := ""; Local_Name : in Unicode.CES.Byte_Sequence := ""; Qname : in Unicode.CES.Byte_Sequence := "") is pragma Unreferenced (Local_Name); begin if Handler.Current.Parent = null then Finish_Text_Node (Handler); elsif not Handler.Current.Text then Finish_Text_Node (Handler); Handler.Current.Parent.Freeze; end if; if Handler.Current.Text or Handler.Text /= null then declare Is_Unknown : constant Boolean := Namespace_URI /= "" and Index (Qname, ":") > 0; begin -- Optimization: we know in which state we are. Handler.State := HAS_CONTENT; if Handler.Escape_Unknown_Tags and Is_Unknown then Handler.Collect_Text ("&lt;/"); Handler.Collect_Text (Qname); Handler.Collect_Text ("&gt;"); else Handler.Collect_Text ("</"); Handler.Collect_Text (Qname); Handler.Collect_Text (">"); end if; end; else Handler.Spaces := Null_Unbounded_String; end if; -- Pop the current context to restore the last context. Pop (Handler); end End_Element; -- ------------------------------ -- Characters -- ------------------------------ overriding procedure Characters (Handler : in out Xhtml_Reader; Ch : in Unicode.CES.Byte_Sequence) is begin Collect_Text (Handler, Ch); end Characters; -- ------------------------------ -- Ignorable_Whitespace -- ------------------------------ overriding procedure Ignorable_Whitespace (Handler : in out Xhtml_Reader; Ch : in Unicode.CES.Byte_Sequence) is begin if not Handler.Ignore_White_Spaces then Collect_Text (Handler, Ch); end if; end Ignorable_Whitespace; -- ------------------------------ -- Processing_Instruction -- ------------------------------ overriding procedure Processing_Instruction (Handler : in out Xhtml_Reader; Target : in Unicode.CES.Byte_Sequence; Data : in Unicode.CES.Byte_Sequence) is pragma Unreferenced (Handler); begin Log.Error ("Processing instruction: {0}: {1}", Target, Data); null; end Processing_Instruction; -- ------------------------------ -- Skipped_Entity -- ------------------------------ overriding procedure Skipped_Entity (Handler : in out Xhtml_Reader; Name : in Unicode.CES.Byte_Sequence) is pragma Unmodified (Handler); begin null; end Skipped_Entity; -- ------------------------------ -- Start_Cdata -- ------------------------------ overriding procedure Start_Cdata (Handler : in out Xhtml_Reader) is pragma Unreferenced (Handler); begin Log.Info ("Start CDATA"); end Start_Cdata; -- ------------------------------ -- End_Cdata -- ------------------------------ overriding procedure End_Cdata (Handler : in out Xhtml_Reader) is pragma Unreferenced (Handler); begin Log.Info ("End CDATA"); end End_Cdata; -- ------------------------------ -- Resolve_Entity -- ------------------------------ overriding function Resolve_Entity (Handler : Xhtml_Reader; Public_Id : Unicode.CES.Byte_Sequence; System_Id : Unicode.CES.Byte_Sequence) return Input_Sources.Input_Source_Access is pragma Unreferenced (Handler); begin Log.Error ("Cannot resolve entity {0} - {1}", Public_Id, System_Id); return null; end Resolve_Entity; overriding procedure Start_DTD (Handler : in out Xhtml_Reader; Name : Unicode.CES.Byte_Sequence; Public_Id : Unicode.CES.Byte_Sequence := ""; System_Id : Unicode.CES.Byte_Sequence := "") is begin if Handler.Text = null then Handler.Text := new Text_Tag_Node; Initialize (Handler.Text.all'Access, null, Handler.Line, Handler.Current.Parent, null); Handler.Text.Last := Handler.Text.Content'Access; end if; declare Content : constant Tag_Content_Access := Handler.Text.Last; begin Append (Content.Text, "<!DOCTYPE "); Append (Content.Text, Name); Append (Content.Text, " "); if Public_Id'Length > 0 then Append (Content.Text, " PUBLIC """); Append (Content.Text, Public_Id); Append (Content.Text, """ "); if System_Id'Length > 0 then Append (Content.Text, '"'); Append (Content.Text, System_Id); Append (Content.Text, '"'); end if; elsif System_Id'Length > 0 then Append (Content.Text, " SYSTEM """); Append (Content.Text, System_Id); Append (Content.Text, """ "); end if; Append (Content.Text, " >" & ASCII.LF); end; end Start_DTD; -- ------------------------------ -- Get the root node that was created upon parsing of the XHTML file. -- ------------------------------ function Get_Root (Reader : Xhtml_Reader) return Tag_Node_Access is begin return Reader.Root; end Get_Root; -- ------------------------------ -- Set the XHTML reader to ignore or not the white spaces. -- When set to True, the ignorable white spaces will not be kept. -- ------------------------------ procedure Set_Ignore_White_Spaces (Reader : in out Xhtml_Reader; Value : in Boolean) is begin Reader.Ignore_White_Spaces := Value; end Set_Ignore_White_Spaces; -- ------------------------------ -- Set the XHTML reader to ignore empty lines. -- ------------------------------ procedure Set_Ignore_Empty_Lines (Reader : in out Xhtml_Reader; Value : in Boolean) is begin Reader.Ignore_Empty_Lines := Value; end Set_Ignore_Empty_Lines; -- ------------------------------ -- Set the XHTML reader to escape or not the unknown tags. -- When set to True, the tags which are not recognized will be -- emitted as a raw text component and they will be escaped using -- the XML escape rules. -- ------------------------------ procedure Set_Escape_Unknown_Tags (Reader : in out Xhtml_Reader; Value : in Boolean) is begin Reader.Escape_Unknown_Tags := Value; end Set_Escape_Unknown_Tags; -- ------------------------------ -- Parse an XML stream, and calls the appropriate SAX callbacks for each -- event. -- This is not re-entrant: you can not call Parse with the same Parser -- argument in one of the SAX callbacks. This has undefined behavior. -- ------------------------------ procedure Parse (Parser : in out Xhtml_Reader; Name : in ASF.Views.File_Info_Access; Input : in out Input_Sources.Input_Source'Class; Factory : access ASF.Factory.Component_Factory; Context : in EL.Contexts.ELContext_Access) is begin Parser.Stack_Pos := 1; Push (Parser); Parser.Line.File := Name; Parser.Root := new Tag_Node; Parser.Functions.Factory := Factory; Parser.Current.Parent := Parser.Root; Parser.ELContext := Parser.Context'Unchecked_Access; Parser.Context.Set_Function_Mapper (Parser.Functions'Unchecked_Access); Parser.Functions.Mapper := Context.Get_Function_Mapper; if Parser.Functions.Mapper = null then Log.Warn ("There is no function mapper"); end if; Sax.Readers.Reader (Parser).Parse (Input); Finish_Text_Node (Parser); Parser.Functions.Factory := null; Parser.ELContext := null; if Parser.Ignore_Empty_Lines then Parser.Default_State := NO_CONTENT; else Parser.Default_State := HAS_CONTENT; end if; Parser.State := Parser.Default_State; Free (Parser.Stack); exception when others => Free (Parser.Stack); raise; end Parse; end ASF.Views.Nodes.Reader;
src/Data/Graph/Path/Cut.agda
kcsmnt0/graph
0
5418
<reponame>kcsmnt0/graph open import Data.Graph module Data.Graph.Path.Cut {ℓᵥ ℓₑ} (g : FiniteGraph ℓᵥ ℓₑ) where open import Data.Fin as Fin using (Fin; zero; suc) open import Data.Fin.Properties as Fin-Props using (pigeonhole) open import Data.List as List using (List; []; _∷_) open import Data.List.Any as Any using (Any; here; there) open import Data.List.Membership.Propositional as ∈L renaming (_∈_ to _∈L_) open import Data.Nat as ℕ open import Data.Nat.Properties as ℕ-Props open import Data.Product as Σ open import Data.Sum as ⊎ open import Finite import Finite.Pigeonhole open import Function open import Induction.Nat open import Induction.WellFounded import Level as ℓ open import Relation.Binary.PropositionalEquality open import Relation.Binary.PreorderReasoning ≤-preorder open import Relation.Nullary hiding (module Dec) open import Relation.Nullary.Decidable as Dec open import Relation.Nullary.Negation open FiniteGraph g open IsFinite infix 3 _∈_ data _∈_ x : ∀ {a b n} → Path a b n → Set where here : ∀ {b c n} {e : Edge x b} {p : Path b c n} → x ∈ e ∷ p there : ∀ {a b c n} {e : Edge a b} {p : Path b c n} → x ∈ p → x ∈ e ∷ p infix 3 _∈?_ _∈?_ : ∀ {a b n} x (p : Path a b n) → Dec (x ∈ p) x ∈? [] = no λ () _∈?_ {a} x (e ∷ p) = case decEqVertex a x of λ where (yes refl) → yes here (no a≢x) → case x ∈? p of λ where (yes i) → yes (there i) (no ¬i) → no λ where here → contradiction refl a≢x (there i) → contradiction i ¬i index : ∀ {a b x n} {p : Path a b n} → x ∈ p → Fin n index here = zero index (there i) = suc (index i) lookup : ∀ {a b n} → Path a b n → Fin n → Vertex lookup {a} (e ∷ p) zero = a lookup (e ∷ p) (suc i) = lookup p i ∈-lookup : ∀ {a b n} {p : Path a b n} (i : Fin n) → lookup p i ∈ p ∈-lookup {p = []} () ∈-lookup {p = e ∷ p} zero = here ∈-lookup {p = e ∷ p} (suc i) = there (∈-lookup i) finiteIndex : ∀ {a b n} (p : Path a b n) → Fin n → Fin (size vertexFinite) finiteIndex p = Any.index ∘ membership vertexFinite ∘ lookup p prefixLength : ∀ {a b x n} {p : Path a b n} → x ∈ p → ℕ prefixLength here = zero prefixLength (there i) = suc (prefixLength i) suffixLength : ∀ {a b x n} {p : Path a b n} → x ∈ p → ℕ suffixLength {n = n} here = n suffixLength (there i) = suffixLength i split : ∀ {a b x n} {p : Path a b n} (i : x ∈ p) → Path a x (prefixLength i) × Path x b (suffixLength i) split {p = p} here = [] , p split {p = e ∷ p} (there i) = Σ.map₁ (e ∷_) (split i) prefix : ∀ {a b x n} {p : Path a b n} (i : x ∈ p) → Path a x (prefixLength i) prefix = proj₁ ∘ split suffix : ∀ {a b x n} {p : Path a b n} (i : x ∈ p) → Path x b (suffixLength i) suffix = proj₂ ∘ split splitLengthsAddUp : ∀ {a b x n} {p : Path a b n} (i : x ∈ p) → n ≡ prefixLength i + suffixLength i splitLengthsAddUp here = refl splitLengthsAddUp (there i) = cong suc (splitLengthsAddUp i) data Repeats : ∀ {a b n} → Path a b n → Set where here : ∀ {a b c n} {e : Edge a b} {p : Path b c n} → a ∈ p → Repeats (e ∷ p) there : ∀ {a b c n} {e : Edge a b} {p : Path b c n} → Repeats p → Repeats (e ∷ p) repeats? : ∀ {a b n} (p : Path a b n) → Dec (Repeats p) repeats? [] = no λ () repeats? {a} (e ∷ p) = case a ∈? p of λ where (yes i) → yes (here i) (no ¬i) → case repeats? p of λ where (yes r) → yes (there r) (no ¬r) → no λ where (here i) → contradiction i ¬i (there r) → contradiction r ¬r Acyclic : ∀ {a b n} → Path a b n → Set Acyclic p = ¬ Repeats p acyclic? : ∀ {a b n} (p : Path a b n) → Dec (Acyclic p) acyclic? = ¬? ∘ repeats? data Segmented a b : ℕ → Set (ℓᵥ ℓ.⊔ ℓₑ) where _◄_◄_ : ∀ {x m n l} → Path a x m → Path x x (suc n) → Path x b l → Segmented a b (m + suc n + l) segment : ∀ {a b n} {p : Path a b n} → Repeats p → Segmented a b n segment {p = []} () segment {p = e ∷ p} (here i) rewrite splitLengthsAddUp i = [] ◄ e ∷ prefix i ◄ suffix i segment {p = e ∷ p} (there r) = case segment r of λ where (p₁ ◄ p₂ ◄ p₃) → (e ∷ p₁) ◄ p₂ ◄ p₃ cutLoop< : ∀ {a b n} {p : Path a b n} → Repeats p → Path< a b n cutLoop< r = case segment r of λ where (_◄_◄_ {m = m} p₁ p₂ p₃) → -, lengthLem m , p₁ ++ p₃ where lengthLem : ∀ x {y z} → suc (x + z) ≤ x + suc y + z lengthLem zero = s≤s (n≤m+n _ _) lengthLem (suc x) = s≤s (lengthLem x) indicesLoop : ∀ {a b n i j} {p : Path a b n} → i ≢ j → lookup p i ≡ lookup p j → Repeats p indicesLoop {i = zero} {zero} {e ∷ p} z≢z eq = contradiction refl z≢z indicesLoop {i = zero} {suc j} {e ∷ p} _ refl = here (∈-lookup j) indicesLoop {i = suc i} {zero} {e ∷ p} _ refl = here (∈-lookup i) indicesLoop {i = suc i} {suc j} {e ∷ p} si≢sj eq = there (indicesLoop (si≢sj ∘ cong suc) eq) findLoop : ∀ {a b n} (p : Path a b n) → n > size vertexFinite → Repeats p findLoop p gt = let i , j , i≢j , eq = pigeonhole gt (finiteIndex p) in indicesLoop i≢j (indexOf-injective vertexFinite eq) acyclic-length-≤ : ∀ {a b n} (p : Path a b n) → Acyclic p → n ≤ size vertexFinite acyclic-length-≤ {n = n} p ¬r = case n ≤? size vertexFinite of λ where (yes le) → le (no ¬le) → contradiction (findLoop p (≰⇒> ¬le)) ¬r shortenPath : ∀ {a b n} → Path a b n → n > size vertexFinite → Path< a b n shortenPath p = cutLoop< ∘ findLoop p shortenPathEnough : ∀ {a b n} (p : Path a b n) → n > size vertexFinite → Path≤ a b (size vertexFinite) shortenPathEnough = <-rec _ wfRec _ where wfRec = λ n rec p gt → let n′ , le , p′ = shortenPath p gt in case size vertexFinite <? n′ of λ where (yes n′>v) → rec _ le p′ n′>v (no n′≯v) → -, ≮⇒≥ n′≯v , p′ shortEnoughPath : ∀ {a b n} (p : Path a b n) → Path≤ a b (size vertexFinite) shortEnoughPath {n = n} p = case size vertexFinite <? n of λ where (yes n>v) → shortenPathEnough p n>v (no n≯v) → -, ≮⇒≥ n≯v , p cutAllLoops : ∀ {a b n} → (p : Path a b n) → Repeats p → ∃ λ (p : Path≤ a b n) → ¬ Repeats (proj₂ (proj₂ p)) cutAllLoops = <-rec _ wfRec _ where wfRec = λ x rec p r → case cutLoop< r of λ where (n′ , lt , p′) → case repeats? p′ of λ where (yes r) → case rec _ lt p′ r of λ where ((n′′ , le′′ , p′′) , ¬r′′) → (n′′ , ≤-trans le′′ (<⇒≤ lt) , p′′) , ¬r′′ (no ¬r) → (n′ , <⇒≤ lt , p′) , ¬r acyclicPath : ∀ {a b n} → (p : Path a b n) → ∃ λ (p : Path≤ a b n) → ¬ Repeats (proj₂ (proj₂ p)) acyclicPath p = case repeats? p of λ where (yes r) → cutAllLoops p r (no ¬r) → (-, ≤-refl , p) , ¬r minimalPath : ∀ {a b n} → Path a b n → ∃ λ (p : Path≤ a b (size vertexFinite)) → ¬ Repeats (proj₂ (proj₂ p)) minimalPath p = let x , x≤max , p′ = shortEnoughPath p (y , y≤x , p′′) , ¬r = acyclicPath p′ in (y , ≤-trans y≤x x≤max , p′′) , ¬r
oeis/048/A048587.asm
loda-lang/loda-programs
11
100477
; A048587: Pisot sequence L(6,10). ; Submitted by <NAME> ; 6,10,17,29,50,87,152,266,466,817,1433,2514,4411,7740,13582,23834,41825,73397,128802,226031,396656,696082,1221538,2143649,3761841,6601570,11584947,20330164,35676950,62608682,109870577,192809421,338356946,593775047,1042002568,1828587034,3208946546,5631308625,9882257737,17342153394,30433357675,53406819692,93722435102,164471408186,288627200961,506505428837,888855064898,1559831901919,2737314167776,4803651498530,8429820731202,14793304131649,25960439030625,45557394660802,79947654422627,140298353215076 mul $0,2 add $0,7 lpb $0 seq $0,134816 ; Padovan's spiral numbers. mov $1,$0 mov $0,0 lpe mov $0,$1 add $0,1
MPI/Lab-3/bas_indexed_6_problem.asm
vishwas1101/Misc
0
7224
org 100h ; Base Indexed addressing mode MOV AX, 3000H MOV DS, AX MOV [2246H], 64H MOV SI, 1234H MOV BX, 1000H MOV AL, [BX+SI+0012H] ret
programs/oeis/076/A076539.asm
neoneye/loda
22
84328
<filename>programs/oeis/076/A076539.asm ; A076539: Numerators a(n) of fractions slowly converging to Pi: let a(1) = 0, b(n) = n - a(n); if (a(n) + 1) / b(n) < Pi, then a(n+1) = a(n) + 1, otherwise a(n+1) = a(n). ; 0,1,2,3,3,4,5,6,6,7,8,9,9,10,11,12,12,13,14,15,15,16,17,18,18,19,20,21,21,22,23,24,25,25,26,27,28,28,29,30,31,31,32,33,34,34,35,36,37,37,38,39,40,40,41,42,43,43,44,45,46,47,47,48,49,50,50,51,52,53,53,54,55 mul $0,4 seq $0,80755 ; a(n) = ceiling(n*(1+1/sqrt(2))). add $1,$0 add $2,$1 add $2,27 add $1,$2 div $1,18 sub $1,1 mov $0,$1
programs/oeis/113/A113861.asm
jmorken/loda
1
161382
; A113861: a(n) = (1/9)*((6*n - 7)*2^(n-1) - (-1)^n). ; 0,1,5,15,41,103,249,583,1337,3015,6713,14791,32313,70087,151097,324039,691769,1470919,3116601,6582727,13864505,29127111,61050425,127693255,266571321,555512263,1155763769,2401006023,4980969017,10319851975,21355531833,44142719431,91148750393,188024123847,387501493817,797909479879,1641631944249,3374889857479,6933031652921,14232567181767,29198142115385,59862299734471,122656630476345,251177322967495,514082769964601,1051621787988423,2150156072095289,4394137136427463,8975924257328697 mov $1,1 lpb $0 sub $0,1 mul $1,2 trn $2,$3 mul $2,2 add $1,$2 mov $3,$2 mov $2,$0 lpe sub $1,1
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_1952.asm
ljhsiun2/medusa
9
1525
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x1272d, %r12 nop nop xor %r15, %r15 mov (%r12), %rbx nop nop nop dec %rdx lea addresses_WC_ht+0x90bb, %rsi lea addresses_A_ht+0x1bf55, %rdi nop nop inc %rbx mov $5, %rcx rep movsb nop sub %r12, %r12 lea addresses_normal_ht+0x16c61, %rsi lea addresses_WT_ht+0x185c5, %rdi nop nop nop nop nop dec %rbx mov $37, %rcx rep movsq nop nop nop cmp %rsi, %rsi lea addresses_UC_ht+0xeb35, %rdi nop nop nop nop cmp $8143, %rdx vmovups (%rdi), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %rsi nop nop nop nop and %rsi, %rsi lea addresses_UC_ht+0x13635, %rsi lea addresses_normal_ht+0x1c335, %rdi nop nop nop nop nop dec %r11 mov $64, %rcx rep movsb nop nop nop mfence lea addresses_normal_ht+0x1e935, %rsi lea addresses_normal_ht+0x13465, %rdi nop nop xor $18235, %rbx mov $40, %rcx rep movsb nop nop nop inc %rcx lea addresses_D_ht+0x1af35, %r15 nop nop nop nop cmp %rdi, %rdi mov $0x6162636465666768, %rbx movq %rbx, (%r15) dec %rcx lea addresses_A_ht+0x8d35, %r11 nop nop sub $23118, %r15 mov (%r11), %dx nop add $37661, %rcx lea addresses_WT_ht+0x1c843, %rsi lea addresses_WT_ht+0x8f35, %rdi nop nop nop sub %r15, %r15 mov $16, %rcx rep movsw nop nop nop sub %r15, %r15 lea addresses_normal_ht+0x8a15, %r11 sub $38576, %r12 mov (%r11), %bx nop nop nop cmp %r12, %r12 lea addresses_normal_ht+0x4f35, %rsi lea addresses_D_ht+0xcb5, %rdi nop nop and %r15, %r15 mov $89, %rcx rep movsq nop sub $33036, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r9 push %rbp push %rcx push %rdi push %rsi // Store lea addresses_normal+0x1c144, %r9 nop nop xor %rsi, %rsi mov $0x5152535455565758, %rcx movq %rcx, %xmm0 vmovups %ymm0, (%r9) nop nop nop add %r12, %r12 // Store lea addresses_PSE+0x7b35, %r12 xor $45304, %rdi movb $0x51, (%r12) nop nop nop nop dec %r12 // Store lea addresses_A+0x2825, %rbp xor $30563, %r10 movw $0x5152, (%rbp) nop cmp $18401, %r12 // Load lea addresses_WC+0x1dd25, %rcx nop nop add $60669, %rdi mov (%rcx), %ebp nop nop nop nop add $33821, %r12 // REPMOV lea addresses_WC+0x17335, %rsi lea addresses_PSE+0xedb5, %rdi nop add %r10, %r10 mov $112, %rcx rep movsw nop nop nop nop nop add %r10, %r10 // Load lea addresses_PSE+0x1b35, %r10 nop nop sub %rsi, %rsi mov (%r10), %r9d nop xor %r12, %r12 // Faulty Load lea addresses_WC+0x17335, %r9 nop nop sub $40348, %r10 mov (%r9), %di lea oracles, %rsi and $0xff, %rdi shlq $12, %rdi mov (%rsi,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}} {'src': {'same': False, 'congruent': 3, 'NT': True, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_PSE', 'congruent': 7, 'same': False}} {'src': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': True}} {'src': {'same': True, 'congruent': 11, 'NT': False, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': True}} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
programs/oeis/072/A072154.asm
jmorken/loda
1
17852
<reponame>jmorken/loda ; A072154: Coordination sequence for the planar net 4.6.12. ; 1,3,5,7,9,12,15,17,19,21,24,27,29,31,33,36,39,41,43,45,48,51,53,55,57,60,63,65,67,69,72,75,77,79,81,84,87,89,91,93,96,99,101,103,105,108,111,113,115,117,120,123,125,127,129,132,135,137,139,141,144,147,149,151,153,156,159,161,163,165,168,171,173,175,177,180,183,185,187,189,192,195,197,199,201,204,207,209,211,213,216,219,221,223,225,228,231,233,235,237,240,243,245,247,249,252,255,257,259,261,264,267,269,271,273,276,279,281,283,285,288,291,293,295,297,300,303,305,307,309,312,315,317,319,321,324,327,329,331,333,336,339,341,343,345,348,351,353,355,357,360,363,365,367,369,372,375,377,379,381,384,387,389,391,393,396,399,401,403,405,408,411,413,415,417,420,423,425,427,429,432,435,437,439,441,444,447,449,451,453,456,459,461,463,465,468,471,473,475,477,480,483,485,487,489,492,495,497,499,501,504,507,509,511,513,516,519,521,523,525,528,531,533,535,537,540,543,545,547,549,552,555,557,559,561,564,567,569,571,573,576,579,581,583,585,588,591,593,595,597 mov $1,1 mov $3,$0 add $3,4 mov $2,$3 lpb $0 sub $0,1 trn $1,$2 add $1,3 trn $2,5 lpe
Lab2/Lab2/lab2.asm
ConstantinCezB/Computer-Architecture-assembly
0
2502
TITLE Lab2 INCLUDE Irvine32.inc .data val1 dword 4040h val2 dword 1555h val3 byte "Hello World" .code main PROC mov EDX, offset val3 call WriteString call crlf mov EAX, val1 add EAX, val2 mov ECX, val2 sub ECX, 500h mov EBX, 3000h add EAX, EBX sub EAX, ECX add val2, ECX mov EAX, 1111h add val1, EAX call DumpRegs exit main ENDP END main
arm/data_processing.asm
jsmolka/gba-suite
31
6451
data_processing: ; Tests for the data processing instruction t200: ; ARM 3: Move mov r0, 32 cmp r0, 32 bne f200 b t201 f200: m_exit 200 t201: ; ARM 3: Move negative mvn r0, 0 adds r0, 1 bne f201 b t202 f201: m_exit 201 t202: ; ARM 3: And mov r0, 0xFF and r0, 0x0F cmp r0, 0x0F bne f202 b t203 f202: m_exit 202 t203: ; ARM 3: Exclusive or mov r0, 0xFF eor r0, 0xF0 cmp r0, 0x0F bne f203 b t204 f203: m_exit 203 t204: ; ARM 3: Or mov r0, 0xF0 orr r0, 0x0F cmp r0, 0xFF bne f204 b t205 f204: m_exit 204 t205: ; ARM 3: Bit clear mov r0, 0xFF bic r0, 0x0F cmp r0, 0xF0 bne f205 b t206 f205: m_exit 205 t206: ; ARM 3: Add mov r0, 32 add r0, 32 cmp r0, 64 bne f206 b t207 f206: m_exit 206 t207: ; ARM 3: Add with carry msr cpsr_f, 0 movs r0, 32 adc r0, 32 cmp r0, 64 bne f207 msr cpsr_f, FLAG_C mov r0, 32 adc r0, 32 cmp r0, 65 bne f207 b t208 f207: m_exit 207 t208: ; ARM 3: Subtract mov r0, 64 sub r0, 32 cmp r0, 32 bne f208 b t209 f208: m_exit 208 t209: ; ARM 3: Reverse subtract mov r0, 32 rsb r0, 64 cmp r0, 32 bne f209 b t210 f209: m_exit 209 t210: ; ARM 3: Subtract with carry msr cpsr_f, 0 mov r0, 64 sbc r0, 32 cmp r0, 31 bne f210 msr cpsr_f, FLAG_C mov r0, 64 sbc r0, 32 cmp r0, 32 bne f210 b t211 f210: m_exit 210 t211: ; ARM 3: Reverse subtract with carry msr cpsr_f, 0 mov r0, 32 rsc r0, 64 cmp r0, 31 bne f211 msr cpsr_f, FLAG_C mov r0, 32 rsc r0, 64 cmp r0, 32 bne f211 b t212 f211: m_exit 211 t212: ; ARM 3: Compare mov r0, 32 cmp r0, r0 bne f212 b t213 f212: m_exit 212 t213: ; ARM 3: Compare negative mov r0, 1 shl 31 cmn r0, r0 bne f213 b t214 f213: m_exit 213 t214: ; ARM 3: Test mov r0, 0xF0 tst r0, 0x0F bne f214 b t215 f214: m_exit 214 t215: ; ARM 3: Test equal mov r0, 0xFF teq r0, 0xFF bne f215 b t216 f215: m_exit 215 t216: ; ARM 3: Operand types mov r0, 0xFF00 mov r1, 0x00FF mov r1, r1, lsl 8 cmp r1, r0 bne f216 b t217 f216: m_exit 216 t217: ; ARM 3: Update carry for rotated immediate movs r0, 0xF000000F bcc f217 movs r0, 0x0FF00000 bcs f217 b t218 f217: m_exit 217 t218: ; ARM 3: Update carry for rotated register mov r0, 0xFF mov r1, 4 movs r2, r0, ror r1 bcc f218 mov r0, 0xF0 mov r1, 4 movs r2, r0, ror r1 bcs f218 b t219 f218: m_exit 218 t219: ; ARM 3: Update carry for rotated register mov r0, 0xFF movs r1, r0, ror 4 bcc f219 mov r0, 0xF0 movs r1, r0, ror 4 bcs f219 b t220 f219: m_exit 219 t220: ; ARM 3: Register shift special mov r0, 0 msr cpsr_f, FLAG_C movs r0, r0, rrx bcs f220 cmp r0, 1 shl 31 bne f220 b t221 f220: m_exit 220 t221: ; ARM 3: PC as operand add r0, pc, 4 cmp r0, pc bne f221 b t222 f221: m_exit 221 t222: ; ARM 3: PC as destination adr r0, t223 mov pc, r0 f222: m_exit 222 t223: ; ARM 3: PC as destination with S bit mov r8, 32 msr cpsr, MODE_FIQ mov r8, 64 msr spsr, MODE_SYS subs pc, 4 cmp r8, 32 bne f223 b t224 f223: m_exit 223 t224: ; ARM 3: PC as shifted register mov r0, 0 dw 0xE1A0001F ; mov r0, pc, lsl r0 cmp r0, pc bne f224 b t225 f224: m_exit 224 t225: ; ARM 3: PC as operand 1 with shifted register mov r0, 0 dw 0xE08F0010 ; add r0, pc, r0, lsl r0 cmp r0, pc bne f225 b t226 f225: m_exit 225 t226: ; ARM 3: PC as operand 1 with shifted register with immediate shift amount mov r0, 0 mov r2, lr bl .get_pc .get_pc: mov r1, lr mov lr, r2 add r0, pc, r0 add r1, 16 cmp r1, r0 bne f226 b t227 f226: m_exit 226 t227: ; ARM 3: Rotated immediate logical operation msr cpsr_f, 0 movs r0, 0x80000000 bcc f227 bpl f227 b t228 f227: m_exit 227 t228: ; ARM 3: Rotated immediate arithmetic operation msr cpsr_f, FLAG_C mov r0, 0 adcs r0, 0x80000000 cmp r0, 0x80000001 bne f228 msr cpsr_f, FLAG_C mov r0, 0 adcs r0, 0x70000000 cmp r0, 0x70000001 bne f228 b t229 f228: m_exit 228 t229: ; ARM 3: Immediate shift logical operation msr cpsr_f, 0 mov r0, 0x80 movs r0, r0, ror 8 bcc f229 bpl f229 b t230 f229: m_exit 229 t230: ; ARM 3: Immediate shift arithmetic operation msr cpsr_f, FLAG_C mov r0, 0 mov r1, 0x80 adcs r0, r1, ror 8 cmp r0, 0x80000001 bne f230 msr cpsr_f, FLAG_C mov r0, 0 mov r1, 0x70 adcs r0, r1, ror 8 cmp r0, 0x70000001 bne f230 b t231 f230: m_exit 230 t231: ; ARM 3: Register shift logical operation msr cpsr_f, 0 mov r0, 0x80 mov r1, 8 movs r0, r0, ror r1 bcc f231 bpl f231 b t232 f231: m_exit 231 t232: ; ARM 3: Register shift arithmetic operation msr cpsr_f, FLAG_C mov r0, 0 mov r1, 0x80 mov r2, 8 adcs r0, r1, ror r2 cmp r0, 0x80000001 bne f232 msr cpsr_f, FLAG_C mov r0, 0 mov r1, 0x70 mov r2, 8 adcs r0, r1, ror r2 cmp r0, 0x70000001 bne f232 b t233 f232: m_exit 232 t233: ; ARM 3: TST / TEQ setting flags during shifts msr cpsr_f, 0 tst r0, 0x80000000 bcc f233 msr cpsr_f, 0 teq r0, 0x80000000 bcc f233 b t234 f233: m_exit 233 t234: ; ARM 3: Bad CMP / CMN / TST / TEQ change the mode mov r8, 32 msr cpsr, MODE_FIQ mov r8, 64 msr spsr, MODE_SYS dw 0xE15FF000 ; cmp pc, pc nop nop beq f234 cmp r8, 32 bne f234 b t235 f234: m_exit 234 t235: ; ARM 3: Bad CMP / CMN / TST / TEQ do not flush the pipeline mov r8, 0 dw 0xE15FF000 ; cmp pc, pc mov r8, 1 nop cmp r8, 0 beq f235 b data_processing_passed f235: m_exit 235 data_processing_passed:
source/command/sys.asm
mega65dev/rom-assembler
0
100867
<reponame>mega65dev/rom-assembler<gh_stars>0 ; ******************************************************************************************** ; ******************************************************************************************** ; ; Name : sys.asm ; Purpose : .. ; Created : 15th Nov 1991 ; Updated : 4th Jan 2021 ; Authors : <NAME> ; ; ******************************************************************************************** ; ******************************************************************************************** sys jsr getwrd ; convert arg to integer value lda linnum ; set up arg's for call to 'long jsr' sta _pclo lda linnum+1 sta _pchi lda current_bank sta _bank jsr optbyt ; (optional) .A reg arg bcc l63_1 stx _a_reg l63_1 jsr optbyt ; (optional) .X reg arg bcc l63_2 stx _x_reg l63_2 jsr optbyt ; (optional) .Y reg arg bcc l63_4 stx _y_reg l63_3 jsr optbyt ; (optional) .Z reg arg bcc l63_4 stx _z_reg l63_4 jsr optbyt ; (optional) .S reg arg bcc l63_5 stx _s_reg l63_5 jmp _jsr_far ; far, far away ;If returns, Kernel will update _reg's for us ;.end ; ******************************************************************************************** ; ; Date Changes ; ==== ======= ; ; ********************************************************************************************
oeis/037/A037777.asm
neoneye/loda-programs
11
81758
<filename>oeis/037/A037777.asm ; A037777: Base 9 digits are, in order, the first n terms of the periodic sequence with initial period 3,1,0,2. ; Submitted by <NAME> ; 3,28,252,2270,20433,183898,1655082,14895740,134061663,1206554968,10858994712,97730952410,879578571693,7916207145238,71245864307142,641212778764280,5770915008878523 add $0,1 mov $2,3 lpb $0 mov $3,$2 lpb $3 add $2,2 mod $3,5 sub $3,1 add $4,1 lpe sub $0,1 add $2,2 mul $4,9 lpe mov $0,$4 div $0,9
programs/oeis/203/A203310.asm
neoneye/loda
22
247221
<gh_stars>10-100 ; A203310: a(n) = A203309(n+1)/A203309(n). ; 2,15,252,7560,356400,24324300,2270268000,277880803200,43197833952000,8315583035760000,1942008468966720000,540988073497872000000,177227692877902867200000,67457290601651778828000000 add $0,1 mov $1,$0 mov $2,$0 lpb $0 mul $2,2 div $2,$1 lpb $0 add $3,1 add $3,$0 sub $0,1 mul $2,$3 lpe lpe mov $0,$2 div $0,2
oeis/245/A245343.asm
neoneye/loda-programs
11
17832
; A245343: Sum of digits of n written in fractional base 5/3. ; Submitted by <NAME>(s3) ; 0,1,2,3,4,3,4,5,6,7,4,5,6,7,8,7,8,9,10,11,6,7,8,9,10,7,8,9,10,11,10,11,12,13,14,7,8,9,10,11,10,11,12,13,14,9,10,11,12,13,10,11,12,13,14,13,14,15,16,17,8,9,10,11,12,11,12,13,14,15 lpb $0 mul $0,2 mov $2,$0 div $0,10 mul $0,3 mod $2,10 add $3,$2 lpe mov $0,$3 div $0,2
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco/CiscoLexer.g4
loftwah/batfish
0
5351
lexer grammar CiscoLexer; options { superClass = 'org.batfish.grammar.BatfishLexer'; } @members { private int lastTokenType = -1; private boolean enableIPV6_ADDRESS = true; private boolean enableIP_ADDRESS = true; private boolean enableDEC = true; private boolean enableACL_NUM = false; private boolean enableCOMMUNITY_LIST_NUM = false; private boolean enableREGEX = false; private boolean _inAccessList = false; private boolean inCommunitySet = false; private boolean _asa = false; private boolean _foundry = false; private boolean _cadant = false; @Override public void emit(Token token) { super.emit(token); if (token.getChannel() != HIDDEN) { lastTokenType = token.getType(); } } public void setAsa(boolean asa) { _asa = asa; } public void setCadant(boolean cadant) { _cadant = cadant; } public void setFoundry(boolean foundry) { _foundry = foundry; } public String printStateVariables() { StringBuilder sb = new StringBuilder(); sb.append("enableIPV6_ADDRESS: " + enableIPV6_ADDRESS + "\n"); sb.append("enableIP_ADDRESS: " + enableIP_ADDRESS + "\n"); sb.append("enableDEC: " + enableDEC + "\n"); sb.append("enableACL_NUM: " + enableACL_NUM+ "\n"); sb.append("enableCOMMUNITY_LIST_NUM: " + enableCOMMUNITY_LIST_NUM + "\n"); return sb.toString(); } } tokens { ACL_NUM_APPLETALK, ACL_NUM_EXTENDED, ACL_NUM_EXTENDED_IPX, ACL_NUM_EXTENDED_MAC, ACL_NUM_FOUNDRY_L2, ACL_NUM_IPX, ACL_NUM_IPX_SAP, ACL_NUM_MAC, ACL_NUM_OTHER, ACL_NUM_PROTOCOL_TYPE_CODE, ACL_NUM_STANDARD, AS_PATH_SET_REGEX, ASA_BANNER_LINE, COMMUNITY_LIST_NUM_EXPANDED, COMMUNITY_LIST_NUM_STANDARD, COMMUNITY_SET_REGEX, CONFIG_SAVE, DSA1024, END_CADANT, HEX_FRAGMENT, IS_LOCAL, ISO_ADDRESS, LINE_CADANT, PAREN_LEFT_LITERAL, PAREN_RIGHT_LITERAL, PASSWORD_SEED, PIPE, PROMPT_TIMEOUT, QUOTED_TEXT, RAW_TEXT, SELF_SIGNED, SLIP_PPP, STATEFUL_DOT1X, STATEFUL_KERBEROS, STATEFUL_NTLM, TEXT, VALUE, WIRED, WISPR } // Cisco Keywords AAA : 'aaa' ; AAA_PROFILE : 'aaa-profile' ; AAA_SERVER : 'aaa-server' ; AAA_USER : 'aaa-user' ; ABSOLUTE_TIMEOUT : 'absolute-timeout' ; ACAP : 'acap' ; ACCEPT_DIALIN : 'accept-dialin' ; ACCEPT_LIFETIME : 'accept-lifetime' ; ACCEPT_OWN : 'accept-own' ; ACCEPT_REGISTER : 'accept-register' ; ACCEPT_RP : 'accept-rp' ; ACCESS : 'access' ; ACCESS_CLASS : 'access-class' ; ACCESS_GROUP : 'access-group' ; ACCESS_LIST : 'access-list' {enableACL_NUM = true; enableDEC = false;_inAccessList = true;} ; ACCESS_LOG : 'access-log' ; ACCESS_MAP : 'access-map' ; ACCESS_SESSION : 'access-session' ; ACCOUNTING : 'accounting' ; ACCOUNTING_LIST : 'accounting-list' ; ACCOUNTING_PORT : 'accounting-port' ; ACCOUNTING_SERVER_GROUP : 'accounting-server-group' ; ACCOUNTING_THRESHOLD : 'accounting-threshold' ; ACCT_PORT : 'acct-port' ; ACFE : 'acfe' ; ACK : 'ack' ; ACL : 'acl' ; ACL_POLICY : 'acl-policy' ; ACLLOG : 'acllog' ; ACR_NEMA : 'acr-nema' ; ACTION : 'action' ; ACTION_TYPE : 'action-type' ; ACTIVATE : 'activate' ; ACTIVATE_SERVICE_WHITELIST : 'activate-service-whitelist' ; ACTIVATED_SERVICE_TEMPLATE : 'activated-service-template' ; ACTIVATION_CHARACTER : 'activation-character' ; ACTIVE : 'active' ; ADD : 'add' ; ADD_PATHS : 'add-paths' ; ADD_ROUTE : 'add-route' ; ADD_VLAN : 'add-vlan' ; ADDITIONAL_PATHS : 'additional-paths' ; ADDITIVE : 'additive' ; ADDRESS : 'address' ; ADDRESS_FAMILY : 'address-family' ; ADDRESS_HIDING : 'address-hiding' ; ADDRESS_POOL : 'address-pool' ; ADDRESS_POOLS : 'address-pools' ; ADDRESS_RANGE : 'address-range' ; ADDRESS_TABLE : 'address-table' ; ADDRGROUP : 'addrgroup' ; ADJACENCY : 'adjacency' ; ADJACENCY_CHECK : 'adjacency-check' ; ADJACENCY_STALE_TIMER : 'adjacency-stale-timer' ; ADJMGR : 'adjmgr' ; ADMIN : 'admin' ; ADMIN_DIST : 'admin-dist' ; ADMIN_DISTANCE : 'admin-distance' ; ADMIN_STATE : 'admin-state' ; ADMIN_VDC : 'admin-vdc' ; ADMINISTRATIVE_WEIGHT : 'administrative-weight' ; ADMINISTRATIVELY_PROHIBITED : 'administratively-prohibited' ; ADMISSION : 'admission' ; ADMISSION_CONTROL : 'admission-control' ; ADP : 'adp' ; ADVERTISE : 'advertise' ; ADVERTISEMENT_INTERVAL : 'advertisement-interval' ; ADVERTISE_INACTIVE : 'advertise-inactive' ; ADVERTISE_MAP : 'advertise-map' ; AES : 'aes' ; AES128 : 'aes128' ; AES192 : 'aes192' ; AES256 : 'aes256' ; AES128_SHA1 : 'aes128-sha1' ; AES256_SHA1 : 'aes256-sha1' ; AESA : 'aesa' ; AF_GROUP : 'af-group' ; AF_INTERFACE : 'af-interface' -> pushMode ( M_Interface ) ; AF11 : 'af11' ; AF12 : 'af12' ; AF13 : 'af13' ; AF21 : 'af21' ; AF22 : 'af22' ; AF23 : 'af23' ; AF31 : 'af31' ; AF32 : 'af32' ; AF33 : 'af33' ; AF41 : 'af41' ; AF42 : 'af42' ; AF43 : 'af43' ; AFFINITY : 'affinity' ; AFFINITY_MAP : 'affinity-map' ; AFPOVERTCP : 'afpovertcp' ; AFTER_AUTO : 'after-auto' ; AGE : 'age' ; AGGREGATE : 'aggregate' ; AGGREGATE_ADDRESS : 'aggregate-address' ; AGING : 'aging' ; AH : 'ah' ; AH_MD5_HMAC : 'ah-md5-hmac' ; AH_SHA_HMAC : 'ah-sha-hmac' ; AHP : 'ahp' ; AIRGROUP : 'airgroup' ; AIRGROUPSERVICE : 'airgroupservice' ; AIS_SHUT : 'ais-shut' ; ALARM : 'alarm' ; ALARM_REPORT : 'alarm-report' ; ALERT_GROUP : 'alert-group' ; ALERTS : 'alerts' ; ALG : 'alg' ; ALG_BASED_CAC : 'alg-based-cac' ; ALIAS : 'alias' -> pushMode ( M_Alias ) ; ALL : 'all' ; ALL_ALARMS : 'all-alarms' ; ALL_OF_ROUTER : 'all-of-router' ; ALLOCATE : 'allocate' ; ALLOCATION : 'allocation' ; ALLOW : 'allow' ; ALLOW_CONNECTIONS : 'allow-connections' ; ALLOW_DEFAULT : 'allow-default' ; ALLOW_FAIL_THROUGH : 'allow-fail-through' ; ALLOW_NOPASSWORD_REMOTE_LOGIN : 'allow-nopassword-remote-login' ; ALLOW_SELF_PING : 'allow-self-ping' ; ALLOWED : 'allowed' ; ALLOWAS_IN : 'allowas-in' ; ALTERNATE_ADDRESS : 'alternate-address' ; ALTERNATE_AS : 'alternate-as' ; ALWAYS : 'always' ; ALWAYS_COMPARE_MED : 'always-compare-med' ; ALWAYS_ON : 'always-on' ; ALWAYS_ON_VPN : 'always-on-vpn' ; AM_DISABLE : 'am-disable' ; AM_SCAN_PROFILE : 'am-scan-profile' ; AMON : 'amon' ; AMT : 'amt' ; AND : 'and' ; ANTENNA : 'antenna' ; ANY : 'any' ; ANY4 : 'any4' ; ANY6 : 'any6' ; ANYCONNECT : 'anyconnect' ; ANYCONNECT_ESSENTIALS : 'anyconnect-essentials' ; AOL : 'aol' ; AP : 'ap' ; AP_BLACKLIST_TIME : 'ap-blacklist-time' ; AP_CLASSIFICATION_RULE : 'ap-classification-rule' ; AP_CRASH_TRANSFER : 'ap-crash-transfer' ; AP_GROUP : 'ap-group' ; AP_LACP_STRIPING_IP : 'ap-lacp-striping-ip' ; AP_NAME : 'ap-name' ; AP_RULE_MATCHING : 'ap-rule-matching' ; AP_SYSTEM_PROFILE : 'ap-system-profile' ; API : 'api' ; APP : 'app' ; APPCATEGORY : 'appcategory' ; APPLETALK : 'appletalk' ; APPLICATION : 'application' ; APPLY : 'apply' ; AQM_REGISTER_FNF : 'aqm-register-fnf' ; ARAP : 'arap' ; ARCHIVE : 'archive' ; ARCHIVE_LENGTH : 'archive-length' ; ARCHIVE_SIZE : 'archive-size' ; AREA : 'area' ; AREA_PASSWORD : '<PASSWORD>' ; ARM_PROFILE : 'arm-profile' ; ARM_RF_DOMAIN_PROFILE : 'arm-rf-domain-profile' ; ARP : 'arp' { enableIPV6_ADDRESS = false; } ; ARNS : 'arns' ; AS : 'as' ; AS_NUMBER : 'as-number' ; AS_OVERRIDE : 'as-override' ; AS_PATH : 'as-path' -> pushMode ( M_AsPath ) ; AS_PATH_SET : 'as-path-set' ; AS_SET : 'as-set' ; ASA : 'ASA' ; ASCENDING : 'ascending' ; ASCII_AUTHENTICATION : 'ascii-authentication' ; ASDM : 'asdm' ; ASDM_BUFFER_SIZE : 'asdm-buffer-size' ; ASF_RMCP : 'asf-rmcp' ; ASIP_WEBADMIN : 'asip-webadmin' ; ASN : 'asn' ; ASSEMBLER : 'assembler' ; ASSIGNMENT : 'assignment' ; ASSOC_RETRANSMIT : 'assoc-retransmit' ; ASSOCIATE : 'associate' ; ASSOCIATION : 'association' ; ASYMMETRIC : 'asymmetric' ; ASYNC : 'async' ; ASYNC_BOOTP : 'async-bootp' ; ASYNCHRONOUS : 'asynchronous' ; ATM : 'atm' ; ATTEMPTS : 'attempts' ; ATTRIBUTE : 'attribute' ; ATTRIBUTE_DOWNLOAD : 'attribute-download' ; ATTRIBUTE_MAP : 'attribute-map' ; ATTRIBUTE_NAMES : 'attribute-names' ; ATTRIBUTE_SET : 'attribute-set' ; ATTRIBUTES : 'attributes' ; AT_RTMP : 'at-rtmp' ; AUDIT : 'audit' ; AURP : 'aurp' ; AUTH : 'auth' ; AUTH_FAILURE_BLACKLIST_TIME : 'auth-failure-blacklist-time' ; AUTH_PORT : 'auth-port' ; AUTH_PROXY : 'auth-proxy' ; AUTH_SERVER : 'auth-server' ; AUTH_TYPE : 'auth-type' ; AUTHENTICATE : 'authenticate' ; AUTHENTICATION : 'authentication' -> pushMode ( M_Authentication ) ; AUTHENTICATION_DOT1X : 'authentication-dot1x' ; AUTHENTICATION_KEY : 'authentication-key' ; AUTHENTICATION_MAC : 'authentication-mac' ; AUTHENTICATION_PORT : 'authentication-port' ; AUTHENTICATION_RESTART : 'authentication-restart' ; AUTHENTICATION_RETRIES : 'authentication-retries' ; AUTHENTICATION_SERVER : 'authentication-server' ; AUTHENTICATION_SERVER_GROUP : 'authentication-server-group' ; AUTHORITATIVE : 'authoritative' ; AUTHORIZATION : 'authorization' ; AUTHORIZATION_REQUIRED : 'authorization-required' ; AUTHORIZATION_STATUS : 'authorization-status' ; AUTHORIZATION_SERVER_GROUP : 'authorization-server-group' ; AUTHORIZE : 'authorize' ; AUTHORIZED : 'authorized' ; AUTO : 'auto' ; AUTO_CERT_ALLOW_ALL : 'auto-cert-allow-all' ; AUTO_CERT_ALLOWED_ADDRS : 'auto-cert-allowed-addrs' ; AUTO_CERT_PROV : 'auto-cert-prov' ; AUTO_COST : 'auto-cost' ; AUTO_DISCARD : 'auto-discard' ; AUTO_IMPORT : 'auto-import' ; AUTO_LOCAL_ADDR : 'auto-local-addr' ; AUTO_RECOVERY : 'auto-recovery' ; AUTO_RP : 'auto-rp' ; AUTO_SHUTDOWN_NEW_NEIGHBORS : 'auto-shutdown-new-neighbors' ; AUTO_SUMMARY : 'auto-summary' ; AUTO_SYNC : 'auto-sync' ; AUTO_TUNNEL : 'auto-tunnel' ; AUTO_UPGRADE : 'auto-upgrade' ; AUTOCLASSIFY : 'autoclassify' ; AUTOHANGUP : 'autohangup' ; AUTONOMOUS_SYSTEM : 'autonomous-system' ; AUTORECOVERY : 'autorecovery' ; AUTOROUTE : 'autoroute' ; AUTORP : 'autorp' ; AUTOSELECT : 'autoselect' ; AUTOSTATE : 'autostate' ; AUX : 'aux' ; BACK_UP : 'back-up' ; BACKBONEFAST : 'backbonefast' ; BACKGROUND_ROUTES_ENABLE : 'background-routes-enable' ; BACKOFF_TIME : 'backoff-time' ; BACKUP : 'backup' ; BACKUPCRF : 'backupcrf' ; BAND_STEERING : 'band-steering' ; BANDWIDTH : 'bandwidth' ; BANDWIDTH_CONTRACT : 'bandwidth-contract' ; BANDWIDTH_PERCENT : 'bandwidth-percent' ; BANDWIDTH_PERCENTAGE : 'bandwidth-percentage' ; BANNER : 'banner' -> pushMode ( M_Banner ) ; BASE : 'base' ; BASH : 'bash' ; BASIC_1_0 : 'basic-1.0' ; BASIC_2_0 : 'basic-2.0' ; BASIC_5_5 : 'basic-5.5' ; BASIC_6_0 : 'basic-6.0' ; BASIC_9_0 : 'basic-9.0' ; BASIC_11_0 : 'basic-11.0' ; BASIC_12_0 : 'basic-12.0' ; BASIC_18_0 : 'basic-18.0' ; BASIC_24_0 : 'basic-24.0' ; BASIC_36_0 : 'basic-36.0' ; BASIC_48_0 : 'basic-48.0' ; BASIC_54_0 : 'basic-54.0' ; BCMC_OPTIMIZATION : 'bcmc-optimization' ; BCN_RPT_REQ_PROFILE : 'bcn-rpt-req-profile' ; BEACON : 'beacon' ; BESTPATH : 'bestpath' ; BESTPATH_LIMIT : 'bestpath-limit' ; BEYOND_SCOPE : 'beyond-scope' ; BFD : 'bfd' ; BFD_ECHO : 'bfd-echo' ; BFD_ENABLE : 'bfd-enable' ; BFD_TEMPLATE : 'bfd-template' ; BFTP : 'bftp' ; BGMP : 'bgmp' ; BGP : 'bgp' ; BGP_COMMUNITY : 'bgp-community' ; BGP_POLICY : 'bgp-policy' ; BIDIR_ENABLE : 'bidir-enable' ; BIDIR_OFFER_INTERVAL : 'bidir-offer-interval' ; BIDIR_OFFER_LIMIT : 'bidir-offer-limit' ; BIDIR_RP_LIMIT : 'bidir-rp-limit' ; BIFF : 'biff' ; BIND : 'bind' ; BITTORRENT : 'bittorrent' ; BITTORRENT_APPLICATION : 'bittorrent-application' ; BKUP_LMS_IP : 'bkup-lms-ip' ; BLACKLIST : 'blacklist' ; BLACKLIST_TIME : 'blacklist-time' ; BLOCK : 'block' ; BLOCK_ALLOCATION : 'block-allocation' ; BLOGGERD : 'bloggerd' ; BOOT : 'boot' ; BOOT_END_MARKER : 'boot-end-marker' ; BOOT_START_MARKER : 'boot-start-marker' ; BOOTFILE : 'bootfile' ; BOOTP_RELAY : 'bootp-relay' ; BOOTP : 'bootp' ; BOOTPC : 'bootpc' ; BOOTPS : 'bootps' ; BORDER : 'border' ; BORDER_ROUTER : 'border-router' ; BOTH : 'both' ; BOUNDARY : 'boundary' ; BPDUFILTER : 'bpdufilter' ; BPDUGUARD : 'bpduguard' ; BREAKOUT : 'breakout' ; BRIDGE : 'bridge' ; BRIDGE_DOMAIN : 'bridge-domain' ; BRIDGE_GROUP : 'bridge-group' ; BRIDGE_PRIORITY : 'bridge-priority' ; BROADCAST : 'broadcast' ; BROADCAST_ADDRESS : 'broadcast-address' ; BROADCAST_FILTER : 'broadcast-filter' ; BSD_CLIENT : 'bsd-client' ; BSD_USERNAME : 'bsd-username' ; BSR_BORDER : 'bsr-border' ; BSR_CANDIDATE : 'bsr-candidate' ; BUCKETS : 'buckets' ; BUFFER_LIMIT : 'buffer-limit' ; BUFFER_SIZE : 'buffer-size' ; BUFFERED : 'buffered' ; BUILDING_CONFIGURATION : 'Building configuration' ; BUNDLE : 'bundle' ; BUFFERS : 'buffers' ; BURST_SIZE : 'burst-size' ; BYTES : 'bytes' ; CA : 'ca' ; CABLE : 'cable' ; CABLE_DOWNSTREAM : 'cable-downstream' ; CABLE_RANGE : 'cable-range' ; CABLE_UPSTREAM : 'cable-upstream' ; CABLELENGTH : 'cablelength' -> pushMode ( M_COMMENT ) ; CACHE : 'cache' ; CACHE_TIMEOUT : 'cache-timeout' ; CALL : 'call' ; CALL_BLOCK : 'call-block' ; CALL_FORWARD : 'call-forward' ; CALL_HOME : 'call-home' ; CALL_MANAGER_FALLBACK : 'call-manager-fallback' ; CALLER_ID : 'caller-id' ; CALLHOME : 'callhome' ; CAM_ACL : 'cam-acl' ; CAM_PROFILE : 'cam-profile' ; CAPABILITY : 'capability' ; CAPTIVE : 'captive' ; CAPTIVE_PORTAL : 'captive-portal' ; CAPTIVE_PORTAL_CERT : 'captive-portal-cert' ; CAPTURE : 'capture' ; CARD : 'card' ; CARD_TRAP_INH : 'card-trap-inh' ; CARRIER_DELAY : 'carrier-delay' ; CAS_CUSTOM : 'cas-custom' ; CASE : 'case' ; CCM : 'ccm' ; CCM_GROUP : 'ccm-group' ; CCM_MANAGER : 'ccm-manager' ; CDP : 'cdp' ; CDP_URL : 'cdp-url' ; CEF : 'cef' ; CENTRALIZED_LICENSING_ENABLE : 'centralized-licensing-enable' ; CERTIFICATE : 'certificate' -> pushMode ( M_Certificate ) ; CFS : 'cfs' ; CGMP : 'cgmp' ; CHAIN : 'chain' ; CHANGES : 'changes' ; CHANNEL : 'channel' ; CHANNEL_GROUP : 'channel-group' ; CHANNEL_PROTOCOL : 'channel-protocol' ; CHANNELIZED : 'channelized' ; CHAP : 'chap' ; CHARGEN : 'chargen' ; CHASSIS_ID : 'chassis-id' ; CHAT_SCRIPT : 'chat-script' ; CHECK : 'check' ; CIFS : 'cifs' ; CIPC : 'cipc' ; CIR : 'cir' ; CIRCUIT_TYPE : 'circuit-type' ; CISCO_TDP : 'cisco_TDP' ; CISP : 'cisp' ; CITADEL : 'citadel' ; CITRIX_ICA : 'citrix-ica' ; CLASS : 'class' ; CLASS_DEFAULT : 'class-default' ; CLASS_MAP : 'class-map' ; CLASSLESS : 'classless' ; CLEANUP : 'cleanup' ; CLEAR : 'clear' ; CLEARCASE : 'clearcase' ; CLEAR_SESSION : 'clear-session' ; CLI : 'cli' ; CLIENT : 'client' ; CLIENT_GROUP : 'client-group' ; CLIENT_IDENTIFIER : 'client-identifier' ; CLIENT_NAME : 'client-name' ; CLIENT_TO_CLIENT : 'client-to-client' ; CLNS : 'clns' ; CLOCK : 'clock' ; CLOCK_PERIOD : 'clock-period' ; CLOSED : 'closed' ; CLUSTER : 'cluster' ; CLUSTER_ID : 'cluster-id' ; CMD : 'cmd' ; CMTS : 'cmts' ; CNS : 'cns' ; COAP : 'coap' ; CODEC : 'codec' ; COLLECT : 'collect' ; COLLECT_STATS : 'collect-stats' ; COMM_LIST : 'comm-list' ; COMMAND : 'command' -> pushMode ( M_Command ) ; COMMANDER_ADDRESS : 'commander-address' { enableIPV6_ADDRESS = false; } ; COMMANDS : 'commands' ; COMMERCE : 'commerce' ; COMMIT : 'commit' ; COMMON : 'common' ; COMMON_NAME : 'common-name' ; COMMUNITY : 'community' { enableIPV6_ADDRESS = false; } ; COMMUNITY_LIST : 'community-list' { enableIPV6_ADDRESS = false; enableCOMMUNITY_LIST_NUM = true; enableDEC = false; } ; COMMUNITY_MAP : 'community-map' -> pushMode ( M_Name ) ; COMMUNITY_SET : 'community-set' { inCommunitySet = true; enableIPV6_ADDRESS = false; } ; COMPARE_ROUTERID : 'compare-routerid' ; COMPATIBLE : 'compatible' ; CON : 'con' ; CONF_LEVEL_INCR : 'conf-level-incr' ; CONFDCONFIG : 'confdConfig' ; CONFED : 'confed' ; CONFEDERATION : 'confederation' ; CONFIG : 'config' ; CONFIG_COMMANDS : 'config-commands' ; CONFIG_REGISTER : 'config-register' ; CONFIGURATION : 'configuration' ; CONFIGURE : 'configure' ; CONFLICT_POLICY : 'conflict-policy' ; CONFORM_ACTION : 'conform-action' ; CONGESTION_CONTROL : 'congestion-control' ; CONN : 'conn' ; CONN_HOLDDOWN : 'conn-holddown' ; CONNECT_RETRY : 'connect-retry' ; CONNECT_SOURCE : 'connect-source' ; CONNECTED : 'connected' ; CONNECTION : 'connection' ; CONNECTION_MODE : 'connection-mode' ; CONNECTION_REUSE : 'connection-reuse' ; CONSOLE : 'console' ; CONTACT : 'contact' ; CONTACT_EMAIL_ADDR : 'contact-email-addr' ; CONTACT_NAME : 'contact-name' -> pushMode ( M_Description ) ; CONTENT_TYPE : 'content-type' ; CONTEXT : 'context' ; CONTEXT_NAME : 'context-name' ; CONTINUE : ( 'continue' ) | ( 'Continue' ) ; CONTRACT_ID : 'contract-id' ; CONTROL : 'control' ; CONTROL_APPS_USE_MGMT_PORT : 'control-apps-use-mgmt-port' ; CONTROL_DIRECTION : 'control-direction' ; CONTROL_PLANE : 'control-plane' ; CONTROL_PLANE_SECURITY : 'control-plane-security' ; CONTROL_WORD : 'control-word' ; CONTROLLER : 'controller' -> pushMode ( M_Interface ) ; CONVERSION_ERROR : 'conversion-error' ; CONTROLLER_IP : 'controller-ip' ; COOKIE : 'cookie' ; COPP : 'copp' ; COPS : 'cops' ; COPY : 'copy' ; COPY_ATTRIBUTES : 'copy-attributes' ; COS : 'cos' ; COS_MAPPING : 'cos-mapping' ; COS_QUEUE_GROUP : 'cos-queue-group' ; COST : 'cost' ; COST_COMMUNITY : 'cost-community' ; COUNT : 'count' ; COUNTRY : 'country' ; COUNTRY_CODE : 'country-code' ; COUNTER : 'counter' ; COUNTERS : 'counters' ; COURIER : 'courier' ; CPD : 'cpd' ; CPTONE : 'cptone' ; CPU_SHARE : 'cpu-share' ; CRASHINFO : 'crashinfo' ; CRC : 'crc' ; CREDENTIALS : 'credentials' ; CRITICAL : 'critical' ; CRYPTO : 'crypto' ; CRYPTOCHECKSUM : 'Cryptochecksum' ; CRYPTO_LOCAL : 'crypto-local' ; CRYPTOGRAPHIC_ALGORITHM : 'cryptographic-algorithm' ; CRL : 'crl' ; CS1 : 'cs1' ; CS2 : 'cs2' ; CS3 : 'cs3' ; CS4 : 'cs4' ; CS5 : 'cs5' ; CS6 : 'cs6' ; CS7 : 'cs7' ; CSD : 'csd' ; CSNP_INTERVAL : 'csnp-interval' ; CSNET_NS : 'csnet-ns' ; CSR_PARAMS : 'csr-params' ; CTIQBE : 'ctiqbe' ; CTL_FILE : 'ctl-file' ; CTS : 'cts' ; CURRENT_CONFIGURATION : 'Current configuration' ; CUSTOM : 'custom' ; CUSTOMER_ID : 'customer-id' ; CVX : 'cvx' ; CVX_CLUSTER : 'cvx-cluster' ; CVX_LICENSE : 'cvx-license' ; CWR : 'cwr' ; D20_GGRP_DEFAULT : 'd20-ggrp-default' ; D30_GGRP_DEFAULT : 'd30-ggrp-default' ; DAEMON : 'daemon' ; DAMPEN : 'dampen' ; DAMPEN_IGP_METRIC : 'dampen-igp-metric' ; DAMPENING : 'dampening' ; DAMPENING_CHANGE : 'dampening-change' ; DAMPENING_INTERVAL : 'dampening-interval' ; DATA_PRIVACY : 'data-privacy' ; DATABASE : 'database' ; DATABITS : 'databits' ; DAYTIME : 'daytime' ; DBL : 'dbl' ; DCB : 'dcb' ; DCB_BUFFER_THRESHOLD : 'dcb-buffer-threshold' ; DCB_POLICY : 'dcb-policy' ; DCBX : 'dcbx' ; DCE_MODE : 'dce-mode' ; DEAD_INTERVAL : 'dead-interval' ; DEADTIME : 'deadtime' ; DEBUG : 'debug' ; DEBUG_TRACE : 'debug-trace' ; DEBUGGING : 'debugging' ; DECAP_GROUP : 'decap-group' ; DECREMENT : 'decrement' ; DEFAULT : 'default' ; DEFAULT_ACTION : 'default-action' ; DEFAULT_COST : 'default-cost' ; DEFAULT_DESTINATION : 'default-destination' ; DEFAULT_DOMAIN : 'default-domain' ; DEFAULT_GATEWAY : 'default-gateway' ; DEFAULT_GROUP_POLICY : 'default-group-policy' ; DEFAULT_GUEST_ROLE : 'default-guest-role' ; DEFAULT_GW : 'default-gw' ; DEFAULT_INFORMATION : 'default-information' ; DEFAULT_INFORMATION_ORIGINATE : 'default-information-originate' ; DEFAULT_INSPECTION_TRAFFIC : 'default-inspection-traffic' ; DEFAULT_MAX_FRAME_SIZE : 'default-max-frame-size' ; DEFAULT_METRIC : 'default-metric' ; DEFAULT_NETWORK : 'default-network' ; DEFAULT_ORIGINATE : 'default-originate' ; DEFAULT_ROLE : 'default-role' ; DEFAULT_ROUTER : 'default-router' ; DEFAULT_ROUTE_TAG : 'default-route-tag' ; DEFAULT_TASKGROUP : 'default-taskgroup' ; DEFAULT_TOS_QOS10 : 'default-tos-qos10' ; DEFAULT_VALUE : 'default-value' ; DEFINITION : 'definition' ; DEL : 'Del' ; DELIMITER : 'delimiter' ; DELAY : 'delay' ; DELAY_START : 'delay-start' ; DELETE : 'delete' ; DELETE_DYNAMIC_LEARN : 'delete-dynamic-learn' ; DEMAND_CIRCUIT : 'demand-circuit' ; DENSE_MODE : 'dense-mode' ; DENY : 'deny' ; DENY_INTER_USER_TRAFFIC : 'deny-inter-user-traffic' ; DEPI : 'depi' ; DEPI_CLASS : 'depi-class' ; DEPI_TUNNEL : 'depi-tunnel' ; DEPLOY : 'deploy' ; DERIVATION_RULES : 'derivation-rules' ; DES : 'des' ; DES_SHA1 : 'des-sha1' ; DESCENDING : 'descending' ; DESCRIPTION : 'description' -> pushMode ( M_Description ) ; DESIRABLE : 'desirable' ; DEST_IP : 'dest-ip' ; DESTINATION : 'destination' ; DESTINATION_PATTERN : 'destination-pattern' ; DESTINATION_PROFILE : 'destination-profile' ; DESTINATION_SLOT : 'destination-slot' ; DESTINATION_UNREACHABLE : 'destination-unreachable' ; DESTINATION_VRF : 'destination-vrf' ; DETAIL : 'detail' ; DETECT_ADHOC_NETWORK : 'detect-adhoc-network' ; DETECT_AP_FLOOD : 'detect-ap-flood' ; DETECT_AP_IMPERSONATION : 'detect-ap-impersonation' ; DETECT_BAD_WEP : 'detect-bad-wep' ; DETECT_BEACON_WRONG_CHANNEL : 'detect-beacon-wrong-channel' ; DETECT_CHOPCHOP_ATTACK : 'detect-chopchop-attack' ; DETECT_CLIENT_FLOOD : 'detect-client-flood' ; DETECT_CTS_RATE_ANOMALY : 'detect-cts-rate-anomaly' ; DETECT_EAP_RATE_ANOMALY : 'detect-eap-rate-anomaly' ; DETECT_HOTSPOTTER : 'detect-hotspotter' ; DETECT_HT_40MHZ_INTOLERANCE : 'detect-ht-40mhz-intolerance' ; DETECT_HT_GREENFIELD : 'detect-ht-greenfield' ; DETECT_INVALID_ADDRESS_COMBINATION : 'detect-invalid-address-combination' ; DETECT_INVALID_MAC_OUI : 'detect-invalid-mac-oui' ; DETECT_MALFORMED_ASSOCIATION_REQUEST : 'detect-malformed-association-request' ; DETECT_MALFORMED_AUTH_FRAME : 'detect-malformed-auth-frame' ; DETECT_MALFORMED_HTIE : 'detect-malformed-htie' ; DETECT_MALFORMED_LARGE_DURATION : 'detect-malformed-large-duration' ; DETECT_MISCONFIGURED_AP : 'detect-misconfigured-ap' ; DETECT_OVERFLOW_EAPOL_KEY : 'detect-overflow-eapol-key' ; DETECT_OVERFLOW_IE : 'detect-overflow-ie' ; DETECT_RATE_ANOMALIES : 'detect-rate-anomalies' ; DETECT_RTS_RATE_ANOMALY : 'detect-rts-rate-anomaly' ; DETECT_TKIP_REPLAY_ATTACK : 'detect-tkip-replay-attack' ; DETECT_VALID_SSID_MISUSE : 'detect-valid-ssid-misuse' ; DETECT_WIRELESS_BRIDGE : 'detect-wireless-bridge' ; DETECT_WIRELESS_HOSTED_NETWORK : 'detect-wireless-hosted-network' ; DETERMINISTIC_MED : 'deterministic-med' ; DEV : 'dev' -> pushMode ( M_Interface ) ; DEVICE : 'device' ; DEVICE_ID : 'device-id' ; DEVICE_SENSOR : 'device-sensor' ; DISABLE_CONNECTED_CHECK : 'disable-connected-check' ; DISABLE_PEER_AS_CHECK : 'disable-peer-as-check' ; DISCRIMINATOR : 'discriminator' ; DISPUTE : 'dispute' ; DF : 'df' ; DF_BIT : 'df-bit' ; DFA_REGEX : 'dfa-regex' ; DFS : 'dfs' ; DHCP : 'dhcp' ; DHCP_FAILOVER2 : 'dhcp-failover2' ; DHCP_GIADDR : 'dhcp-giaddr' ; DHCPD : 'dhcpd' ; DHCPRELAY : 'dhcprelay' ; DHCPV6_CLIENT : 'dhcpv6-client' ; DHCPV6_SERVER : 'dhcpv6-server' ; DIAGNOSTIC : 'diagnostic' ; DIAGNOSTIC_SIGNATURE : 'diagnostic-signature' ; DIAL_CONTROL_MIB : 'dial-control-mib' ; DIAL_PEER : 'dial-peer' ; DIAL_STRING : 'dial-string' ; DIALER : 'dialer' ; DIALER_GROUP : 'dialer-group' ; DIALER_LIST : 'dialer-list' ; DIALPLAN_PATTERN : 'dialplan-pattern' ; DIALPLAN_PROFILE : 'dialplan-profile' ; DIRECT : 'direct' ; DIRECT_INWARD_DIAL : 'direct-inward-dial' ; DIRECTED_BROADCAST : 'directed-broadcast' ; DIRECTED_REQUEST : 'directed-request' ; DISABLE : 'disable' ; DISABLE_ADVERTISEMENT : 'disable-advertisement' ; DISCARD : 'discard' ; DISCARD_ROUTE : 'discard-route' ; DISCOVERED_AP_CNT : 'discovered-ap-cnt' ; DISCOVERY : 'discovery' ; DISTANCE : 'distance' ; DISTRIBUTE : 'distribute' ; DISTRIBUTE_LIST : 'distribute-list' ; DISTRIBUTION : 'distribution' ; DM_FALLBACK : 'dm-fallback' ; DNS : 'dns' ; DNS_DOMAIN : 'dns-domain' ; DNS_GUARD : 'dns-guard' ; DNS_SERVER : 'dns-server' ; DNSIX : 'dnsix' ; DO : 'do' ; DO_UNTIL_FAILURE : 'do-until-failure' ; DOCSIS_ENABLE : 'docsis-enable' ; DOCSIS_GROUP : 'docsis-group' ; DOCSIS_POLICY : 'docsis-policy' ; DOCSIS_VERSION : 'docsis-version' ; DOCSIS30_ENABLE : 'docsis30-enable' ; DOD_HOST_PROHIBITED : 'dod-host-prohibited' ; DOD_NET_PROHIBITED : 'dod-net-prohibited' ; DOMAIN : 'domain' ; DOMAIN_ID : 'domain-id' ; DOMAIN_LIST : 'domain-list' ; DOMAIN_LOOKUP : 'domain-lookup' ; DOMAIN_NAME : 'domain-name' ; DONE : 'done' ; DONT_CAPABILITY_NEGOTIATE : 'dont-capability-negotiate' ; DOS_PROFILE : 'dos-profile' ; DOT11 : 'dot11' ; DOT11A_RADIO_PROFILE : 'dot11a-radio-profile' ; DOT11G_RADIO_PROFILE : 'dot11g-radio-profile' ; DOT11K_PROFILE : 'dot11k-profile' ; DOT11R_PROFILE : 'dot11r-profile' ; DOT1P_PRIORITY : 'dot1p-priority' ; DOT1Q : 'dot1' [Qq] ; DOT1Q_TUNNEL : 'dot1q-tunnel' ; DOT1X : 'dot1x' ; DOT1X_DEFAULT_ROLE : 'dot1x-default-role' ; DOT1X_ENABLE : 'dot1x-enable' ; DOT1X_SERVER_GROUP : 'dot1x-server-group' ; DOWNLINK : 'downlink' ; DOWNSTREAM : 'downstream' ; DOWNSTREAM_START_THRESHOLD : 'downstream-start-threshold' ; DPG : 'dpg' ; DR_PRIORITY : 'dr-priority' ; DROP : 'drop' ; DS_HELLO_INTERVAL : 'ds-hello-interval' ; DS_MAX_BURST : 'ds-max-burst' ; DS0_GROUP : 'ds0-group' ; DSCP : 'dscp' ; DSCP_VALUE : 'dscp-value' ; DSG : 'dsg' ; DSL : 'dsl' ; DSP : 'dsp' ; DSPFARM : 'dspfarm' ; DSS : 'dss' ; DST_NAT : 'dst-nat' ; DSU : 'dsu' ; DTMF_RELAY : 'dtmf-relay' ; DTP : 'dtp' ; DUAL_ACTIVE : 'dual-active' ; DUAL_AS : 'dual-as' ; DUAL_MODE_DEFAULT_VLAN : 'dual-mode-default-vlan' ; DUPLEX : 'duplex' ; DUPLICATE_MESSAGE : 'duplicate-message' ; DURATION : 'duration' ; DVMRP : 'dvmrp' ; DYNAMIC : 'dynamic' ; DYNAMIC_ACCESS_POLICY_RECORD : 'dynamic-access-policy-record' ; DYNAMIC_AUTHOR : 'dynamic-author' ; DYNAMIC_CAPABILITY : 'dynamic-capability' ; DYNAMIC_EXTENDED : 'dynamic-extended' ; DYNAMIC_MAP : 'dynamic-map' ; DYNAMIC_MCAST_OPTIMIZATION : 'dynamic-mcast-optimization' ; DYNAMIC_MCAST_OPTIMIZATION_THRESH : 'dynamic-mcast-optimization-thresh' ; E164 : 'e164' ; E164_PATTERN_MAP : 'e164-pattern-map' ; EAP_PASSTHROUGH : 'eap-passthrough' ; EAPOL_RATE_OPT : 'eapol-rate-opt' ; EARLY_OFFER : 'early-offer' ; EBGP : 'ebgp' ; EBGP_MULTIHOP : 'ebgp-multihop' ; ECE : 'ece' ; ECHO : 'echo' ; ECHO_CANCEL : 'echo-cancel' ; ECHO_REPLY : 'echo-reply' ; ECHO_REQUEST : 'echo-request' ; ECHO_RX_INTERVAL : 'echo-rx-interval' ; ECMP : 'ecmp' ; ECMP_GROUP : 'ecmp-group' ; ECN : 'ecn' ; EDCA_PARAMETERS_PROFILE : 'edca-parameters-profile' ; EDGE : 'edge' ; EF : 'ef' ; EFS : 'efs' ; EGP : 'egp' ; EGRESS : 'egress' ; EGRESS_INTERFACE_SELECTION : 'egress-interface-selection' ; EIBGP : 'eibgp' ; EIGRP : 'eigrp' ; ELSE : 'else' ; ELSEIF : 'elseif' ; EMAIL : 'email' ; EMAIL_ADDR : 'email-addr' -> pushMode ( M_Description ) ; EMAIL_CONTACT : 'email-contact' -> pushMode ( M_Description ) ; EMERGENCIES : 'emergencies' ; EMPTY : 'empty' ; ENABLE : 'enable' ; ENABLE_ACL_CAM_SHARING : 'enable-acl-cam-sharing' ; ENABLE_ACL_COUNTER : 'enable-acl-counter' ; ENABLE_AUTHENTICATION : 'enable-authentication' ; ENABLE_QOS_STATISTICS : 'enable-qos-statistics' ; ENABLE_WELCOME_PAGE : 'enable-welcome-page' ; ENABLED : 'enabled' ; ENCAPSULATION : 'encapsulation' ; ENCR : 'encr' ; ENCRYPTED : 'encrypted' ; ENCRYPTED_PASSWORD : '<PASSWORD>' ; ENCRYPTION : 'encryption' ; END : 'end' ; ENDIF : 'endif' ; END_CLASS_MAP : 'end-class-map' ; END_POLICY : 'end-policy' ; END_POLICY_MAP : 'end-policy-map' ; END_SET : 'end-set' { inCommunitySet = false; } ; ENET_LINK_PROFILE : 'enet-link-profile' ; ENFORCE_DHCP : 'enforce-dhcp' ; ENFORCE_FIRST_AS : 'enforce-first-as' ; ENFORCE_RULE : 'enforce-rule' ; ENFORCED : 'enforced' ; ENGINE : 'engine' ; ENGINEID : ( 'engineid' | 'engineID' ) -> pushMode ( M_COMMENT ) ; ENROLLMENT : 'enrollment' ; ENVIRONMENT : 'environment' ; ENVIRONMENT_MONITOR : 'environment-monitor' ; EOF_LITERAL : 'EOF' ; EOU : 'eou' ; EPHONE_DN_TEMPLATE : 'ephone-dn-template' ; EPM : 'epm' ; EPP : 'epp' ; EQ : 'eq' ; ERRDISABLE : 'errdisable' ; ERROR : 'error' ; ERROR_ENABLE : 'error-enable' ; ERROR_RATE_THRESHOLD : 'error-rate-threshold' ; ERROR_RECOVERY : 'error-recovery' ; ERROR_PASSTHRU : 'error-passthru' ; ERRORS : 'errors' ; ERSPAN_ID : 'erspan-id' ; ESCAPE_CHARACTER : 'escape-character' ; ESM : 'esm' ; ESP : 'esp' ; ESP_3DES : 'esp-3des' ; ESP_AES : 'esp-aes' ; ESP_AES128 : 'esp-aes128' ; ESP_AES192 : 'esp-aes192' ; ESP_AES256 : 'esp-aes256' ; ESP_DES : 'esp-des' ; ESP_GCM : 'esp-gcm' ; ESP_AES128_GCM : 'esp-aes128-gcm' ; ESP_AES256_GCM : 'esp-aes256-gcm' ; ESP_GMAC : 'esp-gmac' ; ESP_MD5_HMAC : 'esp-md5-hmac' ; ESP_NULL : 'esp-null' ; ESP_SEAL : 'esp-seal' ; ESP_SHA_HMAC : 'esp-sha-hmac' ; ESP_SHA256_HMAC : 'esp-sha256-hmac' ; ESP_SHA512_HMAC : 'esp-sha512-hmac' ; ESRO_GEN : 'esro-gen' ; ESSID : 'essid' ; ESTABLISHED : 'established' ; ETH : 'eth' ; ETHERCHANNEL : 'etherchannel' ; ETHERNET : 'ethernet' ; ETHERNET_SERVICES : 'ethernet-services' ; ETYPE : 'etype' ; EVALUATE : 'evaluate' ; EVENT : 'event' ; EVENT_HANDLER : 'event-handler' ; EVENT_HISTORY : 'event-history' ; EVENT_LOG_SIZE : 'event-log-size' ; EVENT_THRESHOLDS_PROFILE : 'event-thresholds-profile' ; EVENTS : 'events' ; EXACT : 'exact' ; EXCEED_ACTION : 'exceed-action' ; EXCEPT : 'except' ; EXCEPTION : 'exception' ; EXCEPTION_SLAVE : 'exception-slave' ; EXCLUDE : 'exclude' ; EXCLUDED_ADDRESS : 'excluded-address' ; EXEC : 'exec' ; EXEC_TIMEOUT : 'exec-timeout' ; EXECUTE : 'execute' -> pushMode ( M_Execute ) ; EXEMPT : 'exempt' ; EXIST_MAP : 'exist-map' ; EXIT : 'exit' ; EXIT_ADDRESS_FAMILY : 'exit-address-family' ; EXIT_AF_INTERFACE : 'exit-af-interface' ; EXIT_AF_TOPOLOGY : 'exit-af-topology' ; EXIT_PEER_POLICY : 'exit-peer-policy' ; EXIT_PEER_SESSION : 'exit-peer-session' ; EXIT_SERVICE_FAMILY : 'exit-service-family' ; EXIT_SF_INTERFACE : 'exit-sf-interface' ; EXIT_SF_TOPOLOGY : 'exit-sf-topology' ; EXIT_VRF : 'exit-vrf' ; EXPECT : 'expect' ; EXPLICIT_NULL : 'explicit-null' ; EXPORT : 'export' ; EXPORT_PROTOCOL : 'export-protocol' ; EXPORTER : 'exporter' ; EXPORTER_MAP : 'exporter-map' ; EXPANDED : 'expanded' ; EXTCOMM_LIST : 'extcomm-list' ; EXTCOMMUNITY : 'extcommunity' { if (lastTokenType == SET) { pushMode(M_Extcommunity); } } ; EXTCOMMUNITY_LIST : 'extcommunity-list' ; EXTEND : 'extend' ; EXTENDED : 'extended' { enableDEC = true; enableACL_NUM = false; } ; EXTENDED_COUNTERS : 'extended-counters' ; EXTENDED_DELAY : 'extended-delay' ; EXTERNAL : 'external' ; EXTERNAL_LSA : 'external-lsa' ; FABRIC : 'fabric' ; FABRIC_MODE : 'fabric-mode' ; FABRICPATH : 'fabricpath' ; FACILITY : 'facility' ; FACILITY_ALARM : 'facility-alarm' ; FAIL_MESSAGE : 'fail-message' ; FAILED : 'failed' ; FAILED_LIST : 'failed-list' ; FAILOVER : 'failover' ; FAILURE : 'failure' ; FAIL_OVER : 'fail-over' ; FAIR_QUEUE : 'fair-queue' ; FALL_OVER : 'fall-over' ; FALLBACK : 'fallback' ; FALLBACK_DN : 'fallback-dn' ; FAN : 'fan' ; FAST_AGE : 'fast-age' ; FAST_DETECT : 'fast-detect' ; FAST_EXTERNAL_FALLOVER : 'fast-external-fallover' ; FAST_FLOOD : 'fast-flood' ; FAST_REROUTE : 'fast-reroute' ; FAX : 'fax' ; FAX_RELAY : 'fax-relay' ; FCOE : 'fcoe' ; FDL : 'fdl' ; FEATURE : 'feature' ; FEATURE_SET : 'feature-set' ; FEX : 'fex' ; FEX_FABRIC : 'fex-fabric' ; FIBER_NODE : 'fiber-node' -> pushMode ( M_FiberNode ) ; FIELDS : 'fields' ; FILE : 'file' ; FILE_BROWSING : 'file-browsing' ; FILE_ENTRY : 'file-entry' ; FILE_SIZE : 'file-size' ; FILE_TRANSFER : 'file-transfer' ; FILTER : 'filter' ; FILTER_LIST : 'filter-list' ; FIREWALL : 'firewall' { enableIPV6_ADDRESS = false; } ; FIREWALL_VISIBILITY : 'firewall-visibility' ; FIN : 'fin' ; FINGER : 'finger' ; FIRMWARE : 'firmware' ; FLAP_LIST : 'flap-list' ; FLASH : 'flash' ; FLASH_OVERRIDE : 'flash-override' ; FLAT : 'flat' ; FLOATING_CONN : 'floating-conn' ; FLOOD : 'flood' ; FLOW : 'flow' ; FLOW_AGGREGATION : 'flow-aggregation' ; FLOW_CAPTURE : 'flow-capture' ; FLOW_CACHE : 'flow-cache' ; FLOW_CONTROL : 'flow-control' ; FLOW_EXPORT : 'flow-export' ; FLOW_SAMPLING_MODE : 'flow-sampling-mode' ; FLOW_SAMPLER : 'flow-sampler' ; FLOW_SAMPLER_MAP : 'flow-sampler-map' ; FLOW_TOP_TALKERS : 'flow-top-talkers' ; FLOWCONTROL : 'flowcontrol' ; FLUSH_AT_ACTIVATION : 'flush-at-activation' ; FLUSH_R1_ON_NEW_R0 : 'flush-r1-on-new-r0' ; FLUSH_ROUTES : 'flush-routes' ; FORCE : 'force' ; FORCED : 'forced' ; FOR : 'for' ; FORMAT : 'format' ; FORTYG_FULL : '40gfull' ; FORWARD : 'forward' ; FORWARD_DIGITS : 'forward-digits' ; FORWARD_PROTOCOL : 'forward-protocol' ; FORWARDER : 'forwarder' ; FORWARDING : 'forwarding' ; FPD : 'fpd' ; FQDN : 'fqdn' ; FRAGMENTS : 'fragments' ; FRAME_RELAY : 'frame-relay' ; FRAMING : 'framing' ; FREE_CHANNEL_INDEX : 'free-channel-index' ; FREQUENCY : 'frequency' ; FRI : 'Fri' ; FROM : 'from' ; FT : 'ft' ; FTP : 'ftp' ; FTP_DATA : 'ftp-data' ; FTP_SERVER : 'ftp-server' ; FTPS : 'ftps' ; FTPS_DATA : 'ftps-data' ; FULL_DUPLEX : 'full-duplex' ; FULL_TXT : 'full-txt' ; G709 : 'g709' ; G729 : 'g729' ; GATEKEEPER : 'gatekeeper' ; GATEWAY : 'gateway' ; GBPS : 'Gbps' ; GDOI : 'gdoi' ; GE : 'ge' ; GENERAL_GROUP_DEFAULTS : 'general-group-defaults' ; GENERAL_PARAMETER_PROBLEM : 'general-parameter-problem' ; GENERAL_PROFILE : 'general-profile' ; GENERATE : 'generate' ; GID : 'gid' ; GIG_DEFAULT : 'gig-default' ; GLBP : 'glbp' ; GLOBAL : 'global' ; GLOBALENFORCEPRIV : 'globalEnforcePriv' ; GLOBAL_MTU : 'global-mtu' ; GLOBAL_PORT_SECURITY : 'global-port-security' ; GOPHER : 'gopher' ; GODI : 'godi' ; GRACEFUL : 'graceful' ; GRACEFUL_RESTART : 'graceful-restart' ; GRACEFUL_RESTART_HELPER : 'graceful-restart-helper' ; GRACETIME : 'gracetime' ; GRANT : 'grant' ; GRATUITOUS_ARPS : 'gratuitous-arps' ; GRE : 'gre' ; GREEN : 'green' ; GROUP : 'group' ; GROUP_ALIAS : 'group-alias' ; GROUP_LIST : 'group-list' ; GROUP_LOCK : 'group-lock' ; GROUP_OBJECT : 'group-object' ; GROUP_POLICY : 'group-policy' ; GROUP_RANGE : 'group-range' ; GROUP_TIMEOUT : 'group-timeout' ; GROUP_URL : 'group-url' ; GROUP1 : 'group1' ; GROUP14 : 'group14' ; GROUP15 : 'group15' ; GROUP16 : 'group16' ; GROUP19 : 'group19' ; GROUP2 : 'group2' ; GROUP20 : 'group20' ; GROUP21 : 'group21' ; GROUP24 : 'group24' ; GROUP5 : 'group5' ; GSHUT : [Gg][Ss][Hh][Uu][Tt] ; GT : 'gt' ; GTP_C : 'gtp-c' ; GTP_PRIME : 'gtp-prime' ; GTP_U : 'gtp-u' ; GUARANTEED : 'guaranteed' ; GUARD : 'guard' ; GUEST_ACCESS_EMAIL : 'guest-access-email' ; GUEST_LOGON : 'guest-logon' ; GUEST_MODE : 'guest-mode' ; GW_TYPE_PREFIX : 'gw-type-prefix' ; H225 : 'h225' ; H323 : 'h323' ; H323_GATEWAY : 'h323-gateway' ; HA_CLUSTER : 'ha-cluster' ; HA_POLICY : 'ha-policy' ; HALF_CLOSED : 'half-closed' ; HALF_DUPLEX : 'half-duplex' ; HANDOVER_TRIGGER_PROFILE : 'handover-trigger-profile' ; HARDWARE : 'hardware' ; HARDWARE_ADDRESS : 'hardware-address' ; HARDWARE_COUNT : 'hardware-count' ; HASH : 'hash' ; HASH_ALGORITHM : 'hash-algorithm' ; HEADER_COMPRESSION : 'header-compression' ; HEADER_PASSING : 'header-passing' ; HEARTBEAT_INTERVAL : 'heartbeat-interval' ; HEARTBEAT_TIME : 'heartbeat-time' ; HELLO : 'hello' ; HELLO_INTERVAL : 'hello-interval' ; HELLO_MULTIPLIER : 'hello-multiplier' ; HELLO_PADDING : 'hello-padding' ; HELLO_PASSWORD : '<PASSWORD>' ; HELPER_ADDRESS : 'helper-address' ; HEX_KEY : 'hex-key' ; HIDDEN_LITERAL : 'hidden' ; HIDDEN_SHARES : 'hidden-shares' ; HIDEKEYS : 'hidekeys' ; HIGH : 'high' ; HIGH_AVAILABILITY : 'high-availability' ; HIGH_RESOLUTION : 'high-resolution' ; HISTORY : 'history' ; HOLD_TIME : 'hold-time' ; HOLD_QUEUE : 'hold-queue' ; HOMEDIR : 'homedir' ; HOP_LIMIT : 'hop-limit' ; HOPLIMIT : 'hoplimit' ; HOPS_OF_STATISTICS_KEPT : 'hops-of-statistics-kept' ; HOST : 'host' ; HOST_ASSOCIATION : 'host-association' ; HOST_INFO : 'host-info' ; HOST_ISOLATED : 'host-isolated' ; HOST_PRECEDENCE_UNREACHABLE : 'host-precedence-unreachable' ; HOST_PROXY : 'host-proxy' ; HOST_REDIRECT : 'host-redirect' ; HOST_ROUTING : 'host-routing' ; HOST_TOS_REDIRECT : 'host-tos-redirect' ; HOST_TOS_UNREACHABLE : 'host-tos-unreachable' ; HOST_UNKNOWN : 'host-unknown' ; HOST_UNREACHABLE : 'host-unreachable' ; HOSTNAME : 'hostname' ; HOSTNAMEPREFIX : 'hostnameprefix' ; HOTSPOT : 'hotspot' ; HP_ALARM_MGR : 'hp-alarm-mgr' ; HPM : 'hpm' ; HSRP : 'hsrp' ; HT_SSID_PROFILE : 'ht-ssid-profile' ; HTTP : 'http' ; HTTP_ALT : 'http-alt' ; HTTP_COMMANDS : 'http-commands' ; HTTP_MGMT : 'http-mgmt' ; HTTP_RPC_EPMAP : 'http-tpc-epmap' ; HTTPS : 'https' ; HUNT : 'hunt' ; HW_MODULE : 'hw-module' ; HW_SWITCH : 'hw-switch' ; IBGP : 'ibgp' ; ICMP : 'icmp' ; ICMP_ALTERNATE_ADDRESS : 'icmp-alternate-address' ; ICMP_CONVERSION_ERROR : 'icmp-conversion-error' ; ICMP_ECHO : 'icmp-echo' ; ICMP_ECHO_REPLY : 'icmp-echo-reply' ; ICMP_ERROR : 'icmp-error' ; ICMP_ERRORS : 'icmp-errors' ; ICMP_INFORMATION_REPLY : 'icmp-information-reply' ; ICMP_INFORMATION_REQUEST : 'icmp-information-request' ; ICMP_MASK_REPLY : 'icmp-mask-reply' ; ICMP_MASK_REQUEST : 'icmp-mask-request' ; ICMP_MOBILE_REDIRECT : 'icmp-mobile-redirect' ; ICMP_OBJECT : 'icmp-object' ; ICMP_PARAMETER_PROBLEM : 'icmp-parameter-problem' ; ICMP_REDIRECT : 'icmp-redirect' ; ICMP_ROUTER_ADVERTISEMENT : 'icmp-router-advertisement' ; ICMP_ROUTER_SOLICITATION : 'icmp-router-solicitation' ; ICMP_SOURCE_QUENCH : 'icmp-source-quench' ; ICMP_TIME_EXCEEDED : 'icmp-time-exceeded' ; ICMP_TIMESTAMP_REPLY : 'icmp-timestamp-reply' ; ICMP_TIMESTAMP_REQUEST : 'icmp-timestamp-request' ; ICMP_TRACEROUTE : 'icmp-traceroute' ; ICMP_TYPE : 'icmp-type' ; ICMP_UNREACHABLE : 'icmp-unreachable' ; ICMP6 : 'icmp6' ; ICMPV6 : 'icmpv6' ; ID : 'id' ; ID_MISMATCH : 'id-mismatch' ; ID_RANDOMIZATION : 'id-randomization' ; IDEAL_COVERAGE_INDEX : 'ideal-coverage-index' ; IDENT : 'ident' ; IDENTIFIER : 'identifier' ; IDENTITY : 'identity' ; IDLE : 'idle' ; IDLE_TIMEOUT : 'idle-timeout' ; IDP_CERT : 'idp-cert' ; IDS : 'ids' ; IDS_PROFILE : 'ids-profile' ; IEC : 'iec' ; IEEE_MMS_SSL : 'ieee-mms-ssl' ; IETF_FORMAT : 'ietf-format' ; IF : 'if' ; IFACL : 'ifacl' ; IFDESCR : 'ifdescr' ; IF_NEEDED : 'if-needed' ; IFINDEX : 'ifindex' ; IFMAP : 'ifmap' ; IFMIB : 'ifmib' ; IGMP : 'igmp' ; IGP_COST : 'igp-cost' ; IGRP : 'igrp' ; IGNORE : 'ignore' ; IGNORE_ATTACHED_BIT : 'ignore-attached-bit' ; IGP : 'igp' ; IKE : 'ike' ; IKEV1 : 'ikev1' ; IKEV2 : 'ikev2' ; IKEV2_PROFILE : 'ikev2-profile' ; ILMI_KEEPALIVE : 'ilmi-keepalive' ; IMAP : 'imap' ; IMAP3 : 'imap3' ; IMAP4 : 'imap4' ; IMAPS : 'imaps' ; IMMEDIATE : 'immediate' ; IMPERSONATION_PROFILE : 'impersonation-profile' ; IMPLICIT_USER : 'implicit-user' ; IMPORT : 'import' ; IN : 'in' ; INACTIVE : 'inactive' ; INACTIVITY_TIMER : 'inactivity-timer' ; INBAND : 'inband' ; INBOUND : 'inbound' ; INCLUDE : 'include' ; INCLUDE_RESERVE : 'include-reserve' ; INCLUDE_STUB : 'include-stub' ; INCOMING : 'incoming' ; INCOMPLETE : 'incomplete' ; INDEX : 'index' ; INFINITY : 'infinity' ; INFORM : 'inform' ; INFORMATION : 'information' ; INFORMATION_REPLY : 'information-reply' ; INFORMATION_REQUEST : 'information-request' ; INFORMATIONAL : 'informational' ; INFORMS : 'informs' ; INGRESS : 'ingress' ; INHERIT : 'inherit' ; INHERITANCE_DISABLE : 'inheritance-disable' ; INIT : 'init' ; INIT_STRING : 'init-string' ; INIT_TECH_LIST : 'init-tech-list' ; INITIAL_ROLE : 'initial-role' ; INJECT_MAP : 'inject-map' ; INPUT : 'input' ; INSERVICE : 'inservice' ; INSIDE : 'inside' ; INSPECT : 'inspect' ; INSTALL : 'install' ; INSTANCE : 'instance' ; INTEGRITY : 'integrity' ; INTER_INTERFACE : 'inter-interface' ; INTERAREA : 'interarea' ; INTERCEPT : 'intercept' ; INTERFACE : 'int' 'erface'? { enableIPV6_ADDRESS = false; if (!_asa || lastTokenType == NEWLINE || lastTokenType == -1) {pushMode(M_Interface);}} ; INTERNAL : 'internal' ; INTERNET : 'internet' ; INTERVAL : 'interval' ; INTERWORKING : 'interworking' ; INTRA_INTERFACE : 'intra-interface' ; INVALID_SPI_RECOVERY : 'invalid-spi-recovery' ; INVALID_USERNAME_LOG : 'invalid-username-log' ; INVERT : 'invert' ; IOS_REGEX : 'ios-regex' -> pushMode ( M_IosRegex ) ; IP : 'ip' ; IPADDRESS : 'ipaddress' ; IP_ADDRESS_LITERAL : 'ip-address' ; IP_FLOW_EXPORT_PROFILE : 'ip-flow-export-profile' ; IPC : 'ipc' ; IPENACL : 'ipenacl' ; IPHC_FORMAT : 'iphc-format' ; IPINIP : 'ipinip' ; IPP : 'ipp' ; IPSEC : 'ipsec' ; IPSEC_ISAKMP : 'ipsec-isakmp' ; IPSEC_MANUAL : 'ipsec-manual' ; IPSEC_OVER_TCP : 'ipsec-over-tcp' ; IPSEC_PROPOSAL : 'ipsec-proposal' ; IPSEC_UDP : 'ipsec-udp' ; IPSLA : 'ipsla' ; IPV4 : [iI] [pP] [vV] '4' ; IPV4_L5 : 'ipv4-l5' ; IPV6 : [iI] [pP] [vV] '6' ; IPV6_ADDRESS_POOL : 'ipv6-address-pool' ; IPX : 'ipx' ; IRC : 'irc' ; IRDP : 'irdp' ; IRIS_BEEP : 'iris-beep' ; ISAKMP : 'isakmp' ; ISAKMP_PROFILE : 'isakmp-profile' ; ISDN : 'isdn' ; IS : 'is' ; IS_TYPE : 'is-type' ; ISCSI : 'iscsi' ; ISI_GL : 'isi-gl' ; ISIS : 'isis' ; ISIS_METRIC : 'isis-metric' ; ISL : 'isl' ; ISO_TSAP : 'iso-tsap' ; ISOLATE : 'isolate' ; ISPF : 'ispf' ; ISSUER_NAME : 'issuer-name' ; IUC : 'iuc' ; JOIN_GROUP : 'join-group' ; JUMBO : 'jumbo' ; JUMBOMTU : 'jumbomtu' ; KBPS : 'kbps' ; KBYTES : 'kbytes' ; KEEPALIVE : 'keepalive' ; KEEPALIVE_ENABLE : 'keepalive-enable' ; KEEPOUT : 'keepout' ; KERBEROS : 'kerberos' ; KERBEROS_ADM : 'kerberos-adm' ; KERNEL : 'kernel' ; KEY : 'key' ; KEY_EXCHANGE : 'key-exchange' ; KEY_HASH : 'key-hash' ; KEY_SOURCE : 'key-source' ; KEY_STRING : 'key-string' ; KEYED_SHA1 : [kK][eE][yY][eE][dD]'-'[sS][hH][aA]'1' ; KEYID : 'keyid' ; KEYPAIR : 'keypair' ; KEYPATH : 'keypath' ; KEYRING : 'keyring' ; KEYSTORE : 'keystore' ; KLOGIN : 'klogin' ; KOD : 'kod' ; KPASSWD : '<PASSWORD>' ; KRB5 : 'krb5' ; KRB5_TELNET : 'krb5-telnet' ; KRON : 'kron' ; KSHELL : 'kshell' ; L2 : 'l2' ; L2_FILTER : 'l2-filter' ; L2_SRC : 'l2-src' ; L2PROTOCOL : 'l2protocol' ; L2PROTOCOL_TUNNEL : 'l2protocol-tunnel' ; L2TP : 'l2tp' ; L2TP_CLASS : 'l2tp-class' ; L2TRANSPORT : 'l2transport' ; L2VPN : 'l2vpn' ; LABEL : 'label' ; LA_MAINT : 'la-maint' ; LABELED_UNICAST : 'labeled-unicast' ; LACP : 'lacp' ; LACP_TIMEOUT : 'lacp-timeout' ; LAG : 'lag' ; LAN : 'lan' ; LANE : 'lane' ; LANZ : 'lanz' ; LAPB : 'lapb' ; LARGE : 'large' ; LAST_AS : 'last-as' ; LAST_MEMBER_QUERY_COUNT : 'last-member-query-count' ; LAST_MEMBER_QUERY_INTERVAL : 'last-member-query-interval' ; LAST_MEMBER_QUERY_RESPONSE_TIME : 'last-member-query-response-time' ; LCD_MENU : 'lcd-menu' ; LDAP : 'ldap' ; LDAPS : 'ldaps' ; LDP : 'ldp' ; LE : 'le' ; LEAK_MAP : 'leak-map' ; LEASE : 'lease' ; LEVEL : 'level' ; LEVEL_1 : 'level-1' ; LEVEL_1_2 : 'level-1-2' ; LEVEL_2 : 'level-2' ; LEVEL_2_ONLY : 'level-2-only' ; LDAP_BASE_DN : 'ldap-base-dn' ; LDAP_LOGIN : 'ldap-login' ; LDAP_LOGIN_DN : 'ldap-login-dn' ; LDAP_NAMING_ATTRIBUTE : 'ldap-naming-attribute' ; LDAP_SCOPE : 'ldap-scope' ; LENGTH : 'length' ; LICENSE : 'license' ; LIFE : 'life' ; LIFETIME : 'lifetime' ; LIMIT : 'limit' ; LIMIT_DN : 'limit-dn' ; LIMIT_RESOURCE : 'limit-resource' ; LINE : 'line' ; LINE_PROTOCOL : 'line-protocol' ; LINE_TERMINATION : 'line-termination' ; LINECARD : 'linecard' ; LINECARD_GROUP : 'linecard-group' ; LINECODE : 'linecode' ; LINK : 'link' ; LINK_FAIL : 'link-fail' ; LINK_FAULT_SIGNALING : 'link-fault-signaling' ; LINK_TYPE : 'link-type' ; LINKSEC : 'linksec' ; LINKDEBOUNCE : 'linkdebounce' ; LISP : 'lisp' ; LIST : 'list' ; LISTEN : 'listen' ; LISTEN_PORT : 'listen-port' ; LISTENER : 'listener' ; LLDP : 'lldp' ; LMP : 'lmp' ; LMS_IP : 'lms-ip' ; LMS_PREEMPTION : 'lms-preemption' ; LOAD_BALANCE : 'load-balance' ; LOAD_BALANCING : 'load-balancing' ; LOAD_INTERVAL : 'load-interval' ; LOAD_SHARING : 'load-sharing' ; LOCAL : 'local' ; LOCALITY : 'locality' ; LOCAL_ADDRESS : 'local-address' ; LOCAL_AS : [Ll][Oo][Cc][Aa][Ll]'-'[Aa][Ss] ; LOCAL_ASA : 'LOCAL' ; LOCAL_CASE : 'local-case' ; LOCAL_INTERFACE : 'local-interface' ; LOCAL_IP : 'local-ip' ; LOCAL_PORT : 'local-port' ; LOCAL_PREFERENCE : 'local-preference' ; LOCAL_V6_ADDR : 'local-v6-addr' ; LOCAL_VOLATILE : 'local-volatile' ; LOCATION : 'location' -> pushMode ( M_COMMENT ) ; LOCALE : 'locale' ; LOCALIP : 'localip' ; LOG : 'log' ; LOG_ADJ_CHANGES : 'log-adj-changes' ; LOG_ADJACENCY_CHANGES : 'log-adjacency-changes' ; LOG_ENABLE : 'log-enable' ; LOG_INPUT : 'log-input' ; LOG_INTERNAL_SYNC : 'log-internal-sync' ; LOG_NEIGHBOR_CHANGES : 'log-neighbor-changes' ; LOG_NEIGHBOR_WARNINGS : 'log-neighbor-warnings' ; LOGFILE : 'logfile' ; LOGGING : 'logging' ; LOGIN : 'login' ; LOGIN_ATTEMPTS : 'login-attempts' ; LOGIN_AUTHENTICATION : 'login-authentication' ; LOGIN_PAGE : 'login-page' ; LOGINSESSION : 'loginsession' ; LOGOUT_WARNING : 'logout-warning' ; LOOKUP : 'lookup' ; LOOPBACK : 'loopback' ; LOOPGUARD : 'loopguard' ; LOTUSNOTES : 'lotusnotes' ; LOW_MEMORY : 'low-memory' ; LPD : 'lpd' ; LPTS : 'lpts' ; LRE : 'lre' ; LRQ : 'lrq' ; LSP_GEN_INTERVAL : 'lsp-gen-interval' ; LSP_INTERVAL : 'lsp-interval' ; LSP_PASSWORD : '<PASSWORD>-password' ; LSP_REFRESH_INTERVAL : 'lsp-refresh-interval' ; LT : 'lt' ; M0_7 : 'm0-7' ; M0_DOT : 'm0.' ; M1_DOT : 'm1.' ; M2_DOT : 'm2.' ; M3_DOT : 'm3.' ; M4_DOT : 'm4.' ; M5_DOT : 'm5.' ; M6_DOT : 'm6.' ; M7_DOT : 'm7.' ; M8_DOT : 'm8.' ; M8_15 : 'm8-15' ; M9_DOT : 'm9.' ; M10_DOT : 'm10.' ; M11_DOT : 'm11.' ; M12_DOT : 'm12.' ; M13_DOT : 'm13.' ; M14_DOT : 'm14.' ; M15_DOT : 'm15.' ; MAB : 'mab' ; MAC : 'mac' ; MAC_ADDRESS : 'mac-address' -> pushMode ( M_COMMENT ) ; MAC_ADDRESS_TABLE : 'mac-address-table' ; MAC_DEFAULT_ROLE : 'mac-default-role' ; MAC_LEARN : 'mac-learn' ; MAC_MOVE : 'mac-move' ; MAC_SERVER_GROUP : 'mac-server-group' ; MAC_SRVR_ADMIN : 'mac-srvr-admin' ; MACHINE_AUTHENTICATION : 'machine-authentication' ; MACRO : 'macro' ; MAIL_SERVER : 'mail-server' ; MAIN_CPU : 'main-cpu' ; MAINTENANCE : 'maintenance' ; MANAGEMENT : 'management' ; MANAGEMENT_ACCESS : 'management-access' ; MANAGEMENT_ONLY : 'management-only' ; MANAGEMENT_PLANE : 'management-plane' ; MANAGEMENT_PROFILE : 'management-profile' ; MANAGER : 'manager' ; MAP : 'map' ; MAP_CLASS : 'map-class' ; MAP_GROUP : 'map-group' ; MAP_LIST : 'map-list' ; MAPPING : 'mapping' ; MASK : 'mask' ; MASK_REPLY : 'mask-reply' ; MASK_REQUEST : 'mask-request' ; MASTER : 'master' ; MASTERIP : 'masterip' ; MATCH : 'match' ; MATCH_ALL : 'match-all' ; MATCH_ANY : 'match-any' ; MATCH_NONE : 'match-none' ; MATCHES_ANY : 'matches-any' ; MATCHES_EVERY : 'matches-every' ; MATIP_TYPE_A : 'matip-type-a' ; MATIP_TYPE_B : 'matip-type-b' ; MAXAS_LIMIT : 'maxas-limit' ; MAX_ASSOCIATIONS : 'max-associations' ; MAX_AUTHENTICATION_FAILURES : 'max-authentication-failures' ; MAX_BURST : 'max-burst' ; MAX_CLIENTS : 'max-clients' ; MAX_CONCAT_BURST : 'max-concat-burst' ; MAX_CONFERENCES : 'max-conferences' ; MAX_CONNECTIONS : 'max-connections' ; MAX_DN : 'max-dn' ; MAX_EPHONES : 'max-ephones' ; MAX_IFINDEX_PER_MODULE : 'max-ifindex-per-module' ; MAX_LSA : 'max-lsa' ; MAX_LSP_LIFETIME : 'max-lsp-lifetime' ; MAX_METRIC : 'max-metric' ; MAX_RATE : 'max-rate' ; MAX_ROUTE : 'max-route' ; MAX_SESSIONS : 'max-sessions' ; MAX_TX_POWER : 'max-tx-power' ; MAXIMUM : 'maximum' ; MAXIMUM_ACCEPTED_ROUTES : 'maximum-accepted-routes' ; MAXIMUM_HOPS : 'maximum-hops' ; MAXIMUM_PATHS : 'maximum-paths' ; MAXIMUM_PEERS : 'maximum-peers' ; MAXIMUM_PREFIX : 'maximum-prefix' ; MAXIMUM_ROUTES : 'maximum-routes' ; MAXPOLL : 'maxpoll' ; MAXSTARTUPS : 'maxstartups' ; MBPS : 'Mbps' ; MBSSID : 'mbssid' ; MBYTES : 'mbytes' ; MCAST_BOUNDARY : 'mcast-boundary' ; MCAST_RATE_OPT : 'mcast-rate-opt' ; MD5 : 'md5' ; MDIX : 'mdix' ; MDT : 'mdt' ; MED : 'med' ; MEDIUM : 'medium' ; MEDIA : 'media' ; MEDIA_TERMINATION : 'media-termination' ; MEDIA_TYPE : 'media-type' ; MEMBER : 'member' ; MEMORY : 'memory' ; MEMORY_SIZE : 'memory-size' ; MENU : 'menu' ; MESH_CLUSTER_PROFILE : 'mesh-cluster-profile' ; MESH_GROUP : 'mesh-group' ; MESH_HT_SSID_PROFILE : 'mesh-ht-ssid-profile' ; MESH_RADIO_PROFILE : 'mesh-radio-profile' ; MESSAGE : 'message' ; MESSAGE_COUNTER : 'message-counter' ; MESSAGE_DIGEST : 'message-digest' ; MESSAGE_DIGEST_KEY : 'message-digest-key' ; MESSAGE_LENGTH : 'message-length' ; MESSAGE_LEVEL : 'message-level' ; MESSAGE_SIZE : 'message-size' ; METERING : 'metering' ; METHOD : 'method' ; METHOD_UTILIZATION : 'method-utilization' ; METRIC : 'metric' ; METRIC_STYLE : 'metric-style' ; METRIC_TYPE : 'metric-type' ; MFIB : 'mfib' ; MFIB_MODE : 'mfib-mode' ; MFWD : 'mfwd' ; MGCP : 'mgcp' ; MGCP_PAT : 'mgcp-pat' ; MGMT : 'mgmt' ; MGMT_AUTH : 'mgmt-auth' ; MGMT_SERVER : 'mgmt-server' ; MGMT_USER : 'mgmt-user' ; MIB : 'mib' ; MICRO_BFD : 'micro-bfd' ; MICROCODE : 'microcode' ; MICROSOFT_DS : 'microsoft-ds' ; MIDCALL_SIGNALING : 'midcall-signaling' ; MIN_PACKET_SIZE : 'min-packet-size' ; MIN_RATE : 'min-rate' ; MIN_RX : 'min-rx' ; MIN_RX_VAR : 'min_rx' ; MIN_TX_POWER : 'min-tx-power' ; MINIMAL : 'minimal' ; MINIMUM : 'minimum' ; MINIMUM_INTERVAL : 'minimum-interval' ; MINIMUM_LINKS : 'minimum-links' ; MINPOLL : 'minpoll' ; MIRROR : 'mirror' ; MISMATCH : 'mismatch' ; MISSING_AS_WORST : 'missing-as-worst' ; MLAG : 'mlag' ; MLD : 'mld' ; MLD_QUERY : 'mld-query' ; MLD_REDUCTION : 'mld-reduction' ; MLD_REPORT : 'mld-report' ; MLDV2 : 'mldv2' ; MLS : 'mls' ; MOBILE : 'mobile' ; MOBILE_HOST_REDIRECT : 'mobile-host-redirect' ; MOBILE_IP : 'mobile-ip' ; MOBILE_REDIRECT : 'mobile-redirect' ; MOBILITY : 'mobility' ; MODE : 'mode' ; MODEM : 'modem' ; MODULATION_PROFILE : 'modulation-profile' ; MODULE : 'module' ; MODULE_TYPE : 'module-type' ; MON : 'Mon' ; MONITOR : 'monitor' ; MONITOR_INTERFACE : 'monitor-interface' ; MONITOR_MAP : 'monitor-map' ; MONITOR_SESSION : 'monitor-session' ; MONITORING : 'monitoring' ; MONITORING_BASICS : 'monitoring-basics' ; MOP : 'mop' ; MOTD : 'motd' ; MPP : 'mpp' ; MPLS : 'mpls' ; MPLS_LABEL : 'mpls-label' ; MROUTE : 'mroute' ; MROUTE_CACHE : 'mroute-cache' ; MS_SQL_M : 'ms-sql-m' ; MS_SQL_S : 'ms-sql-s' ; MSCHAP : 'mschap' ; MSCHAPV2 : 'mschapv2' ; MSDP : 'msdp' ; MSDP_PEER : 'msdp-peer' ; MSEC : 'msec' ; MSEXCH_ROUTING : 'msexch-routing' ; MSG_ICP : 'msg-icp' ; MSIE_PROXY : 'msie-proxy' ; MSP : 'msp' ; MSRPC : 'msrpc' ; MST : 'mst' ; MTA : 'mta' ; MTU : 'mtu' ; MTU_IGNORE : 'mtu-ignore' ; MULTICAST : 'multicast' ; MULTICAST_BOUNDARY : 'multicast-boundary' ; MULTICAST_GROUP : 'multicast-group' ; MULTICAST_ROUTING : 'multicast-routing' ; MULTICAST_STATIC_ONLY : 'multicast-static-only' ; MULTILINK : 'multilink' ; MULTIPATH : 'multipath' ; MULTIPATH_RELAX : 'multipath-relax' ; MULTIPLIER : 'multiplier' ; MULTIPOINT : 'multipoint' ; MULTI_CONFIG : 'multi-config' ; MULTI_TOPOLOGY : 'multi-topology' ; MUST_SECURE : 'must-secure' ; MVPN : 'mvpn' ; MVR : 'mvr' ; NAME : 'name' -> pushMode ( M_Name ) ; NAME_LOOKUP : 'name-lookup' ; NAME_SERVER : 'name-server' ; NAMED_KEY : 'named-key' ; NAMEIF : 'nameif' ; NAMESPACE : 'namespace' ; NAMES : 'names' ; NAMESERVER : 'nameserver' ; NAS : 'nas' ; NAT : [Nn][Aa][Tt] ; NAT_CONTROL : 'nat-control' ; NAT_TRANSPARENCY : 'nat-transparency' ; NAT_TRAVERSAL : 'nat-traversal' ; NATIVE : 'native' ; NATPOOL : 'natpool' ; NBAR : 'nbar' ; NCP : 'ncp' ; ND : 'nd' ; ND_NA : 'nd-na' ; ND_NS : 'nd-ns' ; ND_TYPE : 'nd-type' ; NEGOTIATE : 'negotiate' ; NEGOTIATED : 'negotiated' ; NEGOTIATION : 'negotiation' ; NEIGHBOR : 'neighbor' -> pushMode ( M_NEIGHBOR ) ; NEIGHBOR_DOWN : 'neighbor-down' ; NEIGHBOR_FILTER : 'neighbor-filter' ; NEIGHBOR_GROUP : 'neighbor-group' ; NEIGHBOR_IS : 'neighbor-is' ; NEQ : 'neq' ; NESTED : 'nested' ; NET : 'net' -> pushMode ( M_ISO_Address ) ; NET_REDIRECT : 'net-redirect' ; NET_TOS_REDIRECT : 'net-tos-redirect' ; NET_TOS_UNREACHABLE : 'net-tos-unreachable' ; NET_UNREACHABLE : 'net-unreachable' ; NETBIOS_DGM : 'netbios-dgm' ; NETBIOS_NS : 'netbios-ns' ; NETBIOS_SS : 'netbios-ss' ; NETBIOS_SSN : 'netbios-ssn' ; NETCONF : 'netconf' ; NETDESTINATION : 'netdestination' ; NETDESTINATION6 : 'netdestination6' ; NETEXTHDR : 'netexthdr' ; NETMASK : 'netmask' ; NETMASK_FORMAT : 'netmask-format' ; NETRJS_1 : 'netrjs-1' ; NETRJS_2 : 'netrjs-2' ; NETRJS_3 : 'netrjs-3' ; NETRJS_4 : 'netrjs-4' ; NETSERVICE : 'netservice' ; NETWALL : 'netwall' ; NETWNEWS : 'netwnews' ; NETWORK : 'network' ; NETWORK_CLOCK : 'network-clock' ; NETWORK_CLOCK_PARTICIPATE : 'network-clock-participate' ; NETWORK_CLOCK_SELECT : 'network-clock-select' ; NETWORK_DELAY : 'network-delay' ; NETWORK_OBJECT : 'network-object' ; NETWORK_QOS : 'network-qos' ; NETWORK_UNKNOWN : 'network-unknown' ; NEW_MODEL : 'new-model' ; NEW_RWHO : 'new-rwho' ; NEWINFO : 'newinfo' ; NEXT_HOP : 'next-hop' ; NEXT_HOP_SELF : 'next-hop-self' ; NEXT_HOP_THIRD_PARTY : 'next-hop-third-party' ; NEXT_SERVER : 'next-server' ; NEXTHOP : 'nexthop' ; NEXTHOP1 : 'nexthop1' ; NEXTHOP2 : 'nexthop2' ; NEXTHOP_ATTRIBUTE : 'nexthop-attribute' ; NEXTHOP_LIST : 'nexthop-list' ; NFS : 'nfs' ; NHOP_ONLY : 'nhop-only' ; NHRP : 'nhrp' ; NLRI : 'nlri' ; NLS : 'nls' ; NMSP : 'nmsp' ; NNTP : 'nntp' ; NNTPS : 'nntps' ; NO : 'no' ; NOPASSWORD : 'nopassword' ; NO_ADVERTISE : 'no-advertise' ; NO_ALIAS : 'no-alias' ; NO_BANNER : 'no' F_Whitespace+ 'banner' ; NO_EXPORT : 'no-export' ; NO_L4R_SHIM : 'No l4r_shim' ; NO_PREPEND : 'no-prepend' ; NO_PROXY_ARP : 'no-proxy-arp' ; NO_REDISTRIBUTION : 'no-redistribution' ; NO_ROOM_FOR_OPTION : 'no-room-for-option' ; NO_SUMMARY : 'no-summary' ; NOAUTH : 'noauth' ; NODE : 'node' ; NOE : 'noe' ; NOHANGUP : 'nohangup' ; NON500_ISAKMP : 'non500-isakmp' ; NON_BROADCAST : 'non-broadcast' ; NON_CLIENT_NRT : 'non-client-nrt' ; NON_CRITICAL : 'non-critical' ; NON_DETERMINISTIC : 'non-deterministic' ; NON_DETERMINISTIC_MED : 'non-deterministic-med' ; NON_EXIST_MAP : 'non-exist-map' ; NON_MLAG : 'non-mlag' ; NON_SILENT : 'non-silent' ; NONE : 'none' ; NONEGOTIATE : 'nonegotiate' ; NOS : 'nos' ; NOT : 'not' ; NOT_ADVERTISE : 'not-advertise' ; NOTIFICATION : 'notification' ; NOTIFICATION_TIMER : 'notification-timer' ; NOTIFICATIONS : 'notifications' ; NOTIFY : 'notify' ; NOTIFY_FILTER : 'notify-filter' ; NSF : 'nsf' ; NSR : 'nsr' ; NSSA : 'nssa' ; NSSA_EXTERNAL : 'nssa-external' ; NSW_FE : 'nsw-fe' ; NT_ENCRYPTED : 'nt-encrypted' ; NTP : 'ntp' ; NULL : 'null' ; NV : 'nv' ; OAM : 'oam' ; OBJECT : 'object' ; OBJECT_GROUP : 'object-group' -> pushMode(M_ObjectGroup) ; OBJSTORE : 'objstore' ; ODMR : 'odmr' ; OFDM : 'ofdm' ; OFDM_THROUGHPUT : 'ofdm-throughput' ; OFFSET_LIST : 'offset-list' ; OLSR : 'olsr' ; ON : 'on' ; ON_FAILURE : 'on-failure' ; ON_PASSIVE : 'on-passive' ; ON_STARTUP : 'on-startup' ; ON_SUCCESS : 'on-success' ; ONE : 'one' ; ONE_HUNDRED_FULL : '100full' ; ONE_HUNDREDG_FULL : '100gfull' ; ONE_OUT_OF : 'one-out-of' ; ONE_THOUSAND_FULL : '1000full' ; ONEP : 'onep' ; ONLY_OFDM : 'only-ofdm' ; OPEN : 'open' ; OPENFLOW : 'openflow' ; OPENVPN : 'openvpn' ; OPERATION : 'operation' ; OPMODE : 'opmode' ; OPS : 'ops' ; OPTICAL_MONITOR : 'optical-monitor' ; OPTIMIZATION_PROFILE : 'optimization-profile' ; OPTIMIZE : 'optimize' ; OPTIMIZED : 'optimized' ; OPTION : 'option' ; OPTION_MISSING : 'option-missing' ; OPTIONS : 'options' ; OR : 'or' ; ORGANIZATION_NAME : 'organization-name' ; ORGANIZATION_UNIT : 'organization-unit' ; ORIGIN : 'origin' ; ORIGIN_ID : 'origin-id' ; ORIGINATE : 'originate' ; ORIGINATES_FROM : 'originates-from' ; ORIGINATOR_ID : 'originator-id' ; OSPF : 'ospf' ; OSPF3 : 'ospf3' ; OSPF_EXTERNAL_TYPE_1 : 'ospf-external-type-1' ; OSPF_EXTERNAL_TYPE_2 : 'ospf-external-type-2' ; OSPF_INTER_AREA : 'ospf-inter-area' ; OSPF_INTRA_AREA : 'ospf-intra-area' ; OSPF_NSSA_TYPE_1 : 'ospf-nssa-type-1' ; OSPF_NSSA_TYPE_2 : 'ospf-nssa-type-2' ; OSPFV3 : 'ospfv3' ; OTHER_ACCESS : 'other-access' ; OUI : 'oui' -> pushMode ( M_COMMENT ) ; OUT : 'out' ; OUT_OF_BAND : 'out-of-band' ; OUTBOUND_ACL_CHECK : 'outbound-acl-check' ; OUTPUT : 'output' ; OUTSIDE : 'outside' ; OVERLOAD : 'overload' ; OVERLOAD_CONTROL : 'overload-control' ; OVERRIDE : 'override' ; OWNER : 'owner' ; P2P : 'p2p' ; PACKET : 'packet' ; PACKET_CAPTURE_DEFAULTS : 'packet-capture-defaults' ; PACKET_TOO_BIG : 'packet-too-big' ; PACKETCABLE : 'packetcable' ; PACKETS : 'packets' ; PACKETSIZE : 'packetsize' ; PAGER : 'pager' ; PAGP : 'pagp' ; PAN : 'pan' ; PAN_OPTIONS : 'pan-options' ; PARAM : 'param' ; PARAMETER_PROBLEM : 'parameter-problem' ; PARAMETERS : 'parameters' ; PARENT : 'parent' ; PARITY : 'parity' ; PARSER : 'parser' ; PARTICIPATE : 'participate' ; PASS : 'pass' ; PASSES_THROUGH : 'passes-through' ; PASSIVE : 'passive' ; PASSIVE_INTERFACE : 'passive-interface' -> pushMode ( M_Interface ) ; PASSIVE_ONLY : 'passive-only' ; PASSPHRASE : 'passphrase' ; PASSWORD : 'password' ; PASSWORD_POLICY : 'password-policy' ; PASSWORD_PROMPT : 'password-prompt' ; PASSWORD_STORAGE : 'password-storage' ; PASSWD : '<PASSWORD>' ; PAT_POOL : 'pat-pool' ; PAT_XLATE : 'pat-xlate' ; PATH_ECHO : 'path-echo' ; PATH_JITTER : 'path-jitter' ; PATH_MTU_DISCOVERY : 'path-mtu-discovery' ; PATH_OPTION : 'path-option' ; PATH_RETRANSMIT : 'path-retransmit' ; PATH_SELECTION : 'path-selection' ; PATHCOST : 'pathcost' ; PATH : 'path' ; PATHS : 'paths' ; PATHS_OF_STATISTICS_KEPT : 'paths-of-statistics-kept' ; PAUSE : 'pause' ; PBKDF2 : 'pbkdf2' ; PBR : 'pbr' ; PCANYWHERE_DATA : 'pcanywhere-data' ; PCANYWHERE_STATUS : 'pcanywhere-status' ; PCP : 'pcp' ; PCP_VALUE : 'pcp-value' ; PD_ROUTE_INJECTION : 'pd-route-injection' ; PEAKDETECT : 'peakdetect' ; PEER : 'peer' ; PEERS : 'peers' ; PEER_ADDRESS : 'peer-address' ; PEER_CONFIG_CHECK_BYPASS : 'peer-config-check-bypass' ; PEER_GROUP : 'peer-group' -> pushMode ( M_NEIGHBOR ) ; PEER_GATEWAY : 'peer-gateway' ; PEER_ID_VALIDATE : 'peer-id-validate' ; PEER_KEEPALIVE : 'peer-keepalive' ; PEER_LINK : 'peer-link' ; PEER_POLICY : 'peer-policy' ; PEER_SESSION : 'peer-session' ; PEER_SWITCH : 'peer-switch' ; PEER_TO_PEER : 'peer-to-peer' ; PENALTY_PERIOD : 'penalty-period' ; PERCENT_LITERAL : 'percent' ; PERIODIC : 'periodic' ; PERIODIC_INVENTORY : 'periodic-inventory' ; PERIODIC_REFRESH : 'periodic-refresh' ; PERMANENT : 'permanent' ; PERMISSION : 'permission' ; PERMIT : 'permit' ; PERMIT_HOSTDOWN : 'permit-hostdown' ; PERSISTENT : 'persistent' ; PFC : 'pfc' ; PFS : 'pfs' ; PHONE_CONTACT : 'phone-contact' -> pushMode ( M_Description ) ; PHONE_NUMBER : 'phone-number' ; PHONE_PROXY : 'phone-proxy' ; PHY : 'phy' ; PHYSICAL_LAYER : 'physical-layer' ; PHYSICAL_PORT : 'physical-port' ; PICKUP : 'pickup' ; PIM : 'pim' ; PIM_AUTO_RP : 'pim-auto-rp' ; PIM_SPARSE : 'pim-sparse' ; PINNING : 'pinning' ; PKI : 'pki' ; PKIX_TIMESTAMP : 'pkix-timestamp' ; PKT_KRB_IPSEC : 'pkt-krb-ipsec' ; PLAT : 'plat' ; PLATFORM : 'platform' ; PM : 'pm' ; POAP : 'poap' ; POINT_TO_MULTIPOINT : 'point-to-multipoint' ; POINT_TO_POINT : 'point-to-point' ; POLICE : 'police' ; POLICY : 'policy' ; POLICY_LIST : 'policy-list' ; POLICY_MAP : 'policy-map' ; POLICY_MAP_INPUT : 'policy-map-input' ; POLICY_MAP_OUTPUT : 'policy-map-output' ; POOL : 'pool' ; POP2 : 'pop2' ; POP3 : 'pop3' ; POP3S : 'pop3s' ; PORT : 'port' ; PORTFAST : 'portfast' ; PORTS : 'ports' ; PORT_CHANNEL : 'port-channel' ; PORT_CHANNEL_PROTOCOL : 'port-channel-protocol' ; PORT_NAME : 'port-name' ; PORT_OBJECT : 'port-object' ; PORT_PRIORITY : 'port-priority' ; PORT_PROFILE : 'port-profile' ; PORT_SECURITY : 'port-security' ; PORT_TYPE : 'port-type' ; PORT_UNREACHABLE : 'port-unreachable' ; PORTMODE : 'portmode' ; POS : 'pos' ; POWER : 'power' ; POWEROFF : 'poweroff' ; POWER_LEVEL : 'power-level' ; POWER_MGR : 'power-mgr' ; POWER_MONITOR : 'power-monitor' ; PPP : 'ppp' ; PPTP : 'pptp' ; PRC_INTERVAL : 'prc-interval' ; PRE_EQUALIZATION : 'pre-equalization' ; PRE_SHARE : 'pre-share' ; PRE_SHARED_KEY : 'pre-shared-key' ; PRECEDENCE : 'precedence' ; PRECEDENCE_UNREACHABLE : 'precedence-unreachable' ; PRECONFIGURE : 'preconfigure' ; PREDICTOR : 'predictor' ; PREEMPT : 'preempt' ; PREFER : 'prefer' ; PREFERENCE : 'preference' ; PREFERRED : 'preferred' ; PREFERRED_PATH : 'preferred-path' ; PREFIX : 'prefix' ; PREFIX_LENGTH : 'prefix-length' ; PREFIX_LIST : 'prefix-list' { if (lastTokenType == ADDRESS) { pushMode(M_Words); } else { pushMode(M_Name); } } ; PREFIX_PEER_TIMEOUT : 'prefix-peer-timeout' ; PREFIX_PEER_WAIT : 'prefix-peer-wait' ; PREFIX_SET : 'prefix-set' ; PREPEND : 'prepend' ; PRF : 'prf' ; PRI_GROUP : 'pri-group' ; PRIMARY : 'primary' ; PRIMARY_PORT : 'primary-port' ; PRIMARY_PRIORITY : 'primary-priority' ; PRINT_SRV : 'print-srv' ; PRIORITY : 'priority' ; PRIORITY_FLOW_CONTROL : 'priority-flow-control' ; PRIORITY_FORCE : 'priority-force' ; PRIORITY_MAPPING : 'priority-mapping' ; PRIORITY_QUEUE : 'priority-queue' ; PRIV : 'priv' ; PRIVACY : 'privacy' ; PRIVATE_AS : 'private-as' ; PRIVATE_KEY : 'private-key' -> pushMode ( M_SshKey ) ; PRIVATE_VLAN : 'private-vlan' ; PRIVILEGE : 'privilege' ; PRIVILEGE_MODE : 'privilege-mode' ; PROACTIVE : 'proactive' ; PROBE : 'probe' ; PROCESS : 'process' ; PROCESS_MAX_TIME : 'process-max-time' ; PROFILE : 'profile' ; PROGRESS_IND : 'progress_ind' ; PROMPT : 'prompt' ; PROPAGATE : 'propagate' ; PROPOSAL : 'proposal' ; PROPRIETARY : 'proprietary' ; PROTECT : 'protect' ; PROTECT_SSID : 'protect-ssid' ; PROTECT_TUNNEL : 'protect-tunnel' ; PROTECT_VALID_STA : 'protect-valid-sta' ; PROTECTION : 'protection' ; PROTOCOL : 'protocol' ; PROTOCOL_DISCOVERY : 'protocol-discovery' ; PROTOCOL_HTTP : 'protocol-http' ; PROTOCOL_OBJECT : 'protocol-object' ; PROTOCOL_UNREACHABLE : 'protocol-unreachable' ; PROTOCOL_VIOLATION : 'protocol-violation' ; PROVISION : 'provision' ; PROVISIONING_PROFILE : 'provisioning-profile' ; PROXY_ARP : 'proxy-arp' ; PROXY_SERVER : 'proxy-server' ; PRUNING : 'pruning' ; PSEUDO_INFORMATION : 'pseudo-information' ; PSEUDOWIRE : 'pseudowire' ; PSEUDOWIRE_CLASS : 'pseudowire-class' ; PSH : 'psh' ; PTP : 'ptp' ; PTP_EVENT : 'ptp-event' ; PTP_GENERAL : 'ptp-general' ; PUBKEY_CHAIN : 'pubkey-chain' ; PUBLIC_KEY : 'public-key' -> pushMode ( M_SshKey ) ; PVC : 'pvc' ; QMTP : 'qmtp' ; QOS : 'qos' ; QOS_GROUP : 'qos-group' ; QOS_MAPPING : 'qos-mapping' ; QOS_POLICY : 'qos-policy' ; QOS_POLICY_OUTPUT : 'qos-policy-output' ; QOS_SC : 'qos-sc' ; QOTD : 'qotd' ; QUERY_INTERVAL : 'query-interval' ; QUERY_MAX_RESPONSE_TIME : 'query-max-response-time' ; QUERY_ONLY : 'query-only' ; QUERY_TIMEOUT : 'query-timeout' ; QUEUE : 'queue' ; QUEUE_BUFFERS : 'queue-buffers' ; QUEUE_LENGTH : 'queue-length' ; QUEUE_LIMIT : 'queue-limit' ; QUEUE_MONITOR : 'queue-monitor' ; QUEUE_SET : 'queue-set' ; QUEUEING : 'queueing' ; QUEUING : 'queuing' ; QUIT : 'quit' ; RADIUS : 'radius' ; RADIUS_ACCOUNTING : 'radius-accounting' ; RADIUS_ACCT : 'radius-acct' ; RADIUS_COMMON_PW : 'radius-common-pw' ; RADIUS_INTERIM_ACCOUNTING : 'radius-interim-accounting' ; RADIUS_SERVER : 'radius-server' ; RANDOM : 'random' ; RANDOM_DETECT : 'random-detect' ; RANDOM_DETECT_LABEL : 'random-detect-label' ; RANGE : 'range' ; RATE_LIMIT : 'rate-limit' ; RATE_MODE : 'rate-mode' ; RATE_THRESHOLDS_PROFILE : 'rate-thresholds-profile' ; RBACL : 'rbacl' ; RC4_SHA1 : 'rc4-sha1' ; RCMD : 'rcmd' ; RCP : 'rcp' ; RCV_QUEUE : 'rcv-queue' ; RD : 'rd' ; RE_MAIL_CK : 're-mail-ck' ; REACHABLE_VIA : 'reachable-via' ; REACT : 'react' ; REACTION : 'reaction' ; READ_ONLY_PASSWORD : '<PASSWORD>' ; REAL : 'real' ; REAL_TIME_CONFIG : 'real-time-config' ; REASSEMBLY_TIMEOUT : 'reassembly-timeout' ; REAUTHENTICATION : 'reauthentication' ; RECEIVE : 'receive' ; RECEIVE_WINDOW : 'receive-window' ; RECONNECT_INTERVAL : 'reconnect-interval' ; RECORD : 'record' ; RECORD_ENTRY : 'record-entry' ; RED : 'red' ; REDIRECT : 'redirect' ; REDIRECT_FQDN : 'redirect-fqdn' ; REDIRECT_LIST : 'redirect-list' ; REDIRECT_PAUSE : 'redirect-pause' ; REDIRECTS : 'redirects' ; REDISTRIBUTE : 'redistribute' ; REDISTRIBUTE_INTERNAL : 'redistribute-internal' ; REDISTRIBUTED_PREFIXES : 'redistributed-prefixes' ; REDUNDANCY : 'redundancy' ; REDUNDANCY_GROUP : 'redundancy-group' ; REFERENCE_BANDWIDTH : 'reference-bandwidth' ; REFLECT : 'reflect' ; REFLECTION : 'reflection' ; REFLEXIVE_LIST : 'reflexive-list' ; REGEX_MODE : 'regex-mode' ; REGISTER_RATE_LIMIT : 'register-rate-limit' ; REGISTER_SOURCE : 'register-source' ; REGISTERED : 'registered' ; REGULATORY_DOMAIN_PROFILE : 'regulatory-domain-profile' ; RELAY : 'relay' ; RELOAD : 'reload' ; RELOAD_DELAY : 'reload-delay' ; RELOAD_TYPE : 'reload-type' ; REMARK : 'remark' -> pushMode ( M_REMARK ) ; REMOTE : 'remote' ; REMOTE_ACCESS : 'remote-access' ; REMOTE_AS : 'remote-as' ; REMOTE_IP : 'remote-ip' ; REMOTE_NEIGHBORS : 'remote-neighbors' ; REMOTE_PORT : 'remote-port' ; REMOTE_PORTS : 'remote-ports' ; REMOTE_SERVER : 'remote-server' ; REMOTE_SPAN : 'remote-span' ; REMOTEFS : 'remotefs' ; REMOVE : 'remove' ; REMOVE_PRIVATE_AS : 'remove-private-' [Aa] [Ss] ; REOPTIMIZE : 'reoptimize' ; REPCMD : 'repcmd' ; REPLACE_AS : 'replace-as' ; REPLY_TO : 'reply-to' ; REPORT_INTERVAL : 'report-interval' ; REQ_RESP : 'req-resp' ; REQ_TRANS_POLICY : 'req-trans-policy' ; REQUEST : 'request' ; REQUEST_DATA_SIZE : 'request-data-size' ; REQUIRE_WPA : 'require-wpa' ; RESOURCE : 'resource' ; RESOURCE_POOL : 'resource-pool' ; RESOURCES : 'resources' ; RESPONDER : 'responder' ; RESPONSE : 'response' ; RESTART : 'restart' ; RESTART_TIME : 'restart-time' ; RESTRICT : 'restrict' ; RESTRICTED : 'restricted' ; RESULT_TYPE : 'result-type' ; RESUME : 'resume' ; RETRANSMIT : 'retransmit' ; RETRANSMIT_INTERVAL : 'retransmit-interval' ; RETRANSMIT_TIMEOUT : 'retransmit-timeout' ; RETRIES : 'retries' ; RETRY : 'retry' ; REVERSE_ACCESS : 'reverse-access' ; REVERSE_PATH : 'reverse-path' ; REVERSE_ROUTE : 'reverse-route' ; REVERTIVE : 'revertive' ; REVISION : 'revision' ; REVOCATION_CHECK : 'revocation-check' ; REWRITE : 'rewrite' ; RF : 'rf' ; RF_CHANNEL : 'rf-channel' ; RF_POWER : 'rf-power' ; RF_SHUTDOWN : 'rf-shutdown' ; RF_SWITCH : 'rf-switch' ; RFC_3576_SERVER : 'rfc-3576-server' ; RFC1583 : 'rfc1583' ; RFC1583COMPATIBILITY : 'rfc1583compatibility' ; RIB_HAS_ROUTE : 'rib-has-route' ; RIB_METRIC_AS_EXTERNAL : 'rib-metric-as-external' ; RIB_METRIC_AS_INTERNAL : 'rib-metric-as-internal' ; RIB_SCALE : 'rib-scale' ; RING : 'ring' ; RIP : 'rip' ; RJE : 'rje' ; RLP : 'rlp' ; RLZDBASE : 'rlzdbase' ; RMC : 'rmc' ; RMON : 'rmon' ; RMONITOR : 'rmonitor' ; RO : [rR] [oO] ; ROBUSTNESS_VARIABLE : 'robustness-variable' ; ROGUE_AP_AWARE : 'rogue-ap-aware' ; ROLE : 'role' ; ROOT : 'root' ; ROTARY : 'rotary' ; ROUND_ROBIN : 'round-robin' ; ROUTE : 'route' ; ROUTE_CACHE : 'route-cache' ; ROUTE_LOOKUP : 'route-lookup' ; ROUTE_MAP : 'route-map' -> pushMode ( M_RouteMap ) ; ROUTE_ONLY : 'route-only' ; ROUTE_POLICY : 'route-policy' ; ROUTE_REFLECTOR_CLIENT : 'route-reflector-client' ; ROUTE_SOURCE : 'route-source' ; ROUTE_TARGET : 'route-target' ; ROUTE_TYPE : 'route-type' ; ROUTED : 'routed' ; ROUTER : 'router' ; ROUTER_ADVERTISEMENT : 'router-advertisement' ; ROUTER_ALERT : 'router-alert' ; ROUTER_ID : 'router-id' ; ROUTER_INTERFACE : 'router-interface' ; ROUTER_LSA : 'router-lsa' ; ROUTER_SOLICITATION : 'router-solicitation' ; ROUTING : 'routing' ; RP : 'rp' ; RP_ADDRESS : 'rp-address' ; RP_ANNOUNCE_FILTER : 'rp-announce-filter' ; RP_CANDIDATE : 'rp-candidate' ; RP_LIST : 'rp-list' ; RPC2PORTMAP : 'rpc2portmap' ; RPF_VECTOR : 'rpf-vector' ; RRM_IE_PROFILE : 'rrm-ie-profile' ; RSA : 'rsa' ; RSA_SIG : 'rsa-sig' ; RSAKEYPAIR : 'rsakeypair' ; RSH : 'rsh' ; RST : 'rst' ; RSTP : 'rstp' ; RSVP : 'rsvp' ; RSYNC : 'rsync' ; RT : 'rt' ; RTCP_INACTIVITY : 'rtcp-inactivity' ; RTELNET : 'rtelnet' ; RTP : 'rtp' ; RTP_PORT : 'rtp-port' ; RTR : 'rtr' ; RTR_ADV : 'rtr-adv' ; RTSP : 'rtsp' ; RULE : 'rule' {enableREGEX = true;} ; RULE_NAME : 'rule-name' ; RUN : 'run' ; RW : [Rr] [Ww] ; RX : 'rx' ; RX_COS_SLOT : 'rx-cos-slot' ; RXSPEED : 'rxspeed' ; SA_FILTER : 'sa-filter' ; SAME_SECURITY_TRAFFIC : 'same-security-traffic' ; SAMPLER : 'sampler' ; SAMPLER_MAP : 'sampler-map' ; SAMPLES_OF_HISTORY_KEPT : 'samples-of-history-kept' ; SAP : 'sap' ; SAT : 'Sat' ; SATELLITE : 'satellite' ; SATELLITE_FABRIC_LINK : 'satellite-fabric-link' ; SCALE_FACTOR : 'scale-factor' ; SCAN_TIME : 'scan-time' ; SCANNING : 'scanning' ; SCCP : 'sccp' ; SCHED_TYPE : 'sched-type' ; SCHEDULE : 'schedule' ; SCHEDULER : 'scheduler' ; SCHEME : 'scheme' ; SCOPE : 'scope' ; SCP : 'scp' ; SCRAMBLE : 'scramble' ; SCRIPT : 'script' ; SCRIPTING : 'scripting' ; SCTP : 'sctp' ; SDM : 'sdm' ; SDR : 'sdr' ; SDROWNER : 'SDROwner' ; SECONDARY : 'secondary' ; SECONDARY_DIALTONE : 'secondary-dialtone' ; SECRET : 'secret' ; SECUREID_UDP : 'secureid-udp' ; SECURE_MAC_ADDRESS : 'secure-mac-address' ; SECURITY : 'security' ; SECURITY_ASSOCIATION : 'security-association' ; SECURITY_LEVEL : 'security-level' ; SELECT : 'select' ; SELECTION : 'selection' ; SELECTIVE : 'selective' ; SELF : 'self' ; SELF_IDENTITY : 'self-identity' ; SEND : 'send' ; SEND_COMMUNITY : 'send-community' ; SEND_COMMUNITY_EBGP : 'send-community-ebgp' ; SEND_EXTENDED_COMMUNITY_EBGP : 'send-extended-community-ebgp' ; SEND_LABEL : 'send-label' ; SEND_LIFETIME : 'send-lifetime' ; SEND_RP_ANNOUNCE : 'send-rp-announce' ; SEND_RP_DISCOVERY : 'send-rp-discovery' ; SENDER : 'sender' ; SENSOR : 'sensor' ; SEQ : 'seq' ; SEQUENCE : 'sequence' ; SEQUENCE_NUMS : 'sequence-nums' ; SERIAL : 'serial' ; SERIAL_NUMBER : 'serial-number' ; SERVE : 'serve' ; SERVE_ONLY : 'serve-only' ; SERVER : 'server' ; SERVER_ARP : 'server-arp' ; SERVER_GROUP : 'server-group' ; SERVER_KEY : 'server-key' ; SERVER_PRIVATE : 'server-private' ; SERVER_TYPE : 'server-type' ; SERVERFARM : 'serverfarm' ; SERVICE : 'service' ; SERVICE_CLASS : 'service-class' ; SERVICE_FAMILY : 'service-family' ; SERVICE_LIST : 'service-list' ; SERVICE_MODULE : 'service-module' ; SERVICE_OBJECT : 'service-object' ; SERVICE_POLICY : 'service-policy' ; SERVICE_QUEUE : 'service-queue' ; SERVICE_TEMPLATE : 'service-template' ; SERVICE_TYPE : 'service-type' ; SESSION : 'session' ; SESSION_AUTHORIZATION : 'session-authorization' ; SESSION_DISCONNECT_WARNING : 'session-disconnect-warning' -> pushMode ( M_COMMENT ) ; SESSION_GROUP : 'session-group' ; SESSION_ID : 'session-id' ; SESSION_KEY : 'session-key' ; SESSION_LIMIT : 'session-limit' ; SESSION_OPEN_MODE : 'session-open-mode' ; SESSION_PROTECTION : 'session-protection' ; SESSION_TIMEOUT : 'session-timeout' ; SET : 'set' ; SET_COLOR : 'set-color' ; SET_OVERLOAD_BIT : 'set-overload-bit' ; SETUP : 'setup' ; SEVERITY : 'severity' ; SF_INTERFACE : 'sf-interface' -> pushMode ( M_Interface ) ; SFLOW : 'sflow' ; SFTP : 'sftp' ; SG_EXPIRY_TIMER : 'sg-expiry-timer' ; SGBP : 'sgbp' ; SGMP : 'sgmp' ; SHA : 'sha' ; SHA1 : 'sha1' -> pushMode ( M_SHA1 ) ; SHA2_256_128 : 'sha2-256-128' ; SHA512 : 'sha512' ; SHA512_PASSWORD : '$<PASSWORD>$' [0-9]+ '$' F_Base64String '$' F_Base64String -> pushMode ( M_SeedWhitespace ) ; SHAPE : 'shape' ; SHARED_SECONDARY_SECRET : 'shared-secondary-secret' ; SHARED_SECRET : 'shared-secret' ; SHELFNAME : 'shelfname' ; SHELL : 'shell' ; SHORT_TXT : 'short-txt' ; SHOULD_SECURE : 'should-secure' ; SHOW : 'show' ; SHUTDOWN : 'shut' 'down'? ; SIGNAL : 'signal' ; SIGNALING : 'signaling' ; SIGNALLED_BANDWIDTH : 'signalled-bandwidth' ; SIGNALLED_NAME : 'signalled-name' ; SIGNALLING : 'signalling' ; SIGNATURE : 'signature' ; SIGNATURE_MATCHING_PROFILE : 'signature-matching-profile' ; SIGNATURE_PROFILE : 'signature-profile' ; SIGNING : 'signing' ; SILC : 'silc' ; SILENT : 'silent' ; SINGLE_CONNECTION : 'single-connection' ; SINGLE_HOP : 'single-hop' ; SINGLE_ROUTER_MODE : 'single-router-mode' ; SINGLE_TOPOLOGY : 'single-topology' ; SIP : 'sip' ; SIP_DISCONNECT : 'sip-disconnect' ; SIP_INVITE : 'sip-invite' ; SIP_MEDIA : 'sip_media' ; SIP_MIDCALL_REQ_TIMEOUT : 'sip-midcall-req-timeout' ; SIP_PROFILES : 'sip-profiles' ; SIP_PROVISIONAL_MEDIA : 'sip-provisional-media' ; SIP_SERVER : 'sip-server' ; SIP_UA : 'sip-ua' ; SIPS : 'sips' ; SITE_ID : 'site-id' ; SITEMAP : 'sitemap' ; SIZE : 'size' ; SLA : 'sla' ; SLOT : 'slot' ; SLOT_TABLE_COS : 'slot-table-cos' ; SMALL : 'small' ; SMALL_HELLO : 'small-hello' ; SMART_RELAY : 'smart-relay' ; SMTP : 'smtp' ; SMTP_SERVER : 'smtp-server' ; SMUX : 'smux' ; SNAGAS : 'snagas' ; SNMP_AUTHFAIL : 'snmp-authfail' ; SNMP : 'snmp' ; // must be kept above SNMP_SERVER SNMP_SERVER_COMMUNITY : 'snmp-server' {(lastTokenType == NEWLINE || lastTokenType == -1) && isWhitespace(_input.LA(1)) && lookAheadStringSkipWhitespace("community ".length()).equals("community ")}? -> type ( SNMP_SERVER ) , pushMode ( M_SnmpServerCommunity ) ; SNMP_SERVER : 'snmp-server' ; SNMP_TRAP : 'snmp-trap' ; SNMPTRAP : 'snmptrap' ; SNOOPING : 'snooping' ; SNP : 'snp' ; SNPP : 'snpp' ; SNR_MAX : 'snr-max' ; SNR_MIN : 'snr-min' ; SNTP : 'sntp' ; SOO : 'soo' ; SORT_BY : 'sort-by' ; SPE : 'spe' ; SPECTRUM : 'spectrum' ; SPECTRUM_LOAD_BALANCING : 'spectrum-load-balancing' ; SPECTRUM_MONITORING : 'spectrum-monitoring' ; SPF_INTERVAL : 'spf-interval' ; SOFT_PREEMPTION : 'soft-preemption' ; SOFT_RECONFIGURATION : 'soft' '-reconfiguration'? ; SOFTWARE : 'software' ; SONET : 'sonet' ; SOURCE : 'source' ; SOURCE_ADDRESS : 'source-address' ; SOURCE_INTERFACE : 'source-interface' -> pushMode ( M_Interface ) ; SOURCE_IP_ADDRESS : 'source-ip-address' ; SOURCE_PROTOCOL : 'source-protocol' ; SOURCE_ROUTE : 'source-route' ; SOURCE_ROUTE_FAILED : 'source-route-failed' ; SOURCE_QUENCH : 'source-quench' ; SPAN : 'span' ; SPANNING_TREE : 'spanning-tree' ; SPARSE_DENSE_MODE : 'sparse-dense-mode' ; SPARSE_MODE : 'sparse-mode' ; SPARSE_MODE_SSM : 'sparse-mode-ssm' ; SPD : 'spd' ; SPEED : 'speed' ; SPEED_DUPLEX : 'speed-duplex' ; SPLIT_HORIZON : 'split-horizon' ; SPLIT_TUNNEL_NETWORK_LIST : 'split-tunnel-network-list' ; SPLIT_TUNNEL_POLICY : 'split-tunnel-policy' ; SPT_THRESHOLD : 'spt-threshold' ; SQLNET : 'sqlnet' ; SQLSRV : 'sqlsrv' ; SQLSERV : 'sqlserv' ; SRC_IP : 'src-ip' ; SRC_NAT : 'src-nat' ; SRLG : 'srlg' ; SRR_QUEUE : 'srr-queue' ; SRST : 'srst' ; SSH : 'ssh' ; SSH_CERTIFICATE : 'ssh-certificate' ; SSH_KEYDIR : 'ssh_keydir' ; SSH_PUBLICKEY : 'ssh-publickey' ; SSID : 'ssid' ; SSID_ENABLE : 'ssid-enable' ; SSID_PROFILE : 'ssid-profile' ; SSL : 'ssl' ; SSM : 'ssm' ; STACK_MAC : 'stack-mac' ; STACK_MIB : 'stack-mib' ; STACK_UNIT : 'stack-unit' ; STALEPATH_TIME : 'stalepath-time' ; STALE_ROUTE : 'stale-route' ; STANDARD : 'standard' { enableDEC = true; enableACL_NUM = false; } ; STANDBY : 'standby' ; START_STOP : 'start-stop' ; START_TIME : 'start-time' ; STARTUP_QUERY_COUNT : 'startup-query-count' ; STARTUP_QUERY_INTERVAL : 'startup-query-interval' ; STATE : 'state' ; STATE_REFRESH : 'state-refresh' ; STATIC : 'static' ; STATIC_GROUP : 'static-group' ; STATION_ROLE : 'station-role' ; STATISTICS : 'statistics' ; STBC : 'stbc' ; STCAPP : 'stcapp' ; STICKY : 'sticky' ; STICKY_ARP : 'sticky-arp' ; STOP : 'stop' ; STOP_ONLY : 'stop-only' ; STOP_RECORD : 'stop-record' ; STOPBITS : 'stopbits' ; STORM_CONTROL : 'storm-control' ; STP : 'stp' ; STREAMING : 'streaming' ; STREET_ADDRESS : 'street-address' ; STREETADDRESS : 'streetaddress' -> pushMode ( M_Description ) ; STRICTHOSTKEYCHECK : 'stricthostkeycheck' ; STRING : 'string' ; STRIP : 'strip' ; STS_1 : 'sts-1' ; STUB : 'stub' ; SUBINTERFACE : 'subinterface' ; SUBJECT_NAME : 'subject-name' ; SUBMGMT : 'submgmt' ; SUBNET : 'subnet' ; SUBNET_BROADCAST : 'subnet-broadcast' ; SUBNET_MASK : 'subnet-mask' ; SUBNETS : 'subnets' ; SUBNET_ZERO : 'subnet-zero' ; SUB_OPTION : 'sub-option' ; SUB_ROUTE_MAP : 'sub-route-map' ; SUBMISSION : 'submission' ; SUBSCRIBE_TO : 'subscribe-to' ; SUBSCRIBE_TO_ALERT_GROUP : 'subscribe-to-alert-group' ; SUBSCRIBER : 'subscriber' ; SUCCESS : 'success' ; SUMMARY_ADDRESS : 'summary-address' ; SUMMARY_LSA : 'summary-lsa' ; SUMMARY_METRIC : 'summary-metric' ; SUMMARY_ONLY : 'summary-only' ; SUN : 'Sun' ; SUNRPC : 'sunrpc' ; SUPER_USER_PASSWORD : '<PASSWORD>' ; SUPPLEMENTARY_SERVICE : 'supplementary-service' ; SUPPLEMENTARY_SERVICES : 'supplementary-services' ; SUPPRESS : 'suppress' ; SUPPRESS_ARP : 'suppress-arp' ; SUPPRESS_INACTIVE : 'suppress-inactive' ; SUPPRESS_FIB_PENDING : 'suppress-fib-pending' ; SUPPRESS_MAP : 'suppress-map' ; SUPPRESSED : 'suppressed' ; SUSPECT_ROGUE_CONF_LEVEL : 'suspect-rogue-conf-level' ; SUSPEND : 'suspend' ; SVC : 'svc' ; SVCLC : 'svclc' ; SVP : 'svp' ; SVRLOC : 'svrloc' ; SWITCH : 'switch' ; SWITCH_CERT : 'switch-cert' ; SWITCH_PRIORITY : 'switch-priority' ; SWITCH_PROFILE : 'switch-profile' ; SWITCH_TYPE : 'switch-type' ; SWITCHBACK : 'switchback' ; SWITCHING_MODE : 'switching-mode' ; SWITCHNAME : 'switchname' ; SWITCHPORT : 'switchport' ; SYMMETRIC : 'symmetric' ; SYN : 'syn' ; SYNC : 'sync' ; SYNCHRONIZATION : 'synchronization' ; SYNCHRONOUS : 'synchronous' ; SYSCONTACT : 'syscontact' ; SYSLOCATION : 'syslocation' ; SYSLOG : 'syslog' ; SYSLOGD : 'syslogd' ; SYSOPT : 'sysopt' ; SYSTAT : 'systat' ; SYSTEM : 'system' ; SYSTEM_INIT : 'system-init' ; SYSTEM_MAX : 'system-max' ; SYSTEM_PRIORITY : 'system-priority' ; SYSTEM_PROFILE : 'system-profile' ; SYSTEM_SHUTDOWN : 'system-shutdown' ; SYSTEMOWNER : 'SystemOwner' ; TABLE_MAP : 'table-map' ; TACACS : 'tacacs' ; TACACS_DS : 'tacacs-ds' ; TACACS_PLUS : 'tacacs+' ; TACACS_PLUS_ASA : 'TACACS+' ; TACACS_SERVER : 'tacacs-server' ; TAC_PLUS : 'tac_plus' ; TAG : 'tag' ; TAG_SWITCHING : 'tag-switching' ; TAG_TYPE : 'tag-type' ; TAGGED : 'tagged' ; TALK : 'talk' ; TAP : 'tap' ; TASK : 'task' ; TASK_SPACE_EXECUTE : 'task execute' ; TASKGROUP : 'taskgroup' ; TB_VLAN1 : 'tb-vlan1' ; TB_VLAN2 : 'tb-vlan2' ; TBRPF : 'tbrpf' ; TCAM : 'tcam' ; TCP : 'tcp' ; TCP_CONNECT : 'tcp-connect' ; TCP_INSPECTION : 'tcp-inspection' ; TCP_PROXY_REASSEMBLY : 'tcp-proxy-reassembly' ; TCP_SESSION : 'tcp-session' ; TCP_UDP : 'tcp-udp' ; TCPMUX : 'tcpmux' ; TCPNETHASPSRV : 'tcpnethaspsrv' ; TCS_LOAD_BALANCE : 'tcs-load-balance' ; TELEPHONY_SERVICE : 'telephony-service' ; TELNET : 'telnet' ; TELNET_SERVER : 'telnet-server' ; TEMPLATE : 'template' ; TEN_THOUSAND_FULL : '10000full' ; TERMINAL : 'terminal' ; TERMINAL_TYPE : 'terminal-type' ; TERMINATE : 'terminate' ; TERMINATION : 'termination' ; TEST : 'test' ; TFTP : 'tftp' ; TFTP_SERVER : 'tftp-server' ; TFTP_SERVER_LIST : 'tftp-server-list' ; THEN : 'then' ; THREAT_DETECTION : 'threat-detection' ; THREAT_VISIBILITY : 'threat-visibility' ; THREE_DES : '3des' ; THREE_DES_SHA1 : '3des-sha1' ; THRESHOLD : 'threshold' ; THROUGHPUT : 'throughput' ; THU : 'Thu' ; TID : 'tid' ; TIME : 'time' ; TIME_EXCEEDED : 'time-exceeded' ; TIME_FORMAT : 'time-format' ; TIME_RANGE : 'time-range' ; TIME_OUT : 'time-out' ; TIMED : 'timed' ; TIMEOUT : 'timeout' ; TIMEOUTS : 'timeouts' ; TIMER : 'timer' ; TIMERS : 'timers' ; TIMESOURCE : 'timesource' ; TIMESTAMP : 'timestamp' ; TIMESTAMP_REPLY : 'timestamp-reply' ; TIMESTAMP_REQUEST : 'timestamp-request' ; TIME_ZONE : 'time-zone' ; TIMING : 'timing' ; TLS_PROXY : 'tls-proxy' ; TM_VOQ_COLLECTION : 'tm-voq-collection' ; TOKEN : 'token' ; TOOL : 'tool' ; TOP : 'top' ; TOPOLOGY : 'topology' ; TOS : 'tos' ; TOS_OVERWRITE : 'tos-overwrite' ; TRACE : 'trace' ; TRACEROUTE : 'traceroute' ; TRACK : 'track' ; TRACKED : 'tracked' ; TRACKING_PRIORITY_INCREMENT : 'tracking-priority-increment' ; TRADITIONAL : 'traditional' ; TRAFFIC_ENG : 'traffic-eng' ; TRAFFIC_EXPORT : 'traffic-export' ; TRAFFIC_FILTER : 'traffic-filter' ; TRAFFIC_INDEX : 'traffic-index' ; TRAFFIC_SHARE : 'traffic-share' ; TRANSFER_SYSTEM : 'transfer-system' ; TRANSFORM_SET : 'transform-set' ; TRANSCEIVER : 'transceiver' ; TRANSCEIVER_TYPE_CHECK : 'transceiver-type-check' ; TRANSLATE : 'translate' ; TRANSLATION : 'translation' ; TRANSLATION_RULE : 'translation-rule' ; TRANSLATION_PROFILE : 'translation-profile' ; TRANSMIT : 'transmit' ; TRANSMIT_DELAY : 'transmit-delay' ; TRANSPARENT_HW_FLOODING : 'transparent-hw-flooding' ; TRANSPORT : 'transport' ; TRANSPORT_METHOD : 'transport-method' ; TRANSPORT_MODE : 'transport-mode' ; TRAP : 'trap' ; TRAP_SOURCE : 'trap-source' -> pushMode ( M_Interface ) ; TRAP_TIMEOUT : 'trap-timeout' ; TRAPS : 'traps' ; TRIGGER : 'trigger' ; TRIGGER_DELAY : 'trigger-delay' ; TRIMODE : 'trimode' ; TRUNK : 'trunk' ; TRUNK_THRESHOLD : 'trunk-threshold' ; TRUST : 'trust' ; TRUSTED : 'trusted' ; TRUSTED_KEY : 'trusted-key' ; TRUSTPOINT : 'trustpoint' ; TRUSTPOOL : 'trustpool' ; TSID : 'tsid' ; TSM_REQ_PROFILE : 'tsm-req-profile' ; TTL : 'ttl' ; TTL_EXCEEDED : 'ttl-exceeded' ; TTL_THRESHOLD : 'ttl-threshold' ; TTY : 'tty' ; TUE : 'Tue' ; TUNABLE_OPTIC : 'tunable-optic' ; TUNNEL : 'tunnel' ; TUNNEL_GROUP : 'tunnel-group' ; TUNNEL_GROUP_LIST : 'tunnel-group-list' ; TUNNEL_ID : 'tunnel-id' ; TUNNELED : 'tunneled' ; TUNNELED_NODE_ADDRESS : 'tunneled-node-address' ; TX_QUEUE : 'tx-queue' ; TXSPEED : 'txspeed' ; TYPE : 'type' ; TYPE_1 : 'type-1' ; TYPE_2 : 'type-2' ; UAUTH : 'uauth' ; UC_TX_QUEUE : 'uc-tx-queue' ; UDF : 'udf' ; UDLD : 'udld' ; UDP : 'udp' ; UDP_PORT : 'udp-port' ; UDP_JITTER : 'udp-jitter' ; UID : 'uid' ; UNABLE : 'Unable' ; UNAUTHORIZED : 'unauthorized' ; UNAUTHORIZED_DEVICE_PROFILE : 'unauthorized-device-profile' ; UNICAST_ROUTING : 'unicast-routing' ; UNIDIRECTIONAL : 'unidirectional' ; UNIQUE : 'unique' ; UNIT : 'unit' ; UNNUMBERED : 'unnumbered' ; UNREACHABLE : 'unreachable' ; UNREACHABLES : 'unreachables' ; UNSET : 'unset' ; UNSUPPRESS_MAP : 'unsuppress-map' ; UNSUPPRESS_ROUTE : 'unsuppress-route' ; UNICAST : 'unicast' ; UNTAGGED : 'untagged' ; UPDATE : 'update' ; UPDATE_CALENDAR : 'update-calendar' ; UPDATE_SOURCE : 'update-source' -> pushMode ( M_Interface ) ; UPGRADE : 'upgrade' ; UPGRADE_PROFILE : 'upgrade-profile' ; UPLINK : 'uplink' ; UPLINKFAST : 'uplinkfast' ; UPS : 'ups' ; UPSTREAM : 'upstream' ; UPSTREAM_START_THRESHOLD : 'upstream-start-threshold' ; URG : 'urg' ; URI : 'uri' ; URL : 'url' ; URL_LIST : 'url-list' ; URPF : 'urpf' ; USE : 'use' ; USE_ACL : 'use-acl' ; USE_BIA : 'use-bia' ; USE_IPV4_ACL : 'use-ipv4-acl' ; USE_IPV6_ACL : 'use-ipv6-acl' ; USE_LINK_ADDRESS : 'use-link-address' ; USE_VRF : 'use-vrf' ; USER : 'user' ; USER_IDENTITY : 'user-identity' ; USERINFO : 'userinfo' ; USER_MESSAGE : 'user-message' -> pushMode ( M_Description ) ; USER_ROLE : 'user-role' ; USER_STATISTICS : 'user-statistics' ; USERGROUP : 'usergroup' ; USERNAME : 'username' ; USERNAME_PROMPT : 'username-prompt' ; USERPASSPHRASE : 'userpassphrase' ; USERS : 'users' ; USING : 'Using' ; UTIL_INTERVAL : 'util-interval' ; UUCP : 'uucp' ; UUCP_PATH : 'uucp-path' ; V1_RP_REACHABILITY : 'v1-rp-reachability' ; V2 : 'v2' ; V4 : 'v4' ; V6 : 'v6' ; VACANT_MESSAGE : 'vacant-message' -> pushMode ( M_VacantMessageText ) ; VACL : 'vacl' ; VAD : 'vad' ; VALID_11A_40MHZ_CHANNEL_PAIR : 'valid-11a-40mhz-channel-pair' ; VALID_11A_80MHZ_CHANNEL_GROUP : 'valid-11a-80mhz-channel-group' ; VALID_11A_CHANNEL : 'valid-11a-channel' ; VALID_11G_40MHZ_CHANNEL_PAIR : 'valid-11g-40mhz-channel-pair' ; VALID_11G_CHANNEL : 'valid-11g-channel' ; VALID_AND_PROTECTED_SSID : 'valid-and-protected-ssid' ; VALID_NETWORK_OUI_PROFILE : 'valid-network-oui-profile' ; VALIDATION_USAGE : 'validation-usage' ; VAP_ENABLE : 'vap-enable' ; VARIANCE : 'variance' ; VDC : 'vdc' ; VER : 'ver' ; VERIFY : 'verify' ; VERIFY_DATA : 'verify-data' ; VERSION : 'version' ; VIDEO : 'video' ; VIEW : 'view' ; VIOLATE_ACTION : 'violate-action' ; VIOLATION : 'violation' ; VIRTUAL : 'virtual' ; VIRTUAL_ADDRESS : 'virtual-address' ; VIRTUAL_AP : 'virtual-ap' ; VIRTUAL_REASSEMBLY : 'virtual-reassembly' ; VIRTUAL_ROUTER : 'virtual-router' ; VIRTUAL_SERVICE : 'virtual-service' ; VIRTUAL_TEMPLATE : 'virtual-template' ; VFI : 'vfi' ; VLAN : 'vlan' ; VLAN_GROUP : 'vlan-group' ; VLAN_NAME : 'vlan-name' ; VLAN_POLICY : 'vlan-policy' ; VLT : 'vlt' ; VLT_PEER_LAG : 'vlt-peer-lag' ; VM_CPU : 'vm-cpu' ; VM_MEMORY : 'vm-memory' ; VMNET : 'vmnet' ; VMPS : 'vmps' ; VMTRACER : 'vmtracer' ; VNI : 'vni' ; VOCERA : 'vocera' ; VOICE : 'voice' ; VOICE_CARD : 'voice-card' ; VOICE_CLASS : 'voice-class' ; VOICE_PORT : 'voice-port' ; VOICE_SERVICE : 'voice-service' ; VOIP : 'voip' ; VOIP_CAC_PROFILE : 'voip-cac-profile' ; VPC : 'vpc' ; VPDN : 'vpdn' ; VPDN_GROUP : 'vpdn-group' ; VPLS : 'vpls' ; VPN : 'vpn' ; VPN_DIALER : 'vpn-dialer' ; VPN_GROUP_POLICY : 'vpn-group-policy' ; VPN_FILTER : 'vpn-filter' ; VPN_IDLE_TIMEOUT : 'vpn-idle-timeout' ; VPN_SESSION_TIMEOUT : 'vpn-session-timeout' ; VPN_SIMULTANEOUS_LOGINS : 'vpn-simultaneous-logins' ; VPN_TUNNEL_PROTOCOL : 'vpn-tunnel-protocol' ; VPNV4 : 'vpnv4' ; VPNV6 : 'vpnv6' ; VRF : 'vrf' {enableIPV6_ADDRESS = false;} ; VRF_ALSO : 'vrf-also' ; VRRP : 'vrrp' ; VRRP_GROUP : 'vrrp-group' ; VSERVER : 'vserver' ; VSTACK : 'vstack' ; VTEP : 'vtep' ; VTP : 'vtp' ; VTY : 'vty' ; VTY_POOL : 'vty-pool' ; VXLAN : 'vxlan' ; WAIT_FOR : 'wait-for' ; WAIT_IGP_CONVERGENCE : 'wait-igp-convergence' ; WAIT_START : 'wait-start' ; WARNINGS : 'warnings' ; WARNING_ONLY : 'warning-only' ; WARNTIME : 'warntime' ; WATCHDOG : 'watchdog' ; WATCH_LIST : 'watch-list' ; WAVELENGTH : 'wavelength' ; WCCP : 'wccp' ; WEB_CACHE : 'web-cache' ; WEB_HTTPS_PORT_443 : 'web-https-port-443' ; WEB_MAX_CLIENTS : 'web-max-clients' ; WEB_SERVER : 'web-server' ; WEBAUTH : 'webauth' ; WEBVPN : 'webvpn' ; WED : 'Wed' ; WEEKDAY : 'weekday' ; WEEKEND : 'weekend' ; WEIGHT : 'weight' ; WEIGHTING : 'weighting' ; WEIGHTS : 'weights' ; WELCOME_PAGE : 'welcome-page' ; WHITE_LIST : 'white-list' ; WHO : 'who' ; WHOIS : 'whois' ; WIDE : 'wide' ; WIDE_METRIC : 'wide-metric' ; WIDEBAND : 'wideband' ; WINDOW_SIZE : 'window-size' ; WINS_SERVER : 'wins-server' ; WIRED_AP_PROFILE : 'wired-ap-profile' ; WIRED_CONTAINMENT : 'wired-containment' ; WIRED_PORT_PROFILE : 'wired-port-profile' ; WIRED_TO_WIRELESS_ROAM : 'wired-to-wireless-roam' ; WIRELESS_CONTAINMENT : 'wireless-containment' ; WISM : 'wism' ; WITHOUT_CSD : 'without-csd' ; WLAN : 'wlan' ; WMM : 'wmm' ; WMS_GENERAL_PROFILE : 'wms-general-profile' ; WMS_LOCAL_SYSTEM_PROFILE : 'wms-local-system-profile' ; WPA_FAST_HANDOVER : 'wpa-fast-handover' ; WRED : 'wred' ; WRED_PROFILE : 'wred-profile' ; WRITE_MEMORY : 'write-memory' ; WRR : 'wrr' ; WRR_QUEUE : 'wrr-queue' ; WSMA : 'wsma' ; WWW : 'www' ; X25 : 'x25' ; X29 : 'x29' ; XCONNECT : 'xconnect' ; XDMCP : 'xdmcp' ; XDR : 'xdr' ; XLATE : 'xlate' ; XML : 'XML' | 'xml' ; XML_CONFIG : 'xml-config' ; XNS_CH : 'xns-ch' ; XNS_MAIL : 'xns-mail' ; XNS_TIME : 'xns-time' ; YELLOW : 'yellow' ; Z39_50 : 'z39-50' ; ZONE : 'zone' ; ZONE_MEMBER : 'zone-member' ; ZONE_PAIR : 'zone-pair' ; /* Other Tokens */ MULTICONFIGPART : '############ MultiConfigPart' F_NonNewline* F_Newline+ -> channel ( HIDDEN ) ; MD5_ARISTA : '$1$' F_AristaBase64String '$' F_AristaBase64String ; SHA512_ARISTA : '$6$' F_AristaBase64String '$' F_AristaBase64String ; POUND : '#' -> pushMode ( M_Description ) ; STANDARD_COMMUNITY : F_StandardCommunity {!enableIPV6_ADDRESS}? ; MAC_ADDRESS_LITERAL : F_HexDigit F_HexDigit F_HexDigit F_HexDigit '.' F_HexDigit F_HexDigit F_HexDigit F_HexDigit '.' F_HexDigit F_HexDigit F_HexDigit F_HexDigit ; HEX : '0x' F_HexDigit+ ; VARIABLE : ( ( F_Variable_RequiredVarChar ( ( {!enableIPV6_ADDRESS}? F_Variable_VarChar* ) | ( {enableIPV6_ADDRESS}? F_Variable_VarChar_Ipv6* ) ) ) | ( ( F_Variable_VarChar {!enableIPV6_ADDRESS}? F_Variable_VarChar* F_Variable_RequiredVarChar F_Variable_VarChar* ) | ( F_Variable_VarChar_Ipv6 {enableIPV6_ADDRESS}? F_Variable_VarChar_Ipv6* F_Variable_RequiredVarChar F_Variable_VarChar_Ipv6* ) ) ) { if (enableACL_NUM) { enableACL_NUM = false; enableDEC = true; } if (enableCOMMUNITY_LIST_NUM) { enableCOMMUNITY_LIST_NUM = false; enableDEC = true; } } ; ACL_NUM : F_Digit {enableACL_NUM}? F_Digit* { int val = Integer.parseInt(getText()); if ((1 <= val && val <= 99) || (1300 <= val && val <= 1999)) { _type = ACL_NUM_STANDARD; } else if ((100 <= val && val <= 199) || (2000 <= val && val <= 2699)) { _type = ACL_NUM_EXTENDED; } else if (200 <= val && val <= 299) { _type = ACL_NUM_PROTOCOL_TYPE_CODE; } else if (_foundry && 400 <= val && val <= 1399) { _type = ACL_NUM_FOUNDRY_L2; } else if (600 <= val && val <= 699) { _type = ACL_NUM_APPLETALK; } else if (700 <= val && val <= 799) { _type = ACL_NUM_MAC; } else if (800 <= val && val <= 899) { _type = ACL_NUM_IPX; } else if (900 <= val && val <= 999) { _type = ACL_NUM_EXTENDED_IPX; } else if (1000 <= val && val <= 1099) { _type = ACL_NUM_IPX_SAP; } else if (1100 <= val && val <= 1199) { _type = ACL_NUM_EXTENDED_MAC; } else { _type = ACL_NUM_OTHER; } enableDEC = true; enableACL_NUM = false; } ; AMPERSAND : '&' ; ANGLE_BRACKET_LEFT : '<' ; ANGLE_BRACKET_RIGHT : '>' ; ASTERISK : '*' ; AT : '@' ; BACKSLASH : '\\' ; BLANK_LINE : ( F_Whitespace )* F_Newline {lastTokenType == NEWLINE}? F_Newline* -> channel ( HIDDEN ) ; BRACE_LEFT : '{' ; BRACE_RIGHT : '}' ; BRACKET_LEFT : '[' ; BRACKET_RIGHT : ']' ; CARAT : '^' ; COLON : ':' ; COMMA : ',' ; COMMUNITY_LIST_NUM : F_Digit {enableCOMMUNITY_LIST_NUM}? F_Digit* { int val = Integer.parseInt(getText()); if (1 <= val && val <= 99) { _type = COMMUNITY_LIST_NUM_STANDARD; } else if (100 <= val && val <= 500) { _type = COMMUNITY_LIST_NUM_EXPANDED; } enableCOMMUNITY_LIST_NUM = false; enableDEC = true; } ; COMMENT_LINE : ( F_Whitespace )* [!#] {lastTokenType == NEWLINE || lastTokenType == END_CADANT || lastTokenType == -1}? F_NonNewline* F_Newline+ -> channel ( HIDDEN ) ; COMMENT_TAIL : '!' F_NonNewline* -> channel ( HIDDEN ) ; ARISTA_PAGINATION_DISABLED : 'Pagination disabled.' F_Newline+ -> channel ( HIDDEN ) ; ARISTA_PROMPT_SHOW_RUN : F_NonWhitespace+ [>#] {lastTokenType == NEWLINE || lastTokenType == -1}? 'show' F_Whitespace+ 'run' ( 'n' ( 'i' ( 'n' ( 'g' ( '-' ( 'c' ( 'o' ( 'n' ( 'f' ( 'i' 'g'? )? )? )? )? )? )? )? )? )? )? F_Whitespace* F_Newline+ -> channel ( HIDDEN ) ; DASH : '-' ; DOLLAR : '$' ; DEC : F_Digit {enableDEC}? F_Digit* ; DIGIT : F_Digit ; DOUBLE_QUOTE : '"' ; EQUALS : '=' ; ESCAPE_C : ( '^C' | '\u0003' | '#' ) ; FLOAT : ( F_PositiveDigit* F_Digit '.' F_Digit+ ) ; FORWARD_SLASH : '/' ; FOUR_BYTE_AS : '4-byte-as' ; IP_ADDRESS : F_IpAddress {enableIP_ADDRESS}? ; IP_PREFIX : F_IpPrefix {enableIP_ADDRESS}? ; IPV6_ADDRESS : F_Ipv6Address {enableIPV6_ADDRESS}? ; IPV6_PREFIX : F_Ipv6Prefix {enableIPV6_ADDRESS}? ; NEWLINE : F_Newline+ { if (!inCommunitySet) { enableIPV6_ADDRESS = true; } enableIP_ADDRESS = true; enableDEC = true; enableREGEX = false; enableACL_NUM = false; _inAccessList = false; } ; PAREN_LEFT : '(' ; PAREN_RIGHT : ')' ; PERCENT : '%' ; PERIOD : '.' ; PLUS : '+' ; REGEX : '/' {enableREGEX}? ( ~('/' | '\\') | ( '\\' '/') )* '/' ; RP_VARIABLE : '$' F_Variable_RequiredVarChar F_Variable_VarChar_Ipv6* ; SEMICOLON : ';' ; SINGLE_QUOTE : '\'' ; UNDERSCORE : '_' ; WS : F_Whitespace+ -> channel ( HIDDEN ) ; // Fragments fragment F_AristaBase64Char : [0-9A-Za-z/.] ; fragment F_AristaBase64String : F_AristaBase64Char+ ; fragment F_Base64Char : [0-9A-Za-z/+] ; fragment F_Base64Quadruple : F_Base64Char F_Base64Char F_Base64Char F_Base64Char ; fragment F_Base64String : F_Base64Quadruple* ( F_Base64Quadruple | F_Base64Char F_Base64Char '==' | F_Base64Char F_Base64Char F_Base64Char '=' ) ; fragment F_DecByte : F_Digit | F_PositiveDigit F_Digit | '1' F_Digit F_Digit | '2' [0-4] F_Digit | '25' [0-5] ; fragment F_Digit : [0-9] ; fragment F_HexDigit : [0-9A-Fa-f] ; fragment F_HexWord : F_HexDigit F_HexDigit? F_HexDigit? F_HexDigit? ; fragment F_HexWord2 : F_HexWord ':' F_HexWord ; fragment F_HexWord3 : F_HexWord2 ':' F_HexWord ; fragment F_HexWord4 : F_HexWord3 ':' F_HexWord ; fragment F_HexWord5 : F_HexWord4 ':' F_HexWord ; fragment F_HexWord6 : F_HexWord5 ':' F_HexWord ; fragment F_HexWord7 : F_HexWord6 ':' F_HexWord ; fragment F_HexWord8 : F_HexWord6 ':' F_HexWordFinal2 ; fragment F_HexWordFinal2 : F_HexWord2 | F_IpAddress ; fragment F_HexWordFinal3 : F_HexWord ':' F_HexWordFinal2 ; fragment F_HexWordFinal4 : F_HexWord ':' F_HexWordFinal3 ; fragment F_HexWordFinal5 : F_HexWord ':' F_HexWordFinal4 ; fragment F_HexWordFinal6 : F_HexWord ':' F_HexWordFinal5 ; fragment F_HexWordFinal7 : F_HexWord ':' F_HexWordFinal6 ; fragment F_HexWordLE1 : F_HexWord? ; fragment F_HexWordLE2 : F_HexWordLE1 | F_HexWordFinal2 ; fragment F_HexWordLE3 : F_HexWordLE2 | F_HexWordFinal3 ; fragment F_HexWordLE4 : F_HexWordLE3 | F_HexWordFinal4 ; fragment F_HexWordLE5 : F_HexWordLE4 | F_HexWordFinal5 ; fragment F_HexWordLE6 : F_HexWordLE5 | F_HexWordFinal6 ; fragment F_HexWordLE7 : F_HexWordLE6 | F_HexWordFinal7 ; fragment F_IpAddress : F_DecByte '.' F_DecByte '.' F_DecByte '.' F_DecByte ; fragment F_IpPrefix : F_IpAddress '/' F_IpPrefixLength ; fragment F_IpPrefixLength : F_Digit | [12] F_Digit | [3] [012] ; fragment F_Ipv6Address : '::' F_HexWordLE7 | F_HexWord '::' F_HexWordLE6 | F_HexWord2 '::' F_HexWordLE5 | F_HexWord3 '::' F_HexWordLE4 | F_HexWord4 '::' F_HexWordLE3 | F_HexWord5 '::' F_HexWordLE2 | F_HexWord6 '::' F_HexWordLE1 | F_HexWord7 '::' | F_HexWord8 ; fragment F_Ipv6Prefix : F_Ipv6Address '/' F_Ipv6PrefixLength ; fragment F_Ipv6PrefixLength : F_Digit | F_PositiveDigit F_Digit | '1' [01] F_Digit | '12' [0-8] ; fragment F_Letter : F_LowerCaseLetter | F_UpperCaseLetter ; fragment F_LowerCaseLetter : 'a' .. 'z' ; fragment F_Newline : [\n\r] ; fragment F_NonNewline : ~[\n\r] ; fragment F_NonWhitespace : ~( ' ' | '\t' | '\u000C' | '\u00A0' | '\n' | '\r' ) ; fragment F_PositiveDigit : [1-9] ; fragment F_StandardCommunity : F_Uint16 ':' F_Uint16 ; fragment F_Uint16 : F_Digit | F_PositiveDigit F_Digit F_Digit? F_Digit? | [1-5] F_Digit F_Digit F_Digit F_Digit | '6' [0-4] F_Digit F_Digit F_Digit | '65' [0-4] F_Digit F_Digit | '655' [0-2] F_Digit | '6553' [0-5] ; fragment F_UpperCaseLetter : 'A' .. 'Z' ; fragment F_Variable_RequiredVarChar : ~( '0' .. '9' | '-' | [ \t\u000C\u00A0\n\r(),!+$'"*#] | '[' | ']' | [/.] | ':' ) ; fragment F_Variable : F_Variable_VarChar* F_Variable_RequiredVarChar F_Variable_VarChar* ; fragment F_Variable_VarChar : ~( [ \t\u000C\u00A0\n\r(),!$'"*#] | '[' | ']' ) ; fragment F_Variable_VarChar_Ipv6 : ~( [ \t\u000C\u00A0\n\r(),!$'"*#] | '[' | ']' | ':' ) ; fragment F_Whitespace : ' ' | '\t' | '\u000C' | '\u00A0' ; mode M_Alias; M_Alias_VARIABLE : F_NonWhitespace+ -> type ( VARIABLE ) , popMode ; M_Alias_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_AsPath; M_AsPath_ACCESS_LIST : 'access-list' -> type ( ACCESS_LIST ) , mode ( M_AsPathAccessList ) ; M_AsPath_CONFED : 'confed' -> type ( CONFED ) , popMode ; M_AsPath_DEC : F_Digit+ -> type ( DEC ) , popMode ; M_AsPath_RP_VARIABLE : '$' F_Variable_RequiredVarChar F_Variable_VarChar_Ipv6* -> type ( RP_VARIABLE ) , popMode ; M_AsPath_IN : 'in' -> type ( IN ) , popMode ; M_AsPath_IS_LOCAL : 'is-local' -> type ( IS_LOCAL ) , popMode ; M_AsPath_MULTIPATH_RELAX : 'multipath-relax' -> type ( MULTIPATH_RELAX ) , popMode ; M_AsPath_NEIGHBOR_IS : 'neighbor-is' -> type ( NEIGHBOR_IS ) , popMode ; M_AsPath_PASSES_THROUGH : 'passes-through' -> type ( PASSES_THROUGH ) , popMode ; M_AsPath_PREPEND : 'prepend' -> type ( PREPEND ) , popMode ; M_AsPath_ORIGINATES_FROM : 'originates-from' -> type ( ORIGINATES_FROM ) , popMode ; M_AsPath_REGEX_MODE : 'regex-mode' -> type ( REGEX_MODE ) , popMode ; M_AsPath_TAG : 'tag' -> type ( TAG ) , popMode ; M_AsPath_VARIABLE : F_Variable_RequiredVarChar F_Variable_VarChar* -> type ( VARIABLE ) , popMode ; M_AsPath_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_AsPathAccessList; M_AsPathAccessList_DEC : F_Digit+ -> type ( DEC ) ; M_AsPathAccessList_DENY : 'deny' -> type ( DENY ) , mode ( M_Description ) ; M_AsPathAccessList_NEWLINE : F_Newline+ -> type ( NEWLINE ) , mode ( DEFAULT_MODE ) ; M_AsPathAccessList_PERMIT : 'permit' -> type ( PERMIT ) , mode ( M_Description ) ; M_AsPathAccessList_SEQ : 'seq' -> type ( SEQ ) ; M_AsPathAccessList_VARIABLE : F_Variable_RequiredVarChar F_Variable_VarChar* -> type ( VARIABLE ) ; M_AsPathAccessList_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_Authentication; M_Authentication_DOUBLE_QUOTE : '"' -> mode ( M_DoubleQuote ) ; M_Authentication_BANNER : 'banner' -> type ( BANNER ) , mode ( M_BannerText ) ; M_Authentication_ARAP : 'arap' -> type ( ARAP ) , popMode ; M_Authentication_ATTEMPTS : 'attempts' -> type ( ATTEMPTS ) , popMode ; M_Authentication_CAPTIVE_PORTAL : 'captive-portal' -> type ( CAPTIVE_PORTAL ) , popMode ; M_Authentication_COMMAND : 'command' -> type ( COMMAND ) , popMode ; M_Authentication_CONTROL_DIRECTION : 'control-direction' -> type ( CONTROL_DIRECTION ) , popMode ; M_Authentication_DEC : F_Digit+ -> type ( DEC ) , popMode ; M_Authentication_DOT1X : 'dot1x' -> type ( DOT1X ) , popMode ; M_Authentication_ENABLE : 'enable' -> type ( ENABLE ) , popMode ; M_Authentication_EOU : 'eou' -> type ( EOU ) , popMode ; M_Authentication_FAIL_MESSAGE : 'fail-message' -> type ( FAIL_MESSAGE ) , popMode ; M_Authentication_FAILURE : 'failure' -> type ( FAILURE ) , popMode ; M_Authentication_HTTP : 'http' -> type ( HTTP ) , popMode ; M_Authentication_INCLUDE : 'include' -> type ( INCLUDE ) , popMode ; M_Authentication_KEYED_SHA1 : [kK][eE][yY][eE][dD]'-'[sS][hH][aA]'1' -> type ( KEYED_SHA1 ) , popMode ; M_Authentication_LOGIN : 'login' -> type ( LOGIN ) , popMode ; M_Authentication_MAC : 'mac' -> type ( MAC ) , popMode ; M_Authentication_MAC_MOVE : 'mac-move' -> type ( MAC_MOVE ) , popMode ; M_Authentication_MESSAGE_DIGEST : 'message-digest' -> type ( MESSAGE_DIGEST ) , popMode ; M_Authentication_MGMT : 'mgmt' -> type ( MGMT ) , popMode ; M_Authentication_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Authentication_ONEP : 'onep' -> type ( ONEP ) , popMode ; M_Authentication_PASSWORD_PROMPT : 'password-prompt' -> type ( PASSWORD_PROMPT ) , popMode ; M_Authentication_POLICY : 'policy' -> type ( POLICY ) , popMode ; M_Authentication_PPP : 'ppp' -> type ( PPP ) , popMode ; M_Authentication_PRE_SHARE : 'pre-share' -> type ( PRE_SHARE ) , popMode ; M_Authentication_RSA_SIG : 'rsa-sig' -> type ( RSA_SIG ) , popMode ; M_Authentication_SGBP : 'sgbp' -> type ( SGBP ) , popMode ; M_Authentication_SERIAL : 'serial' -> type ( SERIAL ) , popMode ; M_Authentication_SSH : 'ssh' -> type ( SSH ) , popMode ; M_Authentication_STATEFUL_DOT1X : 'stateful-dot1x' -> type ( STATEFUL_DOT1X ) , popMode ; M_Authentication_STATEFUL_KERBEROS : 'stateful-kerberos' -> type ( STATEFUL_KERBEROS ) , popMode ; M_Authentication_STATEFUL_NTLM : 'stateful-ntlm' -> type ( STATEFUL_NTLM ) , popMode ; M_Authentication_SUCCESS : 'success' -> type ( SUCCESS ) , popMode ; M_Authentication_SUPPRESS : 'suppress' -> type ( SUPPRESS ) , popMode ; M_Authentication_TELNET : 'telnet' -> type ( TELNET ) , popMode ; M_Authentication_TEXT : 'text' -> type ( TEXT ) , popMode ; M_Authentication_USERNAME_PROMPT : 'username-prompt' -> type ( USERNAME_PROMPT ) , mode ( M_AuthenticationUsernamePrompt ) ; M_Authentication_VPN : 'vpn' -> type ( VPN ) , popMode ; M_Authentication_WIRED : 'wired' -> type ( WIRED ) , popMode ; M_Authentication_WISPR : 'wispr' -> type ( WISPR ) , popMode ; M_Authentication_VARIABLE : F_Variable -> type ( VARIABLE ) , popMode ; M_Authentication_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_AuthenticationUsernamePrompt; M_AuthenticationUsernamePrompt_DOUBLE_QUOTE : '"' -> type ( DOUBLE_QUOTE ) , mode ( M_AuthenticationUsernamePromptText ) ; M_AuthenticationUsernamePrompt_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_AuthenticationUsernamePromptText; M_AuthenticationUsernamePromptText_RAW_TEXT : ~'"'+ -> type ( RAW_TEXT ) ; M_AuthenticationUsernamePromptText_DOUBLE_QUOTE : '"' -> type ( DOUBLE_QUOTE ) , popMode ; mode M_Banner; M_Banner_CONFIG_SAVE : 'config-save' -> type ( CONFIG_SAVE ) , mode ( M_BannerText ) ; M_Banner_EXEC : 'exec' -> type ( EXEC ) , mode ( M_BannerText ) ; M_Banner_INCOMING : 'incoming' -> type ( INCOMING ) , mode ( M_BannerText ) ; M_Banner_LOGIN : 'login' -> type ( LOGIN ) , mode ( M_BannerText ) ; M_Banner_MOTD : 'motd' -> type ( MOTD ) , mode ( M_BannerText ) ; M_Banner_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Banner_NONE : 'none' -> type ( NONE ) ; M_Banner_PROMPT_TIMEOUT : 'prompt-timeout' -> type ( PROMPT_TIMEOUT ) , mode ( M_BannerText ) ; M_Banner_SLIP_PPP : 'slip-ppp' -> type ( SLIP_PPP ) , mode ( M_BannerText ) ; M_Banner_VALUE : 'value' -> type ( VALUE ) , mode ( M_Description ) ; M_Banner_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_BannerCadant; M_BannerCadant_END_CADANT : '/end' F_Newline -> type ( END_CADANT ) , popMode ; M_BannerCadant_LINE_CADANT : F_NonNewline* F_Newline+ -> type ( LINE_CADANT ) ; mode M_BannerText; M_BannerText_WS : F_Whitespace+ -> channel ( HIDDEN ) ; M_BannerText_ESCAPE_C : ( '^C' | '^' | '\u0003' ) {!_cadant}? -> type ( ESCAPE_C ) , mode ( M_MOTD_C ) ; M_BannerText_HASH : '#' {!_cadant}? -> type ( POUND ) , mode ( M_MOTD_HASH ) ; M_BannerText_ASA_BANNER_LINE : ~[#^\r\n \t\u000C\u00A0] F_NonNewline* -> type ( ASA_BANNER_LINE ) , popMode ; M_BannerText_NEWLINE : F_Newline {!_cadant}? F_Newline* -> type ( NEWLINE ) , mode ( M_MOTD_EOF ) ; M_BannerText_NEWLINE_CADANT : F_Newline {_cadant}? F_Newline* -> type ( NEWLINE ) , mode ( M_BannerCadant ) ; mode M_CadantSshKey; M_CadantSshKey_END : '/end' F_NonNewline* F_Newline -> type ( END_CADANT ) , popMode ; M_CadantSshKey_LINE : F_HexDigit+ F_Newline+ ; M_CadantSshKey_WS : F_Whitespace+ -> channel ( HIDDEN ) ; M_CadantSshKey_NEWLINE : F_Newline+ -> type ( NEWLINE ) ; mode M_Certificate; M_Certificate_CA : 'ca' -> type ( CA ) , pushMode ( M_CertificateText ) ; M_Certificate_CHAIN : 'chain' -> type ( CHAIN ) , popMode ; M_Certificate_SELF_SIGNED : 'self-signed' -> type ( SELF_SIGNED ) , pushMode ( M_CertificateText ) ; M_Cerficate_HEX_FRAGMENT : [A-Fa-f0-9]+ -> type ( HEX_FRAGMENT ) , pushMode ( M_CertificateText ) ; M_Certificate_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_CertificateText; M_CertificateText_QUIT : 'quit' -> type ( QUIT ) , mode ( DEFAULT_MODE ) ; M_CertificateText_HEX_FRAGMENT : [A-Fa-f0-9]+ -> type ( HEX_FRAGMENT ) ; M_CertificateText_WS : ( F_Whitespace | F_Newline )+ -> channel ( HIDDEN ) ; mode M_Command; M_Command_QuotedString : '"' ( ~'"' )* '"' -> type ( QUOTED_TEXT ) ; M_Command_Newline : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Command_Variable : F_NonWhitespace+ -> type ( VARIABLE ) ; M_Command_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_COMMENT; M_COMMENT_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_COMMENT_NON_NEWLINE : F_NonNewline+ ; mode M_Description; M_Description_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Description_NON_NEWLINE : F_NonNewline+ -> type ( RAW_TEXT ) ; mode M_DoubleQuote; M_DoubleQuote_DOUBLE_QUOTE : '"' -> type ( DOUBLE_QUOTE ) , popMode ; M_DoubleQuote_TEXT : ~'"'+ ; mode M_Execute; M_Execute_TEXT : ~'}'+ ; M_Execute_BRACE_RIGHT : '}' -> type ( BRACE_RIGHT ) , popMode ; mode M_Extcommunity; M_Extcommunity_COLON : ':' -> type ( COLON ) ; M_Extcommunity_DEC : F_Digit+ -> type ( DEC ) ; M_ExtCommunity_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Extcommunity_RT : 'rt' -> type ( RT ) ; M_Extcommunity_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_FiberNode; M_FiberNode_DEC : F_Digit+ -> type ( DEC ) , popMode ; M_FiberNode_DOUBLE_QUOTE : '"' -> type ( DOUBLE_QUOTE ) , mode ( M_DoubleQuote ) ; M_FiberNode_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_Interface; M_Interface_ALL : 'all' -> type ( ALL ) , popMode ; M_Interface_BREAKOUT : 'breakout' -> type ( BREAKOUT ) , popMode ; M_Interface_CABLE : 'cable' -> type ( CABLE ) , popMode ; M_Interface_DEFAULT : 'default' -> type ( DEFAULT ) , popMode ; M_Interface_DOLLAR : '$' -> type ( DOLLAR ) , popMode ; M_Interface_EIGRP : 'eigrp' -> type ( EIGRP ) , popMode ; M_Interface_EQ : 'eq' -> type ( EQ ) , popMode ; M_Interface_GLOBAL : 'global' -> type ( GLOBAL ) , popMode ; M_Interface_GT : 'gt' -> type ( GT ) , popMode ; M_Interface_INFORM : 'inform' -> type ( INFORM ) ; M_Interface_INFORMS : 'informs' -> type ( INFORMS ) ; M_Interface_IP : 'ip' -> type ( IP ) , popMode ; M_Interface_IPV4 : 'IPv4' -> type ( IPV4 ) ; M_Interface_POINT_TO_POINT : 'point-to-point' -> type ( POINT_TO_POINT ) , popMode ; M_Interface_POLICY : 'policy' -> type ( POLICY ) , popMode ; M_Interface_L2TRANSPORT : 'l2transport' -> type ( L2TRANSPORT ) , popMode ; M_Interface_LT : 'lt' -> type ( LT ) , popMode ; M_Interface_MODULE : 'module' -> type ( MODULE ) ; M_Interface_NO : 'no' -> type ( NO ) , popMode ; M_Interface_LINE_PROTOCOL : 'line-protocol' -> type ( LINE_PROTOCOL ) , popMode ; M_Interface_MULTIPOINT : 'multipoint' -> type ( MULTIPOINT ) , popMode ; M_Interface_SHUTDOWN : 'shutdown' -> type ( SHUTDOWN ) , popMode ; M_Interface_TRAP : 'trap' -> type ( TRAP ) ; M_Interface_TRAPS : 'traps' -> type ( TRAPS ) ; M_Interface_VRF : 'vrf' -> type ( VRF ) , popMode ; M_Interface_COLON : ':' -> type ( COLON ) ; M_Interface_COMMA : ',' -> type ( COMMA ) ; M_Interface_DASH : '-' -> type ( DASH ) ; M_Interface_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Interface_NUMBER : DEC -> type ( DEC ) ; M_Interface_PERIOD : '.' -> type ( PERIOD ) ; M_Interface_PIPE : '|' -> type ( PIPE ) , popMode ; M_Interface_PRECFONFIGURE : 'preconfigure' -> type ( PRECONFIGURE ) ; // M_Interface_VXLAN must come before M_Interface_PREFIX M_Interface_VXLAN : [Vv]'xlan' -> type (VXLAN) ; M_Interface_PREFIX : ( F_Letter ( F_Letter | '-' | '_' )* ) | 'Dot11Radio' | [Ee]'1' | [Tt]'1' ; M_Interface_RELAY : 'relay' -> type ( RELAY ) , popMode ; M_Interface_SLASH : '/' -> type ( FORWARD_SLASH ) ; M_Interface_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_IosRegex; M_IosRegex_COMMUNITY_SET_REGEX : '\'' ~[':&<> ]* ':' ~[':&<> ]* '\'' -> type ( COMMUNITY_SET_REGEX ) , popMode ; M_IosRegex_AS_PATH_SET_REGEX : '\'' ~'\''* '\'' -> type ( AS_PATH_SET_REGEX ) , popMode ; M_IosRegex_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_ISO_Address; M_ISO_Address_ISO_ADDRESS : F_HexDigit+ ( '.' F_HexDigit+ )+ -> type ( ISO_ADDRESS ) , popMode ; M_ISO_Address_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_MOTD_C; M_MOTD_C_ESCAPE_C : ( '^C' | ( '^' F_Newline ) | 'cC' | '\u0003' ) -> type ( ESCAPE_C ) , mode ( DEFAULT_MODE ) ; M_MOTD_C_MOTD : ( ( '^' ~[^C\u0003\n\r] ) | ( 'c' ~[^C\u0003] ) | ~[c^\u0003] )+ ; mode M_MOTD_EOF; M_MOTD_EOF_EOF : 'EOF' -> type ( EOF_LITERAL ) , mode ( DEFAULT_MODE ) ; M_MOTD_EOF_MOTD : ( ~'E' | ( 'E' ~'O' ) | ( 'EO' ~'F' ) )+ ; mode M_MOTD_HASH; M_MOTD_HASH_HASH : '#' -> type ( POUND ) , mode ( DEFAULT_MODE ) ; M_MOTD_HASH_MOTD : ~'#'+ ; mode M_Name; M_Name_NAME : ( F_NonWhitespace+ | '"' ~'"'* '"' ) -> type ( VARIABLE ) , popMode ; M_Name_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Name_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_NEIGHBOR; M_NEIGHBOR_CHANGES : 'changes' -> type ( CHANGES ) , popMode ; M_NEIGHBOR_IP_ADDRESS : F_IpAddress -> type ( IP_ADDRESS ) , popMode ; M_NEIGHBOR_IP_PREFIX : F_IpPrefix -> type ( IP_PREFIX ) , popMode ; M_NEIGHBOR_IPV6_ADDRESS : F_Ipv6Address -> type ( IPV6_ADDRESS ) , popMode ; M_NEIGHBOR_IPV6_PREFIX : F_Ipv6Prefix -> type ( IPV6_PREFIX ) , popMode ; M_NEIGHBOR_NLRI : 'nlri' -> type ( NLRI ) , popMode ; M_NEIGHBOR_PASSIVE : 'passive' -> type ( PASSIVE ) , popMode ; M_NEIGHBOR_SRC_IP : 'src-ip' -> type ( SRC_IP ) , popMode ; M_NEIGHBOR_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_NEIGHBOR_VARIABLE : F_Variable_VarChar+ -> type ( VARIABLE ) , popMode ; M_NEIGHBOR_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_ObjectGroup; M_ObjectGroup_IP : 'ip' -> type ( IP ) , popMode ; M_ObjectGroup_NETWORK : 'network' -> type ( NETWORK ) , popMode ; M_ObjectGroup_PROTOCOL : 'protocol' -> type ( PROTOCOL ) , popMode ; M_ObjectGroup_SERVICE : 'service' -> type ( SERVICE ) , popMode ; M_ObjectGroup_USER : 'user' -> type ( USER ) , popMode ; M_ObjectGroup_ICMP_TYPE : 'icmp-type' -> type ( ICMP_TYPE ) , popMode ; M_ObjectGroup_GROUP : 'group' -> type ( GROUP ) , popMode ; /* Do not reorder above literals */ M_ObjectGroup_NAME : F_NonWhitespace+ -> type ( VARIABLE ) , popMode ; M_ObjectGroup_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_ObjectGroup_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_REMARK; M_REMARK_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_REMARK_REMARK : F_NonNewline+ ; mode M_RouteMap; M_RouteMap_IN : 'in' -> type ( IN ) ; M_RouteMap_OUT : 'out' -> type ( OUT ) ; M_RouteMap_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_RouteMap_VARIABLE : F_NonWhitespace+ { if (enableACL_NUM) { enableACL_NUM = false; enableDEC = true; } if (enableCOMMUNITY_LIST_NUM) { enableCOMMUNITY_LIST_NUM = false; enableDEC = true; } } -> type ( VARIABLE ) , popMode ; M_RouteMap_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_Seed; M_Seed_PASSWORD_SEED : F_NonWhitespace+ -> type ( PASSWORD_SEED ) , popMode ; mode M_SeedWhitespace; M_Seed_WS : F_Whitespace+ -> channel ( HIDDEN ) , mode ( M_Seed ) ; mode M_SHA1; M_SHA1_DEC_PART : F_Digit+ ; M_SHA1_HEX_PART : F_HexDigit+ -> popMode ; M_SHA1_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_SnmpServerCommunity; M_SnmpServerCommunity_COMMUNITY : 'community' -> type ( COMMUNITY ) ; M_SnmpServerCommunity_WS : F_Whitespace+ -> channel ( HIDDEN ) ; M_SnmpServerCommunity_DOUBLE_QUOTE : '"' -> type ( DOUBLE_QUOTE ), mode ( M_DoubleQuote ) ; M_SnmpServerCommunity_CHAR : F_NonWhitespace -> mode ( M_Name ), more ; mode M_SshKey; M_SshKey_DSA1024 : 'dsa1024' -> type ( DSA1024 ), mode ( M_CadantSshKey ) ; M_SshKey_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_SshKey_WS : F_Whitespace+ -> channel ( HIDDEN ) ; mode M_VacantMessageText; M_VacantMessage_WS : F_Whitespace+ -> channel ( HIDDEN ) ; M_VacantMessage_ESCAPE_C : ( '^C' | '\u0003' ) -> type ( ESCAPE_C ) , mode ( M_MOTD_C ) ; M_VacantMessage_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; mode M_Words; M_Words_WORD : F_NonWhitespace+ -> type ( VARIABLE ) ; M_Words_NEWLINE : F_Newline+ -> type ( NEWLINE ) , popMode ; M_Words_WS : F_Whitespace+ -> channel ( HIDDEN ) ;
awa/src/awa-commands-stop.ads
twdroeger/ada-awa
81
18147
<gh_stars>10-100 ----------------------------------------------------------------------- -- awa-commands-stop -- Command to stop the web server -- Copyright (C) 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 GNAT.Command_Line; with AWA.Commands.Drivers; generic with package Command_Drivers is new AWA.Commands.Drivers (<>); package AWA.Commands.Stop is type Command_Type is new Command_Drivers.Command_Type with record Management_Port : aliased Integer := 0; end record; -- Setup the command before parsing the arguments and executing it. overriding procedure Setup (Command : in out Command_Type; Config : in out GNAT.Command_Line.Command_Line_Configuration; Context : in out Context_Type); -- Stop the server by sending a 'stop' command on the management socket. overriding procedure Execute (Command : in out Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); Command : aliased Command_Type; end AWA.Commands.Stop;
src/System/IO/Transducers/Properties/LaxProduct.agda
ilya-fiveisky/agda-system-io
10
8617
<gh_stars>1-10 open import Coinduction using ( ♭ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; cong ; cong₂ ) open import System.IO.Transducers using ( _⇒_ ; inp ; out ; done ; out*' ; _⟫_ ; _⟨&⟩_ ; _⟨&⟩[_]_ ; discard ; π₁ ; π₂ ; ⟦_⟧ ; _≃_ ) open import System.IO.Transducers.Session using ( [] ; _∷_ ; _&_ ) open import System.IO.Transducers.Trace using ( _≤_ ; Trace ; [] ; _∷_ ) open import System.IO.Transducers.Properties.Lemmas using ( cong₃ ; revApp ; out*'-semantics ) open import System.IO.Transducers.Properties.BraidedMonoidal using ( _++_ ) open import System.IO.Transducers.Properties.Category using ( _⟦⟫⟧_ ; ⟫-semantics ) module System.IO.Transducers.Properties.LaxProduct where open Relation.Binary.PropositionalEquality.≡-Reasoning _⟦⟨&⟩⟧_ : ∀ {S T U} → (f : Trace S → Trace T) → (g : Trace S → Trace U) → (Trace S) → (Trace (T & U)) (f ⟦⟨&⟩⟧ g) as = f as ++ g as _⟦⟨&⟩[_]⟧_ : ∀ {S T U V} → (Trace S → Trace T) → (U ≤ V) → (Trace S → Trace U) → (Trace S → Trace (T & V)) (f ⟦⟨&⟩[ cs ]⟧ g) as = f as ++ (revApp cs (g as)) ⟨&⟩[]-semantics : ∀ {S T U V} → (P : S ⇒ T) → (cs : U ≤ V) → (Q : S ⇒ U) → (⟦ P ⟨&⟩[ cs ] Q ⟧ ≃ ⟦ P ⟧ ⟦⟨&⟩[ cs ]⟧ ⟦ Q ⟧) ⟨&⟩[]-semantics (inp {T = []} F) cs Q as with ⟦ inp F ⟧ as ⟨&⟩[]-semantics (inp {T = []} F) cs Q as | [] = out*'-semantics cs Q as ⟨&⟩[]-semantics (inp {T = W ∷ Ts} F) cs (inp G) [] = refl ⟨&⟩[]-semantics (inp {T = W ∷ Ts} F) cs (inp G) (a ∷ as) = ⟨&⟩[]-semantics (♭ F a) cs (♭ G a) as ⟨&⟩[]-semantics (inp {T = W ∷ Ts} F) cs (out c Q) as = ⟨&⟩[]-semantics (inp F) (c ∷ cs) Q as ⟨&⟩[]-semantics (inp {T = W ∷ Ts} F) cs done [] = refl ⟨&⟩[]-semantics (inp {T = W ∷ Ts} F) cs done (a ∷ as) = ⟨&⟩[]-semantics (♭ F a) (a ∷ cs) done as ⟨&⟩[]-semantics (out b P) cs Q as = cong (_∷_ b) (⟨&⟩[]-semantics P cs Q as) ⟨&⟩[]-semantics (done {[]}) cs Q [] = out*'-semantics cs Q [] ⟨&⟩[]-semantics (done {W ∷ Ts}) cs (inp F) [] = refl ⟨&⟩[]-semantics (done {W ∷ Ts}) cs (inp F) (a ∷ as) = cong (_∷_ a) (⟨&⟩[]-semantics done cs (♭ F a) as) ⟨&⟩[]-semantics (done {W ∷ Ts}) cs (out c Q) as = ⟨&⟩[]-semantics done (c ∷ cs) Q as ⟨&⟩[]-semantics (done {W ∷ Ts}) cs done [] = refl ⟨&⟩[]-semantics (done {W ∷ Ts}) cs done (a ∷ as) = cong (_∷_ a) (⟨&⟩[]-semantics done (a ∷ cs) done as) ⟨&⟩-semantics : ∀ {S T U} → (P : S ⇒ T) → (Q : S ⇒ U) → (⟦ P ⟨&⟩ Q ⟧ ≃ ⟦ P ⟧ ⟦⟨&⟩⟧ ⟦ Q ⟧) ⟨&⟩-semantics P Q = ⟨&⟩[]-semantics P [] Q ⟫-dist-⟨&⟩ : ∀ {S T U V} → (P : T ⇒ U) → (Q : T ⇒ V) → (R : S ⇒ T) → (⟦ R ⟫ (P ⟨&⟩ Q) ⟧ ≃ ⟦ (R ⟫ P) ⟨&⟩ (R ⟫ Q) ⟧) ⟫-dist-⟨&⟩ P Q R as = begin ⟦ R ⟫ P ⟨&⟩ Q ⟧ as ≡⟨ ⟫-semantics R (P ⟨&⟩ Q) as ⟩ ⟦ P ⟨&⟩ Q ⟧ (⟦ R ⟧ as) ≡⟨ ⟨&⟩-semantics P Q (⟦ R ⟧ as) ⟩ ⟦ P ⟧ (⟦ R ⟧ as) ++ ⟦ Q ⟧ (⟦ R ⟧ as) ≡⟨ cong₂ _++_ (sym (⟫-semantics R P as)) (sym (⟫-semantics R Q as)) ⟩ ⟦ R ⟫ P ⟧ as ++ ⟦ R ⟫ Q ⟧ as ≡⟨ sym (⟨&⟩-semantics (R ⟫ P) (R ⟫ Q) as) ⟩ ⟦ (R ⟫ P) ⟨&⟩ (R ⟫ Q) ⟧ as ∎
Practice/Final/Lab 5/3. Write an ASM code to copy element from one array to another.asm
WardunIslam/CSE331L_Section_7_Summer_2020_NSU
0
81971
<filename>Practice/Final/Lab 5/3. Write an ASM code to copy element from one array to another.asm .MODEL SMALL .STACK 100H .DATA A DB 1,2,3,4,5,6,7,8,9,0 B DB DUP(0) .CODE MAIN PROC MOV AX, @DATA MOV DS, AX LEA SI, A LEA BX, B MOV CX, 0AH L1: MOV AL, BYTE PTR[SI] MOV BYTE PTR [BX], AL INC BX INC SI LOOP L1 MOV SI, OFFSET B MOV CX, 0AH L2: MOV AH, 02H MOV DL, BYTE PTR DS:[SI] ADD DL, 30H INT 21H MOV DL, ' ' INT 21H INC SI LOOP L2 MOV AH, 4CH INT 21H MAIN ENDP END MAIN
src/layout.asm
idlechild/sm_practice_hack
0
7853
<filename>src/layout.asm ; Crab Shaft save station load point org $80C995 db #$A3, #$D1, #$68, #$A4, #$00, #$00, #$00, #$00, #$00, #$02, #$78, #$00, #$60, #$00 ; Main Street save station load point org $80C9A3 db #$C9, #$CF, #$D8, #$A3, #$00, #$00, #$00, #$01, #$00, #$05, #$78, #$00, #$10, #$00 ; Crab Shaft save station map icon location org $82CA17 db #$90, #$00, #$50, #$00 ; Main Street save station map icon location org $82CA1B db #$58, #$00, #$78, #$00 ; Hijack room transition between loading level data and setting up scrolling org $82E388 dw hijack_after_load_level_data ; Hijack call to create door closing PLM org $82E4C9 JSR hijack_door_closing_plm org $82F800 print pc, " layout bank82 start" hijack_after_load_level_data: { LDA $079B : CMP #$D6FD : BNE .done LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ .done ; Aqueduct Farm Sand Pit needs to be handled before the door scroll JSL layout_asm_aqueductfarmsandpit_external .done JMP $E38E } hijack_door_closing_plm: { PHP : PHB %ai16() LDA $078D : CMP #$A654 : BNE .done LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BNE .done ; Aqueduct Farm Sand Pit should not have a door closing PLM ; if using the warp door while Area Rando off PLB : PLP : RTS .done JMP $E8EF } print pc, " layout bank82 end" warnpc $82FA00 ; East Ocean left door asm pointer org $838A88 dw #layout_asm_eastocean ; Green Hill Zone top-left door asm pointer org $838DF4 dw #layout_asm_greenhillzone ; Green Hill Zone top-right door asm pointer org $838EA8 dw #layout_asm_greenhillzone ; Green Hill Zone bottom-right door asm pointer org $838F08 dw #layout_asm_greenhillzone ; Caterpillar middle-left door asm pointer org $839094 ; Use same asm as elevator door, freeing up asm at $BE1A dw $BA21 ; Caterpillar top-left door asm pointer org $8390E8 dw #layout_asm_caterpillar_no_scrolls ; East Tunnel bottom-right door asm pointer org $839238 ; Use same asm as bottom-left door dw $E345 ; Caterpillar near-right door asm pointer org $839274 dw #layout_asm_caterpillar_no_scrolls ; Single Chamber top-left door asm pointer org $83958C dw #layout_asm_singlechamber ; Single Chamber near-top-right door asm pointer org $839610 dw #layout_asm_singlechamber ; Single Chamber near-middle-right door asm pointer org $83961C dw #layout_asm_singlechamber ; Single Chamber near-bottom-right door asm pointer org $839640 dw #layout_asm_singlechamber ; Single Chamber far-top-right door asm pointer org $839A54 dw #layout_asm_singlechamber ; East Ocean right door asm pointer org $83A26E dw #layout_asm_eastocean ; Main Street bottom door asm pointer org $83A33A dw #layout_asm_mainstreet ; Crab Tunnel left door asm pointer org $83A3B2 dw #layout_asm_crabtunnel ; Main Street middle-right door asm pointer org $83A3E2 dw #layout_asm_mainstreet ; Main Street bottom-right door asm pointer org $83A41E dw #layout_asm_mainstreet ; Main Street top-right door asm pointer org $83A442 dw #layout_asm_mainstreet ; Main Street hidden door asm pointer org $83A45A dw #layout_asm_mainstreet ; Crab Shaft left door asm pointer org $83A472 dw #layout_asm_crabshaft_no_scrolls ; Crab Shaft top door asm pointer org $83A4EA dw #layout_asm_crabshaft_no_scrolls ; Crab Tunnel right door asm pointer org $83A502 dw #layout_asm_crabtunnel ; East Tunnel top-right door asm pointer org $83A51A dw #layout_asm_easttunnel_no_scrolls ; West Sand Hall left door asm pointer org $83A53E dw #layout_asm_westsandhall ; West Sand Hall unused door definition org $83A654 dw #$D6FD db #$00, #$05, #$3E, #$06, #$03, #$00 dw #$8000 dw #$0000 ; West Sand Hall right door asm pointer org $83A66A dw #layout_asm_westsandhall ; West Sand Hall top sand door asm pointer org $83A6BE dw #layout_asm_westsandhall ; Mother Brain right door asm pointer org $83AAD2 dw #layout_asm_mbhp ; Mother Brain left door asm pointer org $83AAEA dw #layout_asm_mbhp ; Magnet Stairs left door asm pointer org $83AB6E dw #layout_asm_magnetstairs ; Magnet Stairs right door asm pointer org $83AB92 dw #layout_asm_magnetstairs ; Allow debug save stations to be used org $848D0C AND #$000F ; Caterpillar elevator and middle-left door asm org $8FBA26 ; Replace STA with jump to STA JMP layout_asm_caterpillar_update_scrolls ; Caterpillar bottom-left door asm org $8FBE18 ; Overwrite PLP : RTS with jump ; Okay to overwrite $BE1A since we freed up that space JMP layout_asm_caterpillar_after_scrolls ; Aqueduct Farm Sand Pit header org $8FD706 dw layout_asm_aqueductfarmsandpit_door_list ; Ceres Ridley modified state check to support presets org $8FE0C0 dw layout_asm_ceres_ridley_room_state_check ; Ceres Ridley room setup asm when timer is not running org $8FE0DF dw layout_asm_ceres_ridley_room_no_timer ; East Tunnel bottom-left and bottom-right door asm org $8FE34E ; Optimize existing logic by one byte INC : STA $7ECD24 ; Overwrite extra byte : PLP : RTS with jump JMP layout_asm_easttunnel_after_scrolls ; Caterpillar far-right door asm org $8FE370 ; Optimize existing logic by one byte INC : STA $7ECD2A ; Overwrite extra byte : PLP : RTS with jump JMP layout_asm_caterpillar_after_scrolls ; Crab Shaft right door asm org $8FE39D ; Replace STA with jump to STA JMP layout_asm_crabshaft_update_scrolls org $8FEA00 ; free space for door asm print pc, " layout start" layout_asm_mbhp: { LDA !sram_display_mode : BNE .done LDA #!IH_MODE_ROOMSTRAT_INDEX : STA !sram_display_mode LDA #!IH_STRAT_MBHP_INDEX : STA !sram_room_strat .done RTS } layout_asm_ceres_ridley_room_state_check: { LDA $0943 : BEQ .no_timer LDA $0001,X : TAX JMP $E5E6 .no_timer STZ $093F INX : INX : INX RTS } layout_asm_ceres_ridley_room_no_timer: { ; Same as original setup asm, except force blue background PHP SEP #$20 LDA #$66 : STA $5D PLP JSL $88DDD0 LDA #$0009 : STA $07EB RTS } layout_asm_magnetstairs: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_MAGNET_STAIRS : BEQ layout_asm_magnetstairs_done ; Modify graphics to indicate magnet stairs removed %a8() LDA #$47 : STA $7F01F8 : STA $7F02EA ; Convert solid tiles to slope tiles LDA #$10 : STA $7F01F9 : STA $7F02EB LDA #$53 : STA $7F64FD : STA $7F6576 } layout_asm_magnetstairs_done: PLP RTS layout_asm_greenhillzone: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_magnetstairs_done ; Remove gate and corner tile next to gate LDA #$00FF : STA $7F37C8 : STA $7F37CA : STA $7F37CC STA $7F38CA : STA $7F39CA : STA $7F3ACA : STA $7F3BCA ; Clear gate PLMs and projectiles LDA #$0000 : STA $1C83 : STA $1C85 : STA $19B9 ; Add platform for ease of access to top-right door %a8() LDA #$6A : STA $7F0F24 : LDA #$6C : STA $7F0F26 LDA #$81 : STA $7F0F25 : STA $7F0F27 ; Move corner tiles next to gate up one LDA #$78 : STA $7F36CA : LDA #$79 : STA $7F36CC ; Normal BTS for gate tiles LDA #$00 : STA $7F7FE5 : STA $7F7FE6 STA $7F8066 : STA $7F80E6 : STA $7F8166 : STA $7F81E6 } layout_asm_greenhillzone_done: PLP RTS layout_asm_caterpillar_no_scrolls: PHP BRA layout_asm_caterpillar_after_scrolls layout_asm_caterpillar_update_scrolls: STA $7ECD26 layout_asm_caterpillar_after_scrolls: { %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_greenhillzone_done ; Decorate gap with blocks LDA #$8562 : STA $7F145E : STA $7F1460 : STA $7F151E : STA $7F1520 ; Fix wall decoration below blocks LDA #$8543 : STA $7F157E : LDA #$8522 : STA $7F1580 ; Create visible gap in wall LDA #$00FF : STA $7F14BE : STA $7F14C0 ; Remove gate and block next to gate STA $7F142C : STA $7F142E : STA $7F1430 STA $7F148E : STA $7F14EE : STA $7F154E : STA $7F15AE ; Clear gate PLMs and projectiles LDA #$0000 : STA $1C7B : STA $1C7D : STA $19B9 ; Normal BTS for gate tiles %a8() LDA #$00 : STA $7F6E17 : STA $7F6E18 : STA $7F6E19 STA $7F6E48 : STA $7F6E78 : STA $7F6EA8 : STA $7F6ED8 } layout_asm_caterpillar_done: PLP RTS layout_asm_singlechamber: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_caterpillar_done ; Move right wall back one to create a ledge LDA #$810C : STA $7F06E0 : STA $7F0A9E LDA #$8507 : STA $7F07A0 : STA $7F0920 LDA #$8505 : STA $7F0860 : STA $7F09E0 ; Clear out the ledge LDA #$00FF : STA $7F06DE : STA $7F079E STA $7F085E : STA $7F091E : STA $7F09DE ; Remove crumble blocks from vertical shaft STA $7F05E0 : STA $7F05E2 STA $7F06A0 : STA $7F06A2 : STA $7F0760 : STA $7F0762 ; Remove blocks from horizontal shaft STA $7F061E : STA $7F0620 : STA $7F0624 ; Careful with the block that is also a scroll block LDA #$30FF : STA $7F0622 ; Normal BTS for crumble blocks %a8() LDA #$00 : STA $7F66F1 : STA $7F66F2 STA $7F6751 : STA $7F6752 : STA $7F67B1 : STA $7F67B2 } layout_asm_singlechamber_done: PLP RTS layout_asm_crabtunnel: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_singlechamber_done ; Replace top of gate with slope tiles LDA #$1D87 : STA $7F039C : LDA #$1194 : STA $7F039E ; Fix tiles to the right of the gate LDA #$89A0 : STA $7F03A0 : LDA #$811D : STA $7F0320 ; Remove remaining gate tiles LDA #$00FF : STA $7F041E : STA $7F049E : STA $7F051E : STA $7F059E ; Clear gate PLMs and projectiles LDA #$0000 : STA $1C83 : STA $1C85 : STA $19B9 ; Slope BTS for top of the gate tiles %a8() LDA #$D2 : STA $7F65CF : LDA #$92 : STA $7F65D0 ; Normal BTS for remaining gate tiles LDA #$00 : STA $7F6610 : STA $7F6650 : STA $7F6690 : STA $7F66D0 } layout_asm_crabtunnel_done: PLP RTS layout_asm_easttunnel_no_scrolls: PHP layout_asm_easttunnel_after_scrolls: { %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_crabtunnel_done ; Clear gate PLMs and projectiles LDA #$0000 : STA $1C7B : STA $1C7D : STA $19B9 ; Remove gate tiles LDA #$00FF : STA $7F02AE : STA $7F02B0 STA $7F032E : STA $7F03AE : STA $7F042E : STA $7F04AE ; Remove blocks from vertical shaft STA $7F078C : STA $7F088C : STA $7F090C STA $7F098C : STA $7F0A0C : STA $7F0A8C ; Careful with the block that is also a scroll block LDA #$30FF : STA $7F080C ; Normal BTS for gate tiles %a8() LDA #$00 : STA $7F6558 : STA $7F6559 STA $7F6598 : STA $7F65D8 : STA $7F6618 : STA $7F6658 ; Decorate vertical shaft LDA #$22 : STA $7F070A : STA $7F070E STA $7F078A : STA $7F078E : STA $7F080A : STA $7F080E STA $7F088A : STA $7F088E : STA $7F090A : STA $7F090E STA $7F098A : STA $7F098E : STA $7F0A0A : STA $7F0A0E LDA #$85 : STA $7F078B : STA $7F080B : STA $7F088B STA $7F090B : STA $7F098B : STA $7F0A0B STA $7F0A8A : STA $7F0A8E LDA #$8D : STA $7F0A8B } layout_asm_easttunnel_done: PLP RTS layout_asm_eastocean: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_easttunnel_done ; Add platforms for ease of access to right door LDA #$8100 : STA $7F4506 : STA $7F4876 INC : STA $7F4508 : STA $7F4878 LDA #$8501 : STA $7F450A : STA $7F487A DEC : STA $7F450C : STA $7F487C LDA #$1120 : STA $7F45E6 : STA $7F4956 INC : STA $7F45E8 : STA $7F4958 LDA #$1521 : STA $7F45EA : STA $7F495A DEC : STA $7F45EC : STA $7F495C ; Slope BTS for platform bottoms %a8() LDA #$94 : STA $7F86F4 : STA $7F88AC INC : STA $7F86F5 : STA $7F88AD LDA #$D5 : STA $7F86F6 : STA $7F88AE DEC : STA $7F86F7 : STA $7F88AF } layout_asm_eastocean_done: PLP RTS layout_asm_crabshaft_no_scrolls: PHP BRA layout_asm_crabshaft_after_scrolls layout_asm_crabshaft_update_scrolls: STA $7ECD26 layout_asm_crabshaft_after_scrolls: { %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_eastocean_done ; Clear space above save station LDA #$00FF : STA $7F095C : STA $7F095E ; Add save station PLM %ai16() PHX : LDX #layout_asm_crabshaft_plm_data JSL $84846A : PLX } layout_asm_crabshaft_done: PLP RTS layout_asm_crabshaft_plm_data: db #$6F, #$B7, #$0D, #$29, #$09, #$00 layout_asm_mainstreet: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_crabshaft_done ; Add save station PLM %ai16() PHX : LDX #layout_asm_mainstreet_plm_data JSL $84846A : PLX } layout_asm_mainstreet_done: PLP RTS layout_asm_mainstreet_plm_data: db #$6F, #$B7, #$18, #$59, #$0A, #$00 layout_asm_aqueductfarmsandpit_door_list: dw #$A7D4, #$A534 layout_asm_aqueductfarmsandpit_external: { ; Place door BTS %a8() LDA #$40 : STA $7F65C0 : LDA #$FF : STA $7F6600 DEC : STA $7F6640 : DEC : STA $7F6680 : LDA #$01 STA $7F65C1 : STA $7F6601 : STA $7F6641 : STA $7F6681 ; Move right wall one to the left %a16() LDA #$8A09 : STA $7F01FE : LDA #$820E : STA $7F067E LDA #$820A : STA $7F027E : STA $7F05FE LDA #$8A0B : STA $7F02FE : LDA #$8A07 : STA $7F0300 LDA #$820B : STA $7F057E : LDA #$8207 : STA $7F0580 ; Fill in area behind the wall LDA #$8210 : STA $7F0200 : STA $7F0280 : STA $7F0600 : STA $7F0680 ; Place the door LDA #$C00C : STA $7F037E : LDA #$9040 : STA $7F0380 LDA #$D02C : STA $7F03FE : LDA #$9060 : STA $7F0400 LDA #$D82C : STA $7F047E : LDA #$9860 : STA $7F0480 LDA #$D80C : STA $7F04FE : LDA #$9840 : STA $7F0500 RTL } layout_asm_westsandhall: { PHP %a16() LDA !sram_room_layout : BIT !ROOM_LAYOUT_AREA_RANDO : BEQ layout_asm_westsandhall_done ; Change left door BTS to previously unused door %a8() LDA #$02 : STA $7F6582 : STA $7F65C2 : STA $7F6602 : STA $7F6642 } layout_asm_westsandhall_done: PLP RTS print pc, " layout end"
alloy4fun_models/trashltl/models/13/zxsn5B4352rTkPKpn.als
Kaixi26/org.alloytools.alloy
0
3999
open main pred idzxsn5B4352rTkPKpn_prop14 { always all f:File | f in Trash implies f not in Protected' } pred __repair { idzxsn5B4352rTkPKpn_prop14 } check __repair { idzxsn5B4352rTkPKpn_prop14 <=> prop14o }
libsrc/_DEVELOPMENT/adt/ba_priority_queue/c/sdcc_iy/ba_priority_queue_destroy_fastcall.asm
meesokim/z88dk
0
242962
; void ba_priority_queue_destroy_fastcall(ba_priority_queue_t *q) SECTION code_adt_ba_priority_queue PUBLIC _ba_priority_queue_destroy_fastcall _ba_priority_queue_destroy_fastcall: INCLUDE "adt/ba_priority_queue/z80/asm_ba_priority_queue_destroy.asm"
src/util/spat-log.adb
HeisenbugLtd/spat
20
10764
<gh_stars>10-100 ------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (<EMAIL>) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. ------------------------------------------------------------------------------ pragma License (Unrestricted); with Ada.Text_IO; with GNAT.Traceback.Symbolic; with GNATCOLL.Opt_Parse; with SPAT.Command_Line; package body SPAT.Log is -- Verbose option (debug output). package Verbose is new GNATCOLL.Opt_Parse.Parse_Flag (Parser => SPAT.Command_Line.Parser, Short => "-v", Long => "--verbose", Help => "Verbose (tracing) output"); --------------------------------------------------------------------------- -- Debug --------------------------------------------------------------------------- procedure Debug (Message : in String; New_Line : in Boolean := True) is begin if Verbose.Get then Log.Message (Message => "Debug: " & Message, New_Line => New_Line); end if; end Debug; --------------------------------------------------------------------------- -- Debug_Enabled -- -- Returns True if Debug would output something. --------------------------------------------------------------------------- function Debug_Enabled return Boolean is (Verbose.Get); --------------------------------------------------------------------------- -- Dump_Exception --------------------------------------------------------------------------- procedure Dump_Exception (E : in Ada.Exceptions.Exception_Occurrence; Message : in String; File : in String := "") is begin Error (Message => Message); Error (Message => "Please file a bug report."); if File'Length > 0 then Error (Message => "If possible, include the file "); Error (Message => """" & File & """"); Error (Message => "and the following stack trace in your report."); else Error (Message => "Please include the following stack trace in your report."); end if; Error (Message => Ada.Exceptions.Exception_Information (X => E)); -- This only works, if the binder is invoked with the "-E" option. Error (Message => GNAT.Traceback.Symbolic.Symbolic_Traceback (E => E)); end Dump_Exception; --------------------------------------------------------------------------- -- Error --------------------------------------------------------------------------- procedure Error (Message : in String) is begin Ada.Text_IO.Put_Line (File => Ada.Text_IO.Standard_Error, Item => "Error: " & Message); end Error; --------------------------------------------------------------------------- -- Message --------------------------------------------------------------------------- procedure Message (Message : in String; New_Line : in Boolean := True) is begin Ada.Text_IO.Put (File => Ada.Text_IO.Standard_Output, Item => Message); if New_Line then Ada.Text_IO.New_Line (File => Ada.Text_IO.Standard_Output); end if; end Message; --------------------------------------------------------------------------- -- Warning --------------------------------------------------------------------------- procedure Warning (Message : in String) is begin Log.Message (Message => "Warning: " & Message); end Warning; end SPAT.Log;
oeis/127/A127213.asm
neoneye/loda-programs
11
26658
<reponame>neoneye/loda-programs ; A127213: a(n) = 6^n*Lucas(n), where Lucas = A000204. ; Submitted by <NAME> ; 6,108,864,9072,85536,839808,8118144,78941952,765904896,7437339648,72196614144,700923912192,6804621582336,66060990332928,641332318961664,6226189565755392,60445100877152256,586813429630107648,5696904209358127104,55306708722832637952,536928803873888403456,5212614337265305387008,50605122963051814846464,491284853919861883011072,4769493550189036632539136,46303216042249247583633408,449521064060300804273209344,4364042161882777738650058752,42367011277467495385735888896,411307585492584970905817448448 mov $1,$0 mov $0,6 pow $0,$1 seq $1,22112 ; Fibonacci sequence beginning 2, 6. mul $1,$0 mov $0,$1 div $0,2 mul $0,6
programs/oeis/056/A056533.asm
jmorken/loda
1
27088
<gh_stars>1-10 ; A056533: Even sieve: start with natural numbers, remove every 2nd term, remove every 4th term from what remains, remove every 6th term from what remains, etc. ; 1,3,5,9,11,17,19,25,27,35,37,43,51,57,59,69,75,83,85,97,101,113,117,129,131,147,153,161,163,181,185,195,203,211,219,233,243,257,259,273,275,291,307,315,321,339,341,357,369,387,389,401,417,425,437,453,465 mov $2,$0 lpb $0 mul $0,2 mul $2,$0 sub $0,1 div $2,$0 sub $0,$2 add $0,$2 div $0,2 mov $1,$2 lpe div $1,2 mul $1,2 add $1,1
programs/oeis/064/A064761.asm
neoneye/loda
22
4163
<filename>programs/oeis/064/A064761.asm ; A064761: a(n) = 15*n^2. ; 0,15,60,135,240,375,540,735,960,1215,1500,1815,2160,2535,2940,3375,3840,4335,4860,5415,6000,6615,7260,7935,8640,9375,10140,10935,11760,12615,13500,14415,15360,16335,17340,18375,19440,20535,21660,22815 pow $0,2 mul $0,15
tools-src/gnu/gcc/gcc/ada/i-c.adb
enfoTek/tomato.linksys.e2000.nvram-mod
80
30352
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I N T E R F A C E S . C -- -- -- -- 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. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body Interfaces.C is ----------------------- -- Is_Nul_Terminated -- ----------------------- -- Case of char_array function Is_Nul_Terminated (Item : char_array) return Boolean is begin for J in Item'Range loop if Item (J) = nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of wchar_array function Is_Nul_Terminated (Item : wchar_array) return Boolean is begin for J in Item'Range loop if Item (J) = wide_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; ------------ -- To_Ada -- ------------ -- Convert char to Character function To_Ada (Item : char) return Character is begin return Character'Val (char'Pos (Item)); end To_Ada; -- Convert char_array to String (function form) function To_Ada (Item : char_array; Trim_Nul : Boolean := True) return String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then raise Terminator_Error; elsif Item (From) = nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert char_array to String (procedure form) procedure To_Ada (Item : char_array; Target : out String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then raise Terminator_Error; elsif Item (From) = nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := Character (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; -- Convert wchar_t to Wide_Character function To_Ada (Item : wchar_t) return Wide_Character is begin return Wide_Character (Item); end To_Ada; -- Convert wchar_array to Wide_String (function form) function To_Ada (Item : wchar_array; Trim_Nul : Boolean := True) return Wide_String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then raise Terminator_Error; elsif Item (From) = wide_nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : Wide_String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert wchar_array to Wide_String (procedure form) procedure To_Ada (Item : wchar_array; Target : out Wide_String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then raise Terminator_Error; elsif Item (From) = wide_nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; ---------- -- To_C -- ---------- -- Convert Character to char function To_C (Item : Character) return char is begin return char'Val (Character'Pos (Item)); end To_C; -- Convert String to char_array (function form) function To_C (Item : String; Append_Nul : Boolean := True) return char_array is begin if Append_Nul then declare R : char_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := nul; return R; end; else -- Append_Nul is False -- A nasty case, if the string is null, we must return -- a null char_array. The lower bound of this array is -- required to be zero (RM B.3(50)) but that is of course -- impossible given that size_t is unsigned. This needs -- ARG resolution, but for now GNAT returns bounds 1 .. 0 if Item'Length = 0 then declare R : char_array (1 .. 0); begin return R; end; else declare R : char_array (0 .. Item'Length - 1); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; return R; end; end if; end if; end To_C; -- Convert String to char_array (procedure form) procedure To_C (Item : String; Target : out char_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := char (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := nul; Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; -- Convert Wide_Character to wchar_t function To_C (Item : Wide_Character) return wchar_t is begin return wchar_t (Item); end To_C; -- Convert Wide_String to wchar_array (function form) function To_C (Item : Wide_String; Append_Nul : Boolean := True) return wchar_array is begin if Append_Nul then declare R : wchar_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := wide_nul; return R; end; else -- A nasty case, if the string is null, we must return -- a null char_array. The lower bound of this array is -- required to be zero (RM B.3(50)) but that is of course -- impossible given that size_t is unsigned. This needs -- ARG resolution, but for now GNAT returns bounds 1 .. 0 if Item'Length = 0 then declare R : wchar_array (1 .. 0); begin return R; end; else declare R : wchar_array (0 .. Item'Length - 1); begin for J in size_t range 0 .. Item'Length - 1 loop R (J) := To_C (Item (Integer (J) + Item'First)); end loop; return R; end; end if; end if; end To_C; -- Convert Wide_String to wchar_array (procedure form) procedure To_C (Item : Wide_String; Target : out wchar_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := wide_nul; Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; end Interfaces.C;
Task/Arrays/AppleScript/arrays-2.applescript
LaudateCorpus1/RosettaCodeData
1
3671
<gh_stars>1-10 set any to {1, "foo", 2.57, missing value, ints}
tools-src/gnu/gcc/gcc/ada/exp_pakd.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
30119
<gh_stars>10-100 ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ P A K D -- -- -- -- S p e c -- -- -- -- $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. -- -- -- ------------------------------------------------------------------------------ -- Expand routines for manipulation of packed arrays with Types; use Types; package Exp_Pakd is ------------------------------------- -- Implementation of Packed Arrays -- ------------------------------------- -- When a packed array (sub)type is frozen, we create a corresponding -- type that will be used to hold the bits of the packed value, and -- store the entity for this type in the Packed_Array_Type field of the -- E_Array_Type or E_Array_Subtype entity for the packed array. -- This packed array type has the name xxxPn, where xxx is the name -- of the packed type, and n is the component size. The expanded -- declaration declares a type that is one of the following: -- For an unconstrained array with component size 1,2,4 or any other -- odd component size. These are the cases in which we do not need -- to align the underlying array. -- type xxxPn is new Packed_Bytes1; -- For an unconstrained array with component size that is divisible -- by 2, but not divisible by 4 (other than 2 itself). These are the -- cases in which we can generate better code if the underlying array -- is 2-byte aligned (see System.Pack_14 in file s-pack14 for example). -- type xxxPn is new Packed_Bytes2; -- For an unconstrained array with component size that is divisible -- by 4, other than powers of 2 (which either come under the 1,2,4 -- exception above, or are not packed at all). These are cases where -- we can generate better code if the underlying array is 4-byte -- aligned (see System.Pack_20 in file s-pack20 for example). -- type xxxPn is new Packed_Bytes4; -- For a constrained array with a static index type where the number -- of bits does not exceed the size of Unsigned: -- type xxxPn is new Unsigned range 0 .. 2 ** nbits - 1; -- For a constrained array with a static index type where the number -- of bits is greater than the size of Unsigned, but does not exceed -- the size of Long_Long_Unsigned: -- type xxxPn is new Long_Long_Unsigned range 0 .. 2 ** nbits - 1; -- For all other constrained arrays, we use one of -- type xxxPn is new Packed_Bytes1 (0 .. m); -- type xxxPn is new Packed_Bytes2 (0 .. m); -- type xxxPn is new Packed_Bytes4 (0 .. m); -- where m is calculated (from the length of the original packed array) -- to hold the required number of bits, and the choice of the particular -- Packed_Bytes{1,2,4} type is made on the basis of alignment needs as -- described above for the unconstrained case. -- When a variable of packed array type is allocated, gigi will allocate -- the amount of space indicated by the corresponding packed array type. -- However, we do NOT attempt to rewrite the types of any references or -- to retype the variable itself, since this would cause all kinds of -- semantic problems in the front end (remember that expansion proceeds -- at the same time as analysis). -- For an indexed reference to a packed array, we simply convert the -- reference to the appropriate equivalent reference to the object -- of the packed array type (using unchecked conversion). -- In some cases (for internally generated types, and for the subtypes -- for record fields that depend on a discriminant), the corresponding -- packed type cannot be easily generated in advance. In these cases, -- we generate the required subtype on the fly at the reference point. -- For the modular case, any unused bits are initialized to zero, and -- all operations maintain these bits as zero (where necessary all -- unchecked conversions from corresponding array values require -- these bits to be clear, which is done automatically by gigi). -- For the array cases, there can be unused bits in the last byte, and -- these are neither initialized, nor treated specially in operations -- (i.e. it is allowable for these bits to be clobbered, e.g. by not). --------------------------- -- Endian Considerations -- --------------------------- -- The standard does not specify the way in which bits are numbered in -- a packed array. There are two reasonable rules for deciding this: -- Store the first bit at right end (low order) word. This means -- that the scaled subscript can be used directly as a right shift -- count (if we put bit 0 at the left end, then we need an extra -- subtract to compute the shift count. -- Layout the bits so that if the packed boolean array is overlaid on -- a record, using unchecked conversion, then bit 0 of the array is -- the same as the bit numbered bit 0 in a record representation -- clause applying to the record. For example: -- type Rec is record -- C : Bits4; -- D : Bits7; -- E : Bits5; -- end record; -- for Rec use record -- C at 0 range 0 .. 3; -- D at 0 range 4 .. 10; -- E at 0 range 11 .. 15; -- end record; -- type P16 is array (0 .. 15) of Boolean; -- pragma Pack (P16); -- Now if we use unchecked conversion to convert a value of the record -- type to the packed array type, according to this second criterion, -- we would expect field D to occupy bits 4..10 of the Boolean array. -- Although not required, this correspondence seems a highly desirable -- property, and is one that GNAT decides to guarantee. For a little -- endian machine, we can also meet the first requirement, but for a -- big endian machine, it will be necessary to store the first bit of -- a Boolean array in the left end (most significant) bit of the word. -- This may cost an extra instruction on some machines, but we consider -- that a worthwhile price to pay for the consistency. -- One more important point arises in the case where we have a constrained -- subtype of an unconstrained array. Take the case of 20-bits. For the -- unconstrained representation, we would use an array of bytes: -- Little-endian case -- 8-7-6-5-4-3-2-1 16-15-14-13-12-11-10-9 x-x-x-x-20-19-18-17 -- Big-endian case -- 1-2-3-4-5-6-7-8 9-10-11-12-13-14-15-16 17-18-19-20-x-x-x-x -- For the constrained case, we use a 20-bit modular value, but in -- general this value may well be stored in 32 bits. Let's look at -- what it looks like: -- Little-endian case -- x-x-x-x-x-x-x-x-x-x-x-x-20-19-18-17-...-10-9-8-7-6-5-4-3-2-1 -- which stored in memory looks like -- 8-7-...-2-1 16-15-...-10-9 x-x-x-x-20-19-18-17 x-x-x-x-x-x-x -- An important rule is that the constrained and unconstrained cases -- must have the same bit representation in memory, since we will often -- convert from one to the other (e.g. when calling a procedure whose -- formal is unconstrained). As we see, that criterion is met for the -- little-endian case above. Now let's look at the big-endian case: -- Big-endian case -- x-x-x-x-x-x-x-x-x-x-x-x-1-2-3-4-5-6-7-8-9-10-...-17-18-19-20 -- which stored in memory looks like -- x-x-x-x-x-x-x-x x-x-x-x-1-2-3-4 5-6-...11-12 13-14-...-19-20 -- That won't do, the representation value in memory is NOT the same in -- the constrained and unconstrained case. The solution is to store the -- modular value left-justified: -- 1-2-3-4-5-6-7-8-9-10-...-17-18-19-20-x-x-x-x-x-x-x-x-x-x-x -- which stored in memory looks like -- 1-2-...-7-8 9-10-...15-16 17-18-19-20-x-x-x-x x-x-x-x-x-x-x-x -- and now, we do indeed have the same representation. The special flag -- Is_Left_Justified_Modular is set in the modular type used as the -- packed array type in the big-endian case to ensure that this required -- left justification occurs. ----------------- -- Subprograms -- ----------------- procedure Create_Packed_Array_Type (Typ : Entity_Id); -- Typ is a array type or subtype to which pragma Pack applies. If the -- Packed_Array_Type field of Typ is already set, then the call has no -- effect, otherwise a suitable type or subtype is created and stored -- in the Packed_Array_Type field of Typ. This created type is an Itype -- so that Gigi will simply elaborate and freeze the type on first use -- (which is typically the definition of the corresponding array type). -- -- Note: although this routine is included in the expander package for -- packed types, it is actually called unconditionally from Freeze, -- whether or not expansion (and code generation) is enabled. We do this -- since we want gigi to be able to properly compute type charactersitics -- (for the Data Decomposition Annex of ASIS, and possible other future -- uses) even if code generation is not active. Strictly this means that -- this procedure is not part of the expander, but it seems appropriate -- to keep it together with the other expansion routines that have to do -- with packed array types. procedure Expand_Packed_Boolean_Operator (N : Node_Id); -- N is an N_Op_And, N_Op_Or or N_Op_Xor node whose operand type is a -- packed boolean array. This routine expands the appropriate operations -- to carry out the logical operation on the packed arrays. It handles -- both the modular and array representation cases. procedure Expand_Packed_Element_Reference (N : Node_Id); -- N is an N_Indexed_Component node whose prefix is a packed array. In -- the bit packed case, this routine can only be used for the expression -- evaluation case not the assignment case, since the result is not a -- variable. See Expand_Bit_Packed_Element_Set for how he assignment case -- is handled in the bit packed case. For the enumeration case, the result -- of this call is always a variable, so the call can be used for both the -- expression evaluation and assignment cases. procedure Expand_Bit_Packed_Element_Set (N : Node_Id); -- N is an N_Assignment_Statement node whose name is an indexed -- component of a bit-packed array. This procedure rewrites the entire -- assignment statement with appropriate code to set the referenced -- bits of the packed array type object. Note that this procedure is -- used only for the bit-packed case, not for the enumeration case. procedure Expand_Packed_Eq (N : Node_Id); -- N is an N_Op_Eq node where the operands are packed arrays whose -- representation is an array-of-bytes type (the case where a modular -- type is used for the representation does not require any special -- handling, because in the modular case, unused bits are zeroes. procedure Expand_Packed_Not (N : Node_Id); -- N is an N_Op_Not node where the operand is packed array of Boolean -- in standard representation (i.e. component size is one bit). This -- procedure expands the corresponding not operation. Note that the -- non-standard representation case is handled by using a loop through -- elements generated by the normal non-packed circuitry. function Involves_Packed_Array_Reference (N : Node_Id) return Boolean; -- N is the node for a name. This function returns true if the name -- involves a packed array reference. A node involves a packed array -- reference if it is itself an indexed compoment referring to a bit- -- packed array, or it is a selected component whose prefix involves -- a packed array reference. procedure Expand_Packed_Address_Reference (N : Node_Id); -- The node N is an attribute reference for the 'Address reference, where -- the prefix involves a packed array reference. This routine expands the -- necessary code for performing the address reference in this case. end Exp_Pakd;
etc/launch.scpt
jason-conway/parcel
0
3959
<filename>etc/launch.scpt<gh_stars>0 #!/usr/bin/osascript on run argv tell application "Terminal" do script "cd ~/Documents/Github/parcel/build && ./parcel -a localhost -u " & (item 1 of argv) end tell end run
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_21829_407.asm
ljhsiun2/medusa
9
14274
<filename>Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_21829_407.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x83f6, %r15 nop nop nop xor $25021, %rdi mov $0x6162636465666768, %r8 movq %r8, (%r15) nop nop nop xor %rsi, %rsi lea addresses_WC_ht+0xa680, %r10 clflush (%r10) cmp %rax, %rax mov (%r10), %edx nop nop sub %rax, %rax lea addresses_WC_ht+0x7280, %rsi lea addresses_WC_ht+0x1c1d6, %rdi nop nop dec %r8 mov $92, %rcx rep movsb nop nop nop add %r15, %r15 lea addresses_normal_ht+0x148cd, %rax cmp %rdx, %rdx mov (%rax), %r10d nop nop nop inc %rsi lea addresses_normal_ht+0xdbd4, %r10 sub %rsi, %rsi movw $0x6162, (%r10) nop nop cmp %rax, %rax lea addresses_A_ht+0x1e530, %r8 clflush (%r8) nop nop nop mfence vmovups (%r8), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %rax dec %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %r8 push %r9 push %rbp // Store lea addresses_UC+0xeb80, %r13 add %r10, %r10 mov $0x5152535455565758, %r11 movq %r11, %xmm5 movups %xmm5, (%r13) nop nop nop nop nop sub $59629, %r9 // Store lea addresses_WT+0x12b80, %r8 nop and %r15, %r15 mov $0x5152535455565758, %r13 movq %r13, (%r8) sub %r8, %r8 // Faulty Load lea addresses_WT+0x12b80, %r13 nop add %r8, %r8 mov (%r13), %r10w lea oracles, %r8 and $0xff, %r10 shlq $12, %r10 mov (%r8,%r10,1), %r10 pop %rbp pop %r9 pop %r8 pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT', 'same': True, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': True, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': True, 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 4}} {'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 */
Formalization/ClassicalPropositionalLogic/NaturalDeduction.agda
Lolirofle/stuff-in-agda
6
3046
<filename>Formalization/ClassicalPropositionalLogic/NaturalDeduction.agda module Formalization.ClassicalPropositionalLogic.NaturalDeduction where open import Data.Either as Either using (Left ; Right) open import Formalization.ClassicalPropositionalLogic.Syntax open import Functional import Lvl import Logic.Propositional as Meta open import Logic open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Sets.PredicateSet using (PredSet ; _∈_ ; _∉_ ; _∪_ ; _∪•_ ; _∖_ ; _⊆_ ; _⊇_ ; ∅ ; [≡]-to-[⊆] ; [≡]-to-[⊇]) renaming (•_ to singleton ; _≡_ to _≡ₛ_) open import Type private variable ℓₚ ℓ ℓ₁ ℓ₂ : Lvl.Level data _⊢_ {ℓ ℓₚ} {P : Type{ℓₚ}} : Formulas(P){ℓ} → Formula(P) → Stmt{Lvl.𝐒(ℓₚ Lvl.⊔ ℓ)} where direct : ∀{Γ} → (Γ ⊆ (Γ ⊢_)) [⊤]-intro : ∀{Γ} → (Γ ⊢ ⊤) [⊥]-intro : ∀{Γ}{φ} → (Γ ⊢ φ) → (Γ ⊢ (¬ φ)) → (Γ ⊢ ⊥) [⊥]-elim : ∀{Γ}{φ} → (Γ ⊢ ⊥) → (Γ ⊢ φ) [¬]-intro : ∀{Γ}{φ} → ((Γ ∪ singleton(φ)) ⊢ ⊥) → (Γ ⊢ (¬ φ)) [¬]-elim : ∀{Γ}{φ} → ((Γ ∪ singleton(¬ φ)) ⊢ ⊥) → (Γ ⊢ φ) [∧]-intro : ∀{Γ}{φ ψ} → (Γ ⊢ φ) → (Γ ⊢ ψ) → (Γ ⊢ (φ ∧ ψ)) [∧]-elimₗ : ∀{Γ}{φ ψ} → (Γ ⊢ (φ ∧ ψ)) → (Γ ⊢ φ) [∧]-elimᵣ : ∀{Γ}{φ ψ} → (Γ ⊢ (φ ∧ ψ)) → (Γ ⊢ ψ) [∨]-introₗ : ∀{Γ}{φ ψ} → (Γ ⊢ φ) → (Γ ⊢ (φ ∨ ψ)) [∨]-introᵣ : ∀{Γ}{φ ψ} → (Γ ⊢ ψ) → (Γ ⊢ (φ ∨ ψ)) [∨]-elim : ∀{Γ}{φ ψ χ} → ((Γ ∪ singleton(φ)) ⊢ χ) → ((Γ ∪ singleton(ψ)) ⊢ χ) → (Γ ⊢ (φ ∨ ψ)) → (Γ ⊢ χ) [⟶]-intro : ∀{Γ}{φ ψ} → ((Γ ∪ singleton(φ)) ⊢ ψ) → (Γ ⊢ (φ ⟶ ψ)) [⟶]-elim : ∀{Γ}{φ ψ} → (Γ ⊢ φ) → (Γ ⊢ (φ ⟶ ψ)) → (Γ ⊢ ψ) [⟷]-intro : ∀{Γ}{φ ψ} → ((Γ ∪ singleton(ψ)) ⊢ φ) → ((Γ ∪ singleton(φ)) ⊢ ψ) → (Γ ⊢ (φ ⟷ ψ)) [⟷]-elimₗ : ∀{Γ}{φ ψ} → (Γ ⊢ ψ) → (Γ ⊢ (φ ⟷ ψ)) → (Γ ⊢ φ) [⟷]-elimᵣ : ∀{Γ}{φ ψ} → (Γ ⊢ φ) → (Γ ⊢ (φ ⟷ ψ)) → (Γ ⊢ ψ) module _ where private variable P : Type{ℓₚ} private variable Γ Γ₁ Γ₂ : Formulas(P){ℓ} private variable φ ψ : Formula(P) _⊬_ : Formulas(P){ℓ} → Formula(P) → Stmt _⊬_ = Meta.¬_ ∘₂ (_⊢_) weaken-union-singleton : (Γ₁ ⊆ Γ₂) → (((Γ₁ ∪ singleton(φ)) ⊢_) ⊆ ((Γ₂ ∪ singleton(φ)) ⊢_)) weaken : (Γ₁ ⊆ Γ₂) → ((Γ₁ ⊢_) ⊆ (Γ₂ ⊢_)) weaken Γ₁Γ₂ {φ} (direct p) = direct (Γ₁Γ₂ p) weaken Γ₁Γ₂ {.⊤} [⊤]-intro = [⊤]-intro weaken Γ₁Γ₂ {.⊥} ([⊥]-intro p q) = [⊥]-intro (weaken Γ₁Γ₂ p) (weaken Γ₁Γ₂ q) weaken Γ₁Γ₂ {φ} ([⊥]-elim p) = [⊥]-elim (weaken Γ₁Γ₂ p) weaken Γ₁Γ₂ {.(¬ _)} ([¬]-intro p) = [¬]-intro (weaken-union-singleton Γ₁Γ₂ p) weaken Γ₁Γ₂ {φ} ([¬]-elim p) = [¬]-elim (weaken-union-singleton Γ₁Γ₂ p) weaken Γ₁Γ₂ {.(_ ∧ _)} ([∧]-intro p q) = [∧]-intro (weaken Γ₁Γ₂ p) (weaken Γ₁Γ₂ q) weaken Γ₁Γ₂ {φ} ([∧]-elimₗ p) = [∧]-elimₗ (weaken Γ₁Γ₂ p) weaken Γ₁Γ₂ {φ} ([∧]-elimᵣ p) = [∧]-elimᵣ (weaken Γ₁Γ₂ p) weaken Γ₁Γ₂ {.(_ ∨ _)} ([∨]-introₗ p) = [∨]-introₗ (weaken Γ₁Γ₂ p) weaken Γ₁Γ₂ {.(_ ∨ _)} ([∨]-introᵣ p) = [∨]-introᵣ (weaken Γ₁Γ₂ p) weaken Γ₁Γ₂ {φ} ([∨]-elim p q r) = [∨]-elim (weaken-union-singleton Γ₁Γ₂ p) (weaken-union-singleton Γ₁Γ₂ q) (weaken Γ₁Γ₂ r) weaken Γ₁Γ₂ {.(_ ⟶ _)} ([⟶]-intro p) = [⟶]-intro (weaken-union-singleton Γ₁Γ₂ p) weaken Γ₁Γ₂ {φ} ([⟶]-elim p q) = [⟶]-elim (weaken Γ₁Γ₂ p) (weaken Γ₁Γ₂ q) weaken Γ₁Γ₂ {.(_ ⟷ _)} ([⟷]-intro p q) = [⟷]-intro (weaken-union-singleton Γ₁Γ₂ p) (weaken-union-singleton Γ₁Γ₂ q) weaken Γ₁Γ₂ {φ} ([⟷]-elimₗ p q) = [⟷]-elimₗ (weaken Γ₁Γ₂ p) (weaken Γ₁Γ₂ q) weaken Γ₁Γ₂ {φ} ([⟷]-elimᵣ p q) = [⟷]-elimᵣ (weaken Γ₁Γ₂ p) (weaken Γ₁Γ₂ q) weaken-union-singleton Γ₁Γ₂ p = weaken (Either.mapLeft Γ₁Γ₂) p weaken-union : (Γ₁ ⊢_) ⊆ ((Γ₁ ∪ Γ₂) ⊢_) weaken-union = weaken Either.Left [⟵]-intro : ((Γ ∪ singleton(φ)) ⊢ ψ) → (Γ ⊢ (ψ ⟵ φ)) [⟵]-intro = [⟶]-intro [⟵]-elim : (Γ ⊢ φ) → (Γ ⊢ (ψ ⟵ φ)) → (Γ ⊢ ψ) [⟵]-elim = [⟶]-elim [¬¬]-elim : (Γ ⊢ ¬(¬ φ)) → (Γ ⊢ φ) [¬¬]-elim nnφ = ([¬]-elim ([⊥]-intro (direct(Right [≡]-intro)) (weaken-union nnφ) ) ) [¬¬]-intro : (Γ ⊢ φ) → (Γ ⊢ ¬(¬ φ)) [¬¬]-intro Γφ = ([¬]-intro ([⊥]-intro (weaken-union Γφ) (direct (Right [≡]-intro)) ) )
programs/oeis/178/A178069.asm
neoneye/loda
22
86309
<reponame>neoneye/loda ; A178069: a(n) = 12345679 * A001651(n). ; 12345679,24691358,49382716,61728395,86419753,98765432,123456790,135802469,160493827,172839506,197530864,209876543,234567901,246913580,271604938,283950617,308641975,320987654,345679012,358024691,382716049 mul $0,6 div $0,4 mul $0,12345679 add $0,12345679
data/jpred4/jp_batch_1613899824__fjBJypE/jp_batch_1613899824__fjBJypE.als
jonriege/predict-protein-structure
0
153
<filename>data/jpred4/jp_batch_1613899824__fjBJypE/jp_batch_1613899824__fjBJypE.als SILENT_MODE BLOCK_FILE jp_batch_1613899824__fjBJypE.concise.blc MAX_NSEQ 445 MAX_INPUT_LEN 447 OUTPUT_FILE jp_batch_1613899824__fjBJypE.concise.ps PORTRAIT POINTSIZE 8 IDENT_WIDTH 12 X_OFFSET 2 Y_OFFSET 2 DEFINE_FONT 0 Helvetica DEFAULT DEFINE_FONT 1 Helvetica REL 0.75 DEFINE_FONT 7 Helvetica REL 0.6 DEFINE_FONT 3 Helvetica-Bold DEFAULT DEFINE_FONT 4 Times-Bold DEFAULT DEFINE_FONT 5 Helvetica-BoldOblique DEFAULT # DEFINE_COLOUR 3 1 0.62 0.67 # Turquiose DEFINE_COLOUR 4 1 1 0 # Yellow DEFINE_COLOUR 5 1 0 0 # Red DEFINE_COLOUR 7 1 0 1 # Purple DEFINE_COLOUR 8 0 0 1 # Blue DEFINE_COLOUR 9 0 1 0 # Green DEFINE_COLOUR 10 0.41 0.64 1.00 # Pale blue DEFINE_COLOUR 11 0.41 0.82 0.67 # Pale green DEFINE_COLOUR 50 0.69 0.18 0.37 # Pink (helix) DEFINE_COLOUR 51 1.00 0.89 0.00 # Gold (strand) NUMBER_INT 10 SETUP # # Highlight specific residues. # Avoid highlighting Lupas 'C' predictions by # limiting the highlighting to the alignments Scol_CHARS C 1 1 118 434 4 Ccol_CHARS H ALL 5 Ccol_CHARS P ALL 8 SURROUND_CHARS LIV ALL # # Replace known structure types with whitespace SUB_CHARS 1 435 118 444 H SPACE SUB_CHARS 1 435 118 444 E SPACE SUB_CHARS 1 435 118 444 - SPACE STRAND 7 438 11 COLOUR_TEXT_REGION 7 438 11 438 51 STRAND 17 438 17 COLOUR_TEXT_REGION 17 438 17 438 51 STRAND 32 438 34 COLOUR_TEXT_REGION 32 438 34 438 51 STRAND 45 438 46 COLOUR_TEXT_REGION 45 438 46 438 51 HELIX 36 438 39 COLOUR_TEXT_REGION 36 438 39 438 50 HELIX 82 438 101 COLOUR_TEXT_REGION 82 438 101 438 50 STRAND 8 443 10 COLOUR_TEXT_REGION 8 443 10 443 51 STRAND 32 443 34 COLOUR_TEXT_REGION 32 443 34 443 51 HELIX 36 443 39 COLOUR_TEXT_REGION 36 443 39 443 50 HELIX 83 443 101 COLOUR_TEXT_REGION 83 443 101 443 50 STRAND 7 444 12 COLOUR_TEXT_REGION 7 444 12 444 51 STRAND 17 444 18 COLOUR_TEXT_REGION 17 444 18 444 51 STRAND 32 444 34 COLOUR_TEXT_REGION 32 444 34 444 51 STRAND 44 444 47 COLOUR_TEXT_REGION 44 444 47 444 51 HELIX 37 444 38 COLOUR_TEXT_REGION 37 444 38 444 50 HELIX 82 444 101 COLOUR_TEXT_REGION 82 444 101 444 50
programs/oeis/047/A047559.asm
karttu/loda
0
101406
<reponame>karttu/loda ; A047559: Numbers that are congruent to {0, 1, 3, 6, 7} mod 8. ; 0,1,3,6,7,8,9,11,14,15,16,17,19,22,23,24,25,27,30,31,32,33,35,38,39,40,41,43,46,47,48,49,51,54,55,56,57,59,62,63,64,65,67,70,71,72,73,75,78,79,80,81,83,86,87,88,89,91,94,95,96,97,99,102,103,104 mov $2,$0 mov $3,$0 lpb $2,1 mov $0,$2 lpb $4,1 sub $2,3 add $3,3 mov $0,$3 sub $1,$1 sub $4,$3 lpe trn $2,1 add $4,$1 add $1,$0 lpe
gfx/pokemon/jigglypuff/anim.asm
Dev727/ancientplatinum
28
26261
frame 1, 14 frame 2, 09 frame 3, 09 frame 2, 06 frame 4, 20 setrepeat 2 frame 3, 05 frame 4, 05 dorepeat 6 endanim
src/regex-regular_expressions.ads
skordal/ada-regex
2
1523
<reponame>skordal/ada-regex<filename>src/regex-regular_expressions.ads<gh_stars>1-10 -- Ada regular expression library -- (c) <NAME> 2020 <<EMAIL>> -- Report bugs and issues on <https://github.com/skordal/ada-regex> with Regex.Syntax_Trees; with Regex.State_Machines; private with Ada.Finalization; package Regex.Regular_Expressions is -- Regex engine exceptions: Syntax_Error : exception; Unsupported_Feature : exception; -- Regular expression object: type Regular_Expression is tagged limited private; -- Creates a regular expression object from a regular expression string: function Create (Input : in String) return Regular_Expression; -- Creates a regular expression object from an existing syntax tree: function Create (Input : in Regex.Syntax_Trees.Syntax_Tree_Node_Access) return Regular_Expression; -- Gets the syntax tree of a regular expression: function Get_Syntax_Tree (This : in Regular_Expression) return Regex.Syntax_Trees.Syntax_Tree_Node_Access with Inline; -- Gets the state machine generated by a regular expression: function Get_State_Machine (This : in Regular_Expression) return Regex.State_Machines.State_Machine_State_Vectors.Vector with Inline; -- Gets the start state of a regular expression: function Get_Start_State (This : in Regular_Expression) return Regex.State_Machines.State_Machine_State_Access with Inline; private use Regex.State_Machines; use Regex.Syntax_Trees; -- Complete regular expression object type: type Regular_Expression is new Ada.Finalization.Limited_Controlled with record Syntax_Tree : Syntax_Tree_Node_Access := null; -- Syntax tree kept around for debugging Syntax_Tree_Node_Count : Natural := 1; -- Counter used to number nodes and keep count State_Machine_States : State_Machine_State_Vectors.Vector := State_Machine_State_Vectors.Empty_Vector; Start_State : State_Machine_State_Access; end record; -- Frees a regular expression object: overriding procedure Finalize (This : in out Regular_Expression); -- Gets the next node ID: function Get_Next_Node_Id (This : in out Regular_Expression) return Natural with Inline; -- Parses a regular expression and constructs a syntax tree: procedure Parse (Input : in String; Output : in out Regular_Expression); -- Compiles a regular expression into a state machine: procedure Compile (Output : in out Regular_Expression); end Regex.Regular_Expressions;
programs/oeis/032/A032965.asm
karttu/loda
0
89424
<filename>programs/oeis/032/A032965.asm ; A032965: Numbers whose base-15 representation Sum_{i=0..m} d(i)*15^(m-i) has even d(i) for all odd i. ; 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,21,23,25,27,29,30,32,34,36,38,40,42,44,45,47,49,51,53,55,57,59,60,62,64,66,68,70,72,74,75,77,79,81,83,85,87,89,90,92,94,96,98,100,102,104 mov $1,4 mov $2,$0 trn $0,13 add $1,$2 add $1,$0 lpb $0,1 sub $0,6 trn $0,2 sub $1,1 lpe sub $1,3
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_5_717.asm
ljhsiun2/medusa
9
8056
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %r9 push %rbp push %rdi push %rdx push %rsi lea addresses_WT_ht+0x135f8, %rdx nop nop nop nop and %rbp, %rbp movw $0x6162, (%rdx) nop nop add $441, %rsi lea addresses_D_ht+0xbaf8, %r9 nop and %r13, %r13 movb $0x61, (%r9) nop nop nop nop inc %rbp lea addresses_WT_ht+0x1b6b2, %rsi nop nop nop nop and $53332, %rdi mov $0x6162636465666768, %r13 movq %r13, (%rsi) nop nop nop add $37567, %rdi pop %rsi pop %rdx pop %rdi pop %rbp pop %r9 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r15 push %r9 push %rbp push %rbx // Store lea addresses_RW+0x1baf8, %rbp nop nop nop nop sub $2052, %r12 mov $0x5152535455565758, %r14 movq %r14, %xmm4 movntdq %xmm4, (%rbp) nop nop nop nop cmp %r9, %r9 // Store lea addresses_US+0x1ee7a, %r9 and $37356, %rbp movb $0x51, (%r9) add $50290, %r12 // Store mov $0x66a7040000000998, %rbx nop and $23726, %r10 mov $0x5152535455565758, %r14 movq %r14, %xmm5 vmovups %ymm5, (%rbx) xor %r15, %r15 // Faulty Load lea addresses_A+0x19ef8, %rbx nop nop nop nop nop inc %r10 mov (%rbx), %r15w lea oracles, %rbp and $0xff, %r15 shlq $12, %r15 mov (%rbp,%r15,1), %r15 pop %rbx pop %rbp pop %r9 pop %r15 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_RW', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}} [Faulty Load] {'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 2}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}} {'00': 5} 00 00 00 00 00 */
SOURCE/base/Kernel/Native/arm/Crt/basic_d.asm
pmache/singularityrdk
3
2984
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Microsoft Research Singularity ;;; ;;; Copyright (c) Microsoft Corporation. All rights reserved. ;;; ;;; This file contains ARM-specific assembly code. ;;; ; basic_d.s ; ; Copyright (C) Advanced RISC Machines Limited, 1994. All rights reserved. ; ; RCS Revision: 1 ; Checkin Date: 2007/06/29 02:59:16 ; Revising Author ; Basic floating point functions ; ; ; Revisions: ; Fixed == and != compares to be IEEE-754 compliant when input QNaNs. ; No exceptions are raised when only QNaNs are the only NaNs input to ; == and !=. Moved NaN detection and exception raising here. ; Removed unnecessary macros for compares that return results in flags. ; Added WindowsCE SEH mechanism support. ; Renamed routines. ; ; Local storage size and offsets LOC_SIZE EQU 0x20 OrgOp2h EQU 0x1C OrgOp2l EQU 0x18 OrgOp1h EQU 0x14 OrgOp1l EQU 0x10 ExDResl EQU 0x08 ExOp2h EQU 0x04 ExOp2l EQU 0x00 NewResl EQU 0x10 GET fpe.asm GET kxarm.inc ;============================================================================== ; Compare ; ; BUGBUG: This documentation is not completely correct. For == and != ; comparisions, only SNANs can raise the invalid operation ; exception. For all other compares, both SNANs and QNANs ; can raise the invalid operation exception and return FALSE ; (they actually compare unordered). When == compares unordered ; (contains 1 or more NANs) it also returns FALSE. When != ; compares unordered, it returns TRUE. See IEEE-754-1985 for ; details. The described behavior is implemented here. ; ; ; ; This isn't as simple as it could be. The problem is that NaNs may cause an ; exception and always compare as FALSE if not signalling. Infinities need to ; be treated as normal numbers, although they look like NaNs. ; Furthermore +0 = -0 needs a special check. ; ; General comparison instruction flow: (this is less than) ; ; OP1 < 0 OR OP2 < 0 ; | ; +--------Y--------------+------------N-------------+ ; | | ; (OP1 OR OP2) NaN? (OP1 OR OP2) NaN? ; | | ; +----N---+---Y------+ +-----Y-------+----N-----+ ; | | | | ; RET OP1 < OP2 OP1 or OP2 inf/NaN? OP1 or OP2 inf/NaN? RET OP1 > OP2 ; | | AND NOT ; +---N--+---Y--+ +---Y--+--N----+ (OP1 = 0 AND OP2 = 0) ; | | | | ; RET OP1 < OP2 (OP1 NaN?) OR (OP2 NaN?) RET OP1 > OP2 ; | | | ; | +--N--+--Y--> exception | ; | | | ; | OP1 < 0 OR OP2 < 0? | ; | | | ; +-----N-------+------------Y-----------+ ; ; The first layer selects between the case where both operands are positive or ; when at least one is negative. The second layer uses a quick test on the ; operands orred together to determine whether they look like a NaN. This check is ; weak: it will get about 4% or 9% 'false hits' for doubles and floats, where ; none of the operands is a NaN. In general false hits occur for very large numbers, ; or for both numbers around 2.0 (one larger, one smaller). ; If the operands are not categorized a NaNs, a normal unsigned compare does the ; actual work. It returns immediately if the highwords of the operands are different. ; Note that the negative case uses a compare with the operands swapped, ; as the order is reversed for negative numbers. The negative case also checks for ; -0 == 0 as a special case. In the NaN code, a more precise check is done, which ; filters out NaNs and infinities, and the normal compare follows otherwise. ; The exception handler raises a Invalid Operation exception if one of the operands ; is a NaN (ignoring the signal bit). ; There are thus 3 different checks on NaNs, with increasing accuracy: ; 1. one of the operands looks like a NaN (but might not be one). ; 2. one of the operands is infinite or NaN. ; 3. one of the operands is a NaN. ; ; The compare routine can either be used as a boolean returning function (dgt, ; dge, dlt, dle) or as a flags returning function (returning < as LO, <= as LS, ; > as HI, >= as HS). ; ; The routine is optimised for the both operands positive which not look like ; NaNs case. It is also assumed the chance that the highwords of the operands are ; equal is less than 50%. Timing: ; Flags: 7/9 (pos), 11/13 (false NaN), 10/12 (neg), 13/15 (false NaN) SA1.1 cycles. ; EQ/NE/HI/HS/LO/LS: 10 / 14 / 13 / 16 ;============================================================================== MACRO CmpReturn $cc MOV a1, #0 MOV$cc a1, #1 ADD sp, sp, #LOC_SIZE IF Interworking :LOR: Thumbing LDMFD sp!, {lr} BX lr ELSE LDMFD sp!, {pc} ENDIF MEND MACRO $lab DoubleCompare $cc, $NaN_lab ASSERT "$cc"="LO":LOR:"$cc"="LS":LOR:"$cc"="HS":LOR:"$cc"="HI":LOR:"$cc"="EQ":LOR:"$cc"="NE" NESTED_ENTRY $lab EnterWithLR_16 STMFD sp!, {lr} ; Save return address SUB sp, sp, #LOC_SIZE ; Allocate local storage PROLOG_END ORRS tmp, dOP1h, dOP2h BMI $lab._negative ; one of the operands negative? (MI) CMN tmp, #0x00100000 ; check whether operands might be infinite/NaN BMI $lab._check_NaN_pos CMP dOP1h, dOP2h CMPEQ dOP1l, dOP2l CmpReturn $cc $lab._check_NaN_pos ; opnd1/2 might be inf/NaNs - do more accurate check CMN dOP1h, #0x00100000 ; overhead 4 cycles for false hit CMNPL dOP2h, #0x00100000 BMI $lab._Inf_or_NaN $lab._cmp_pos CMP dOP1h, dOP2h CMPEQ dOP1l, dOP2l CmpReturn $cc $lab._negative CMN tmp, #0x00100000 BPL $lab._check_NaN_neg ; check whether operands might be infinite/NaN ORRS tmp, dOP1l, dOP1h, LSL #1 ; check for -0 == 0 ORREQS tmp, dOP2l, dOP2h, LSL #1 CMPNE dOP2h, dOP1h CMPEQ dOP2l, dOP1l CmpReturn $cc $lab._check_NaN_neg ; opnd1/2 might be inf/NaNs - do more accurate check MOV tmp, #0x00200000 ; overhead 3 cycles for false hit CMN tmp, dOP1h, LSL #1 CMNCC tmp, dOP2h, LSL #1 BCS $lab._Inf_or_NaN $lab._cmp_neg ; -0 == 0 test omitted (cannot give a false hit) CMP dOP2h, dOP1h CMPEQ dOP2l, dOP1l CmpReturn $cc $lab._Inf_or_NaN ; one of the operands is infinite or NaN MOV tmp, #0x00200000 CMN tmp, dOP1h, LSL #1 CMPEQ dOP1l, #0 ; HI -> NaN found CMNLS tmp, dOP2h, LSL #1 ; no NaN, check opnd2 CMPEQ dOP2l, #0 BHI $NaN_lab ; NaN found -> exception ORRS tmp, dOP1h, dOP2h BPL $lab._cmp_pos B $lab._cmp_neg MEND ;============================================================================== ;Invalid Operation checking (NaNs on compares) ;; IMPORT FPE_Raise ;; ;; NANs on compares <, >, <=, and >= ;; ;; SNANs and QNANs both raise the invalid operation exception, so we don't ;; care which kind of NAN we get. This is because if we get an SNAN or SNANs, ;; we raise the invalid operation exception. If we get a QNAN or QNANs, we ;; have an unordered compare and must also raise the invalid operation ;; exception. ;; ;; Register usage on entry: ;; r0 - Arg1.low ;; r1 - Arg1.high ;; r2 - Arg2.low ;; r3 - Arg2.high ;; r14 - available for scratch ;; All others have normal usage semantics. ;; MACRO $l DCmpNaN $Filter_lab $l STR r2, [sp, #ExOp2l] ;; Push Arg2.low STR r3, [sp, #ExOp2h] ;; Push Arg2.high MOV r3, #_FpCompareUnordered ;; Load default result STR r3, [sp, #ExDResl] ;; Push default result MOV r3, r1 ;; Arg1.high MOV r2, r0 ;; Arg1.low MOV r1, #_FpCmpD ;; ExInfo: InvalidOp, double compare ORR r1, r1, #IVO_bit ;; .. ADD r0, sp, #NewResl ;; Pointer to result CALL FPE_Raise ;; Deal with exception information IF Thumbing :LAND: :LNOT: Interworking CODE16 bx pc ; switch back to ARM mode nop CODE32 ENDIF LDR r0, [sp, #NewResl] ;; Load return value ADD sp, sp, #LOC_SIZE ;; Restore stack ;; ;; Register usage: ;; ;; r0 - Result from exception handler ;; ;; We must now examine the result from the exception handler and change it ;; to TRUE or FALSE, depending on the operation. After changing the result, ;; we return to the caller of the FP double compare routine. ;; B $Filter_lab MEND ;; ;; NANs on compares == and != ;; ;; SNANs and QNANs are treated differently for == and !=. If we get an SNAN ;; or SNANs, we must raise the invalid operation exception. If we only have ;; a QNAN or QNANs, then we simply return false and true for == and !=, ;; respectively. Unordered comparisions for == and != do not raise the ;; invalid operation exception. ;; ;; Register usage on entry: ;; r0 - Arg1.low ;; r1 - Arg1.high ;; r2 - Arg2.low ;; r3 - Arg2.high ;; r14 - available for scratch ;; All others have normal usage semantics. ;; MACRO $l DCmpSNaN $Filter_lab $l MOV r12, #0x7F0 ;; r12 = Max exponent = 0x7FF ORR r12, r12, #0x00F ;; ... MOV r14, r1, LSL #1 ;; Extract exponent from Arg1 MOV r14, r14, LSR #21 ;; ... CMP r14, r12 ;; Arg1.exponent == 0x7FF? BNE $l.checkArg2 ;; Arg1 not a NaN so check Arg2 MOV r14, r1, LSL #14 ;; r14 = Arg1.Mantissa.High ORRS r14, r14, r0 ;; Any Arg1.Mantissa bits set? BEQ $l.checkArg2 ;; Arg1 not a NaN so check Arg2 TST r1, #dSignalBit ;; Check if SNAN BEQ $l.SNaN ;; If high mant. bit clear, SNaN $l.checkArg2 MOV r14, r3, LSL #1 ;; Extract exponent from Arg2 MOV r14, r14, LSR #21 ;; ... CMP r14, r12 ;; Arg2.exponent == 0x7FF? BNE $l.cmpUnordered ;; Arg2 not a NaN so Arg1 is a QNaN MOV r14, r3, LSL #12 ;; r14 = Arg2.Mantissa.High ORRS r14, r14, r2 ;; Any Arg2.Mantissa bits set? BEQ $l.cmpUnordered ;; Arg2 not a NaN so Arg1 is a QNaN TST r3, #dSignalBit ;; Check if SNAN BEQ $l.SNaN ;; If high mant. bit clear, SNaN $l.cmpUnordered MOV r0, #_FpCompareUnordered ;; Have an unordered compare so B $Filter_lab ;; don't raise an exception $l.SNaN STR r2, [sp, #ExOp2l] ;; Push Arg2.low STR r3, [sp, #ExOp2h] ;; Push Arg2.high MOV r3, #_FpCompareUnordered ;; Load default result STR r3, [sp, #ExDResl] ;; Push default result MOV r3, r1 ;; Arg1.high MOV r2, r0 ;; Arg1.low MOV r1, #_FpCmpD ;; ExInfo: InvalidOp, double compare ORR r1, r1, #IVO_bit ;; .. ADD r0, sp, #NewResl ;; Pointer to result CALL FPE_Raise ;; Deal with exception information IF Thumbing :LAND: :LNOT: Interworking CODE16 bx pc ; switch back to ARM mode nop CODE32 ENDIF LDR r0, [sp, #NewResl] ;; Load return value ;; ;; Register usage: ;; ;; r0 - Result from exception handler ;; ;; We must now examine the result from the exception handler and change it ;; to TRUE or FALSE, depending on the operation. After changing the result, ;; we return to the caller of the FP double compare routine. ;; B $Filter_lab MEND ;============================================================================== ;Equality [ :DEF: eq_s Export __eqd AREA |.text|, CODE, READONLY __eqd DoubleCompare EQ, __eqd_NaN __eqd_NaN DCmpSNaN __eqd_Filter __eqd_Filter CMP r0, #_FpCompareEqual ;; Check if compared == MOVEQ r0, #1 ;; If did, return true MOVNE r0, #0 ;; else return false ADD sp, sp, #LOC_SIZE ;; Restore stack IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __eqd ] ;============================================================================== ;Inequality [ :DEF: neq_s Export __ned AREA |.text|, CODE, READONLY __ned DoubleCompare NE, __ned_NaN __ned_NaN DCmpSNaN __ned_Filter __ned_Filter CMP r0, #_FpCompareEqual ;; Check if compared == MOVEQ r0, #0 ;; If did, return false MOVNE r0, #1 ;; else return true ADD sp, sp, #LOC_SIZE ;; Restore stack IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __ned ] ;============================================================================== ;Less Than [ :DEF: ls_s Export __ltd AREA |.text|, CODE, READONLY __ltd DoubleCompare LO, __ltd_NaN __ltd_NaN DCmpNaN __ltd_Filter __ltd_Filter CMP r0, #_FpCompareLess ;; Check if compared < MOVEQ r0, #1 ;; If did, return true MOVNE r0, #0 ;; else return false IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __ltd ] ;============================================================================== ;Less Than or Equal [ :DEF: leq_s Export __led AREA |.text|, CODE, READONLY __led DoubleCompare LS, __led_NaN __led_NaN DCmpNaN __led_Filter __led_Filter CMP r0, #_FpCompareLess ;; Check if compared < MOVEQ r0, #1 ;; If did, BEQ __led_Filter_end ;; return true CMP r0, #_FpCompareEqual ;; Check if compared == MOVEQ r0, #1 ;; If did, return true MOVNE r0, #0 ;; else return false __led_Filter_end IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __led ] ;============================================================================== ;Greater Than [ :DEF: gr_s Export __gtd AREA |.text|, CODE, READONLY __gtd DoubleCompare HI, __gtd_NaN __gtd_NaN DCmpNaN __gtd_Filter __gtd_Filter CMP r0, #_FpCompareGreater ;; Check if compared > MOVEQ r0, #1 ;; If did, return true MOVNE r0, #0 ;; else return false IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __gtd ] ;============================================================================== ;Greater Than or Equal [ :DEF: geq_s Export __ged AREA |.text|, CODE, READONLY __ged DoubleCompare HS, __ged_NaN __ged_NaN DCmpNaN __ged_Filter __ged_Filter CMP r0, #_FpCompareGreater ;; Check if compared > MOVEQ r0, #1 ;; If did, BEQ __ged_Filter_end ;; return true CMP r0, #_FpCompareEqual ;; Check if compared == MOVEQ r0, #1 ;; If did, return true MOVNE r0, #0 ;; else return false __ged_Filter_end IF Interworking :LOR: Thumbing LDMIA sp!, {lr} ;; Return BX lr ELSE LDMIA sp!, {pc} ;; Return ENDIF ENTRY_END __ged ] END
programs/oeis/168/A168333.asm
karttu/loda
1
16167
; A168333: a(n) = (14*n + 7*(-1)^n + 1)/4. ; 2,9,9,16,16,23,23,30,30,37,37,44,44,51,51,58,58,65,65,72,72,79,79,86,86,93,93,100,100,107,107,114,114,121,121,128,128,135,135,142,142,149,149,156,156,163,163,170,170,177,177,184,184,191,191,198,198,205,205,212,212,219,219,226,226,233,233,240,240,247,247,254,254,261,261,268,268,275,275,282,282,289,289,296,296,303,303,310,310,317,317,324,324,331,331,338,338,345,345,352,352,359,359,366,366,373,373,380,380,387,387,394,394,401,401,408,408,415,415,422,422,429,429,436,436,443,443,450,450,457,457,464,464,471,471,478,478,485,485,492,492,499,499,506,506,513,513,520,520,527,527,534,534,541,541,548,548,555,555,562,562,569,569,576,576,583,583,590,590,597,597,604,604,611,611,618,618,625,625,632,632,639,639,646,646,653,653,660,660,667,667,674,674,681,681,688,688,695,695,702,702,709,709,716,716,723,723,730,730,737,737,744,744,751,751,758,758,765,765,772,772,779,779,786,786,793,793,800,800,807,807,814,814,821,821,828,828,835,835,842,842,849,849,856,856,863,863,870,870,877 mov $1,$0 add $1,1 div $1,2 mul $1,7 add $1,2
oeis/220/A220092.asm
neoneye/loda-programs
11
179614
<reponame>neoneye/loda-programs ; A220092: a(n) = ((2*n-1)!! + (-1)^((n-1)*(n-2)/2))/2. ; Submitted by <NAME> ; 1,2,7,52,473,5198,67567,1013512,17229713,327364538,6874655287,158117071612,3952926790313,106729023338438,3095141676814687,95949391981255312,3166329935381425313,110821547738349885938,4100397266318945779687,159915493386438885407812 mov $2,$0 add $0,1 seq $0,1147 ; Double factorial of odd numbers: a(n) = (2*n-1)!! = 1*3*5*...*(2*n-1). div $2,2 mul $2,2 mod $2,4 sub $0,$2 div $0,2 add $0,1
src.pinprint/pinprint-main.adb
persan/a-cups
0
8048
<reponame>persan/a-cups<filename>src.pinprint/pinprint-main.adb with Cups.Cups; procedure Pinprint.Main is -- Main, but no special name is needed. begin Cups.Cups.PrintString ("Hello", True); -- Cups.PrintString ("Hi there!", True); -- Cups.PrintString ("How are you?", True); -- Cups.PrintString ("I am fine thank you!", True); -- Cups.PrintString ("Bye!", True); end Pinprint.Main;
mc-sema/validator/x86/tests/PSHUFDmi.asm
randolphwong/mcsema
2
28054
<filename>mc-sema/validator/x86/tests/PSHUFDmi.asm BITS 32 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_SF|FLAG_PF ;TEST_FILE_META_END ;TEST_BEGIN_RECORDING lea ecx, [esp-0x30] and ecx, 0xFFFFFFF0 mov dword [ecx+0x00], 0xAAAAAAAA mov dword [ecx+0x04], 0xBBBBBBBB mov dword [ecx+0x08], 0xCCCCCCCC mov dword [ecx+0x0C], 0xDDDDDDDD pshufd xmm0, [ecx], 0x4E mov ecx, 0 ;TEST_END_RECORDING cvtsi2sd xmm0, ecx
source/oasis/program-elements-operator_symbols.ads
reznikmm/gela
0
1007
<reponame>reznikmm/gela -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Lexical_Elements; with Program.Elements.Defining_Operator_Symbols; package Program.Elements.Operator_Symbols is pragma Pure (Program.Elements.Operator_Symbols); type Operator_Symbol is limited interface and Program.Elements.Expressions.Expression; type Operator_Symbol_Access is access all Operator_Symbol'Class with Storage_Size => 0; not overriding function Image (Self : Operator_Symbol) return Text is abstract; not overriding function Corresponding_Defining_Operator_Symbol (Self : Operator_Symbol) return Program.Elements.Defining_Operator_Symbols .Defining_Operator_Symbol_Access is abstract; type Operator_Symbol_Text is limited interface; type Operator_Symbol_Text_Access is access all Operator_Symbol_Text'Class with Storage_Size => 0; not overriding function To_Operator_Symbol_Text (Self : in out Operator_Symbol) return Operator_Symbol_Text_Access is abstract; not overriding function Operator_Symbol_Token (Self : Operator_Symbol_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Operator_Symbols;
bootloaderPrintHEX.asm
Aimen-Hammou/AimanOS
0
99045
<gh_stars>0 ; DX = where is stored the data ; CX = loop index PRINT_HEX: PUSHA MOV CX, 0; LOOP_HEX: CMP CX, 4 ;loop 4 times JE DONE_HEX MOV AX, DX AND AX, 0x000F ;get the last character ADD AL, 0x30 CMP AL, 0x39 JLE STEP2 ADD AL, 7 STEP2: MOV BX, HEX_OUTPUT + 5 SUB BX, CX MOV [ BX ], AL ROR DX, 4 ADD CX, 1 JMP LOOP_HEX DONE_HEX: MOV BX, HEX_OUTPUT CALL PRINT POPA RET HEX_OUTPUT: DB '0x0000', 0
coverage/IN_CTS/0529-COVERAGE-loop-iterator-h-130-147-block-frequency-info-impl-h-1280-1205/work/variant/1_spirv_asm/shader.frag.asm
asuonpaa/ShaderTests
0
178557
<gh_stars>0 ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 10 ; Bound: 154 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" %98 %135 OpExecutionMode %4 OriginUpperLeft OpSource ESSL 320 OpName %4 "main" OpName %11 "arr" OpName %14 "buf0" OpMemberName %14 0 "_GLF_uniform_float_values" OpName %16 "" OpName %41 "i" OpName %43 "buf1" OpMemberName %43 0 "_GLF_uniform_int_values" OpName %45 "" OpName %60 "j" OpName %70 "buf_push" OpMemberName %70 0 "injectionSwitch" OpName %72 "" OpName %98 "gl_FragCoord" OpName %135 "_GLF_color" OpDecorate %13 ArrayStride 16 OpMemberDecorate %14 0 Offset 0 OpDecorate %14 Block OpDecorate %16 DescriptorSet 0 OpDecorate %16 Binding 0 OpDecorate %42 ArrayStride 16 OpMemberDecorate %43 0 Offset 0 OpDecorate %43 Block OpDecorate %45 DescriptorSet 0 OpDecorate %45 Binding 1 OpMemberDecorate %70 0 Offset 0 OpDecorate %70 Block OpDecorate %98 BuiltIn FragCoord OpDecorate %135 Location 0 %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeFloat 32 %7 = OpTypeInt 32 0 %8 = OpConstant %7 9 %9 = OpTypeArray %6 %8 %10 = OpTypePointer Function %9 %12 = OpConstant %7 3 %13 = OpTypeArray %6 %12 %14 = OpTypeStruct %13 %15 = OpTypePointer Uniform %14 %16 = OpVariable %15 Uniform %17 = OpTypeInt 32 1 %18 = OpConstant %17 0 %19 = OpConstant %17 1 %20 = OpTypePointer Uniform %6 %40 = OpTypePointer Function %17 %42 = OpTypeArray %17 %12 %43 = OpTypeStruct %42 %44 = OpTypePointer Uniform %43 %45 = OpVariable %44 Uniform %46 = OpConstant %17 2 %47 = OpTypePointer Uniform %17 %58 = OpTypeBool %67 = OpConstant %17 4 %69 = OpTypeVector %6 2 %70 = OpTypeStruct %69 %71 = OpTypePointer PushConstant %70 %72 = OpVariable %71 PushConstant %73 = OpConstant %7 0 %74 = OpTypePointer PushConstant %6 %77 = OpConstant %7 1 %96 = OpTypeVector %6 4 %97 = OpTypePointer Input %96 %98 = OpVariable %97 Input %99 = OpTypePointer Input %6 %102 = OpConstant %6 0 %111 = OpTypePointer Function %6 %134 = OpTypePointer Output %96 %135 = OpVariable %134 Output %4 = OpFunction %2 None %3 %5 = OpLabel %11 = OpVariable %10 Function %41 = OpVariable %40 Function %60 = OpVariable %40 Function %21 = OpAccessChain %20 %16 %18 %19 %22 = OpLoad %6 %21 %23 = OpAccessChain %20 %16 %18 %19 %24 = OpLoad %6 %23 %25 = OpAccessChain %20 %16 %18 %19 %26 = OpLoad %6 %25 %27 = OpAccessChain %20 %16 %18 %19 %28 = OpLoad %6 %27 %29 = OpAccessChain %20 %16 %18 %19 %30 = OpLoad %6 %29 %31 = OpAccessChain %20 %16 %18 %19 %32 = OpLoad %6 %31 %33 = OpAccessChain %20 %16 %18 %19 %34 = OpLoad %6 %33 %35 = OpAccessChain %20 %16 %18 %19 %36 = OpLoad %6 %35 %37 = OpAccessChain %20 %16 %18 %19 %38 = OpLoad %6 %37 %39 = OpCompositeConstruct %9 %22 %24 %26 %28 %30 %32 %34 %36 %38 OpStore %11 %39 %48 = OpAccessChain %47 %45 %18 %46 %49 = OpLoad %17 %48 OpStore %41 %49 OpBranch %50 %50 = OpLabel OpLoopMerge %52 %53 None OpBranch %54 %54 = OpLabel %55 = OpLoad %17 %41 %56 = OpAccessChain %47 %45 %18 %18 %57 = OpLoad %17 %56 %59 = OpSLessThan %58 %55 %57 OpBranchConditional %59 %51 %52 %51 = OpLabel OpStore %60 %18 OpBranch %61 %61 = OpLabel OpLoopMerge %63 %64 None OpBranch %65 %65 = OpLabel %66 = OpLoad %17 %60 %68 = OpSLessThan %58 %66 %67 OpBranchConditional %68 %62 %63 %62 = OpLabel %75 = OpAccessChain %74 %72 %18 %73 %76 = OpLoad %6 %75 %78 = OpAccessChain %74 %72 %18 %77 %79 = OpLoad %6 %78 %80 = OpFOrdGreaterThan %58 %76 %79 %81 = OpLogicalNot %58 %80 OpSelectionMerge %83 None OpBranchConditional %81 %82 %83 %82 = OpLabel OpBranch %84 %84 = OpLabel OpLoopMerge %86 %87 None OpBranch %85 %85 = OpLabel %88 = OpAccessChain %74 %72 %18 %73 %89 = OpLoad %6 %88 %90 = OpAccessChain %74 %72 %18 %77 %91 = OpLoad %6 %90 %92 = OpFOrdGreaterThan %58 %89 %91 %93 = OpLogicalNot %58 %92 OpSelectionMerge %95 None OpBranchConditional %93 %94 %95 %94 = OpLabel %100 = OpAccessChain %99 %98 %73 %101 = OpLoad %6 %100 %103 = OpFOrdLessThan %58 %101 %102 %104 = OpLogicalNot %58 %103 OpSelectionMerge %106 None OpBranchConditional %104 %105 %106 %105 = OpLabel %107 = OpAccessChain %47 %45 %18 %19 %108 = OpLoad %17 %107 %109 = OpAccessChain %20 %16 %18 %19 %110 = OpLoad %6 %109 %112 = OpAccessChain %111 %11 %108 %113 = OpLoad %6 %112 %114 = OpFAdd %6 %113 %110 %115 = OpAccessChain %111 %11 %108 OpStore %115 %114 OpBranch %106 %106 = OpLabel OpBranch %95 %95 = OpLabel OpBranch %87 %87 = OpLabel %116 = OpAccessChain %99 %98 %77 %117 = OpLoad %6 %116 %118 = OpAccessChain %20 %16 %18 %46 %119 = OpLoad %6 %118 %120 = OpFOrdLessThan %58 %117 %119 OpBranchConditional %120 %84 %86 %86 = OpLabel OpBranch %83 %83 = OpLabel OpBranch %64 %64 = OpLabel %121 = OpLoad %17 %60 %122 = OpIAdd %17 %121 %19 OpStore %60 %122 OpBranch %61 %63 = OpLabel OpBranch %53 %53 = OpLabel %123 = OpLoad %17 %41 %124 = OpIAdd %17 %123 %19 OpStore %41 %124 OpBranch %50 %52 = OpLabel %125 = OpAccessChain %47 %45 %18 %19 %126 = OpLoad %17 %125 %127 = OpAccessChain %111 %11 %126 %128 = OpLoad %6 %127 %129 = OpAccessChain %20 %16 %18 %18 %130 = OpLoad %6 %129 %131 = OpFOrdEqual %58 %128 %130 OpSelectionMerge %133 None OpBranchConditional %131 %132 %149 %132 = OpLabel %136 = OpAccessChain %47 %45 %18 %19 %137 = OpLoad %17 %136 %138 = OpConvertSToF %6 %137 %139 = OpAccessChain %47 %45 %18 %46 %140 = OpLoad %17 %139 %141 = OpConvertSToF %6 %140 %142 = OpAccessChain %47 %45 %18 %46 %143 = OpLoad %17 %142 %144 = OpConvertSToF %6 %143 %145 = OpAccessChain %47 %45 %18 %19 %146 = OpLoad %17 %145 %147 = OpConvertSToF %6 %146 %148 = OpCompositeConstruct %96 %138 %141 %144 %147 OpStore %135 %148 OpBranch %133 %149 = OpLabel %150 = OpAccessChain %47 %45 %18 %46 %151 = OpLoad %17 %150 %152 = OpConvertSToF %6 %151 %153 = OpCompositeConstruct %96 %152 %152 %152 %152 OpStore %135 %153 OpBranch %133 %133 = OpLabel OpReturn OpFunctionEnd
src/SystemF/Substitutions/Lemmas.agda
metaborg/ts.agda
4
5367
module SystemF.Substitutions.Lemmas where open import Prelude hiding (module Fin; id) open import SystemF.WellTyped open import SystemF.Substitutions open import Data.Fin as Fin using () open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemmas open import Data.Vec hiding ([_]) open import Extensions.Substitution open import Extensions.Vec open import Data.Vec.Properties import Category.Applicative.Indexed as Applicative open Applicative.Morphism using (op-<$>) module TypeLemmas where open TypeSubst using (module Lifted; module TypeApp) open import Data.Fin.Substitution.Lemmas open import Data.Fin.Substitution.Lemmas public using (module VarLemmas) open import Data.Star using (Star; ε; _◅_) typeLemmas : TermLemmas Type typeLemmas = record { termSubst = TypeSubst.typeSubst; app-var = refl ; /✶-↑✶ = Lemma./✶-↑✶ } where module Lemma {T₁ T₂} {lift₁ : Lift T₁ Type} {lift₂ : Lift T₂ Type} where open Lifted lift₁ using () renaming (_↑✶_ to _↑✶₁_; _/✶_ to _/✶₁_) open Lifted lift₂ using () renaming (_↑✶_ to _↑✶₂_; _/✶_ to _/✶₂_) /✶-↑✶ : ∀ {m n} (σs₁ : Subs T₁ m n) (σs₂ : Subs T₂ m n) → (∀ k x → tvar x /✶₁ σs₁ ↑✶₁ k ≡ tvar x /✶₂ σs₂ ↑✶₂ k) → ∀ k t → t /✶₁ σs₁ ↑✶₁ k ≡ t /✶₂ σs₂ ↑✶₂ k /✶-↑✶ ρs₁ ρs₂ hyp k (tvar x) = hyp k x /✶-↑✶ ρs₁ ρs₂ hyp k (tc c) = begin (tc c) /✶₁ ρs₁ ↑✶₁ k ≡⟨ TypeApp.tc-/✶-↑✶ _ k ρs₁ ⟩ (tc c) ≡⟨ sym $ TypeApp.tc-/✶-↑✶ _ k ρs₂ ⟩ (tc c) /✶₂ ρs₂ ↑✶₂ k ∎ /✶-↑✶ ρs₁ ρs₂ hyp k (a ⟶ b) = begin (a ⟶ b) /✶₁ ρs₁ ↑✶₁ k ≡⟨ TypeApp.⟶-/✶-↑✶ _ k ρs₁ ⟩ (a /✶₁ ρs₁ ↑✶₁ k) ⟶ (b /✶₁ ρs₁ ↑✶₁ k) ≡⟨ cong₂ _⟶_ (/✶-↑✶ ρs₁ ρs₂ hyp k a) (/✶-↑✶ ρs₁ ρs₂ hyp k b) ⟩ (a /✶₂ ρs₂ ↑✶₂ k) ⟶ (b /✶₂ ρs₂ ↑✶₂ k) ≡⟨ sym (TypeApp.⟶-/✶-↑✶ _ k ρs₂) ⟩ (a ⟶ b) /✶₂ ρs₂ ↑✶₂ k ∎ /✶-↑✶ ρs₁ ρs₂ hyp k (a →' b) = begin (a →' b) /✶₁ ρs₁ ↑✶₁ k ≡⟨ TypeApp.→'-/✶-↑✶ _ k ρs₁ ⟩ (a /✶₁ ρs₁ ↑✶₁ k) →' (b /✶₁ ρs₁ ↑✶₁ k) ≡⟨ cong₂ _→'_ (/✶-↑✶ ρs₁ ρs₂ hyp k a) (/✶-↑✶ ρs₁ ρs₂ hyp k b) ⟩ (a /✶₂ ρs₂ ↑✶₂ k) →' (b /✶₂ ρs₂ ↑✶₂ k) ≡⟨ sym (TypeApp.→'-/✶-↑✶ _ k ρs₂) ⟩ (a →' b) /✶₂ ρs₂ ↑✶₂ k ∎ /✶-↑✶ ρs₁ ρs₂ hyp k (∀' a) = begin (∀' a) /✶₁ ρs₁ ↑✶₁ k ≡⟨ TypeApp.∀'-/✶-↑✶ _ k ρs₁ ⟩ ∀' (a /✶₁ ρs₁ ↑✶₁ (1 + k)) ≡⟨ cong ∀' (/✶-↑✶ ρs₁ ρs₂ hyp (1 + k) a) ⟩ ∀' (a /✶₂ ρs₂ ↑✶₂ (1 + k)) ≡⟨ sym (TypeApp.∀'-/✶-↑✶ _ k ρs₂) ⟩ (∀' a) /✶₂ ρs₂ ↑✶₂ k ∎ module tpl = TermLemmas typeLemmas -- The above lemma /✶-↑✶ specialized to single substitutions /-↑⋆ : ∀ {T₁ T₂} {lift₁ : Lift T₁ Type} {lift₂ : Lift T₂ Type} → let open Lifted lift₁ using () renaming (_↑⋆_ to _↑⋆₁_; _/_ to _/₁_) open Lifted lift₂ using () renaming (_↑⋆_ to _↑⋆₂_; _/_ to _/₂_) in ∀ {n k} (ρ₁ : Sub T₁ n k) (ρ₂ : Sub T₂ n k) → (∀ i x → tvar x /₁ ρ₁ ↑⋆₁ i ≡ tvar x /₂ ρ₂ ↑⋆₂ i) → ∀ i a → a /₁ ρ₁ ↑⋆₁ i ≡ a /₂ ρ₂ ↑⋆₂ i /-↑⋆ ρ₁ ρ₂ hyp i a = tpl./✶-↑✶ (ρ₁ ◅ ε) (ρ₂ ◅ ε) hyp i a open AdditionalLemmas typeLemmas public open tpl public /Var-/ : ∀ {ν μ} (t : Type ν) (s : Sub Fin ν μ) → t /Var s ≡ t / (map tvar s) /Var-/ (tc c) s = refl /Var-/ (tvar n) s = lookup⋆map s tvar n /Var-/ (a →' b) s = cong₂ _→'_ (/Var-/ a s) (/Var-/ b s) /Var-/ (a ⟶ b) s = cong₂ _⟶_ (/Var-/ a s) (/Var-/ b s) /Var-/ (∀' t) s = begin ∀' (t /Var (s Var.↑)) ≡⟨ cong ∀' $ /Var-/ t (s Var.↑) ⟩ ∀' (t / (map tvar $ s Var.↑)) ≡⟨ cong (λ u → ∀' (t / u)) (map-var-↑ refl) ⟩ ∀' t / (map tvar s) ∎ a-/Var-varwk↑-/-sub0≡a : ∀ {n} (a : Type (suc n)) → (a /Var Var.wk Var.↑) / sub (tvar zero) ≡ a a-/Var-varwk↑-/-sub0≡a a = begin (a /Var Var.wk Var.↑) / (sub $ tvar zero) ≡⟨ cong (λ u → u / (sub $ tvar zero)) (/Var-/ a $ Var.wk Var.↑) ⟩ (a / (map tvar $ Var.wk Var.↑)) / sub (tvar zero) ≡⟨ cong (λ u → (a / u) / (sub $ tvar zero)) (map-var-↑ map-var-varwk≡wk) ⟩ (a / wk ↑) / (sub $ tvar zero) ≡⟨ a/wk↑/sub0≡a a ⟩ a ∎ -- Lemmas about type substitutions in terms. module TermTypeLemmas where open TermTypeSubst public private module T = TypeLemmas private module TS = TypeSubst private module V = VarLemmas /-↑⋆ : ∀ {T₁ T₂} {lift₁ : Lift T₁ Type} {lift₂ : Lift T₂ Type} → let open TS.Lifted lift₁ using () renaming (_↑⋆_ to _↑⋆₁_; _/_ to _/tp₁_) open Lifted lift₁ using () renaming (_/_ to _/₁_) open TS.Lifted lift₂ using () renaming (_↑⋆_ to _↑⋆₂_; _/_ to _/tp₂_) open Lifted lift₂ using () renaming (_/_ to _/₂_) in ∀ {n k} (ρ₁ : Sub T₁ n k) (ρ₂ : Sub T₂ n k) → (∀ i x → tvar x /tp₁ ρ₁ ↑⋆₁ i ≡ tvar x /tp₂ ρ₂ ↑⋆₂ i) → ∀ i {m} (t : Term (i + n) m) → t /₁ ρ₁ ↑⋆₁ i ≡ t /₂ ρ₂ ↑⋆₂ i /-↑⋆ ρ₁ ρ₂ hyp i (var x) = refl /-↑⋆ ρ₁ ρ₂ hyp i (Λ t) = cong Λ (/-↑⋆ ρ₁ ρ₂ hyp (1 + i) t) /-↑⋆ ρ₁ ρ₂ hyp i (λ' a t) = cong₂ λ' (T./-↑⋆ ρ₁ ρ₂ hyp i a) (/-↑⋆ ρ₁ ρ₂ hyp i t) /-↑⋆ ρ₁ ρ₂ hyp i (t [ b ]) = cong₂ _[_] (/-↑⋆ ρ₁ ρ₂ hyp i t) (T./-↑⋆ ρ₁ ρ₂ hyp i b) /-↑⋆ ρ₁ ρ₂ hyp i (s · t) = cong₂ _·_ (/-↑⋆ ρ₁ ρ₂ hyp i s) (/-↑⋆ ρ₁ ρ₂ hyp i t) /-wk : ∀ {m n} (t : Term m n) → t / TypeSubst.wk ≡ weaken t /-wk t = /-↑⋆ TypeSubst.wk VarSubst.wk (λ k x → begin tvar x T./ T.wk T.↑⋆ k ≡⟨ T.var-/-wk-↑⋆ k x ⟩ tvar (Fin.lift k suc x) ≡⟨ cong tvar (sym (V.var-/-wk-↑⋆ k x)) ⟩ tvar (lookup x (V.wk V.↑⋆ k)) ≡⟨ refl ⟩ tvar x TS./Var V.wk V.↑⋆ k ∎) 0 t module CtxLemmas where open CtxSubst public private module Tp = TypeLemmas private module Var = VarSubst -- Term variable substitution (renaming) commutes with type -- substitution. /Var-/ : ∀ {m ν n l} (ρ : Sub Fin m n) (Γ : Ctx ν n) (σ : Sub Type ν l) → (ρ /Var Γ) / σ ≡ ρ /Var (Γ / σ) /Var-/ ρ Γ σ = begin (ρ /Var Γ) / σ ≡⟨ sym (map-∘ _ _ ρ) ⟩ map (λ x → (lookup x Γ) Tp./ σ) ρ ≡⟨ map-cong (λ x → sym (Tp.lookup-⊙ x)) ρ ⟩ map (λ x → lookup x (Γ / σ)) ρ ∎ -- Term variable substitution (renaming) commutes with weakening of -- typing contexts with an additional type variable. /Var-weaken : ∀ {m n k} (ρ : Sub Fin m k) (Γ : Ctx n k) → weaken (ρ /Var Γ) ≡ ρ /Var (weaken Γ) /Var-weaken ρ Γ = begin (ρ /Var Γ) / Tp.wk ≡⟨ /Var-/ ρ Γ Tp.wk ⟩ ρ /Var (weaken Γ) ∎ -- Term variable substitution (renaming) commutes with term variable -- lookup in typing context. /Var-lookup : ∀ {m n k} (x : Fin m) (ρ : Sub Fin m k) (Γ : Ctx n k) → lookup x (ρ /Var Γ) ≡ lookup (lookup x ρ) Γ /Var-lookup x ρ Γ = op-<$> (lookup-morphism x) _ _ -- Term variable substitution (renaming) commutes with weakening of -- typing contexts with an additional term variable. /Var-∷ : ∀ {m n k} (a : Type n) (ρ : Sub Fin m k) (Γ : Ctx n k) → a ∷ (ρ /Var Γ) ≡ (ρ Var.↑) /Var (a ∷ Γ) /Var-∷ a [] Γ = refl /Var-∷ a (x ∷ ρ) Γ = cong (_∷_ a) (cong (_∷_ (lookup x Γ)) (begin map (λ x → lookup x Γ) ρ ≡⟨ refl ⟩ map (λ x → lookup (suc x) (a ∷ Γ)) ρ ≡⟨ map-∘ _ _ ρ ⟩ map (λ x → lookup x (a ∷ Γ)) (map suc ρ) ∎)) -- Invariants of term variable substitution (renaming) idVar-/Var : ∀ {m n} (Γ : Ctx n m) → Γ ≡ (Var.id /Var Γ) wkVar-/Var-∷ : ∀ {m n} (Γ : Ctx n m) (a : Type n) → Γ ≡ (Var.wk /Var (a ∷ Γ)) idVar-/Var [] = refl idVar-/Var (a ∷ Γ) = cong (_∷_ a) (wkVar-/Var-∷ Γ a) wkVar-/Var-∷ Γ a = begin Γ ≡⟨ idVar-/Var Γ ⟩ Var.id /Var Γ ≡⟨ map-∘ _ _ VarSubst.id ⟩ Var.wk /Var (a ∷ Γ) ∎ ctx-weaken-sub-vanishes : ∀ {ν n} {Γ : Ctx ν n} {a} → (ctx-weaken Γ) ctx/ (Tp.sub a) ≡ Γ ctx-weaken-sub-vanishes {Γ = Γ} {a} = begin (Γ ctx/ Tp.wk) ctx/ (Tp.sub a) ≡⟨ sym $ map-∘ (λ s → s tp/tp Tp.sub a) (λ s → s tp/tp Tp.wk) Γ ⟩ (map (λ s → s tp/tp Tp.wk tp/tp (Tp.sub a)) Γ) ≡⟨ map-cong (TypeLemmas.wk-sub-vanishes) Γ ⟩ (map (λ s → s) Γ) ≡⟨ map-id Γ ⟩ Γ ∎ private ⊢subst : ∀ {m n} {Γ₁ Γ₂ : Ctx n m} {t₁ t₂ : Term n m} {a₁ a₂ : Type n} → Γ₁ ≡ Γ₂ → t₁ ≡ t₂ → a₁ ≡ a₂ → Γ₁ ⊢ t₁ ∈ a₁ → Γ₂ ⊢ t₂ ∈ a₂ ⊢subst refl refl refl hyp = hyp ⊢substCtx : ∀ {m n} {Γ₁ Γ₂ : Ctx n m} {t : Term n m} {a : Type n} → Γ₁ ≡ Γ₂ → Γ₁ ⊢ t ∈ a → Γ₂ ⊢ t ∈ a ⊢substCtx refl hyp = hyp ⊢substTp : ∀ {m n} {Γ : Ctx n m} {t : Term n m} {a₁ a₂ : Type n} → a₁ ≡ a₂ → Γ ⊢ t ∈ a₁ → Γ ⊢ t ∈ a₂ ⊢substTp refl hyp = hyp module WtTypeLemmas where open TypeLemmas hiding (_/_; var; weaken) private module Tp = TypeLemmas module TmTp = TermTypeLemmas module C = CtxLemmas infixl 8 _/_ -- Type substitutions lifted to well-typed terms _/_ : ∀ {m n k} {Γ : Ctx n m} {t : Term n m} {a : Type n} → Γ ⊢ t ∈ a → (σ : Sub Type n k) → Γ C./ σ ⊢ t TmTp./ σ ∈ a Tp./ σ var x / σ = ⊢substTp (lookup-⊙ x) (var x) _/_ {Γ = Γ} (Λ ⊢t) σ = Λ (⊢substCtx eq (⊢t / σ ↑)) where eq : (ctx-weaken Γ) C./ (σ Tp.↑) ≡ ctx-weaken (Γ C./ σ) eq = begin (map (λ s → s tp/tp Tp.wk) Γ) C./ (σ Tp.↑) ≡⟨ cong (λ a → a C./ (σ Tp.↑)) (map-cong (λ a → Tp./-wk {t = a}) Γ) ⟩ (map Tp.weaken Γ) ⊙ (σ Tp.↑) ≡⟨ sym $ map-weaken-⊙ Γ σ ⟩ map Tp.weaken (Γ ⊙ σ) ≡⟨ (map-cong (λ a → sym $ Tp./-wk {t = a}) (Γ ⊙ σ)) ⟩ ctx-weaken (Γ C./ σ) ∎ λ' a ⊢t / σ = λ' (a Tp./ σ) (⊢t / σ) _[_] {a = a} ⊢t b / σ = ⊢substTp (sym (sub-commutes a)) ((⊢t / σ) [ b Tp./ σ ]) ⊢s · ⊢t / σ = (⊢s / σ) · (⊢t / σ) -- Weakening of terms with additional type variables lifted to -- well-typed terms. weaken : ∀ {m n} {Γ : Ctx n m} {t : Term n m} {a : Type n} → Γ ⊢ t ∈ a → ctx-weaken Γ ⊢ TmTp.weaken t ∈ Tp.weaken a weaken {t = t} {a = a} ⊢t = ⊢subst refl (TmTp./-wk t) (/-wk {t = a}) (⊢t / wk) -- Weakening of terms with additional type variables lifted to -- collections of well-typed terms. weakenAll : ∀ {m n k} {Γ : Ctx n m} {ts : Vec (Term n m) k} {as : Vec (Type n) k} → Γ ⊢ⁿ ts ∈ as → ctx-weaken Γ ⊢ⁿ map TmTp.weaken ts ∈ map Tp.weaken as weakenAll {ts = []} {[]} [] = [] weakenAll {ts = _ ∷ _} {_ ∷ _} (⊢t ∷ ⊢ts) = weaken ⊢t ∷ weakenAll ⊢ts -- Shorthand for single-variable type substitutions in well-typed -- terms. _[/_] : ∀ {m n} {Γ : Ctx (1 + n) m} {t a} → Γ ⊢ t ∈ a → (b : Type n) → Γ C./ sub b ⊢ t TmTp./ sub b ∈ a Tp./ sub b ⊢t [/ b ] = ⊢t / sub b tm[/tp]-preserves : ∀ {ν n} {Γ : Ctx ν n} {t τ} → Γ ⊢ Λ t ∈ ∀' τ → ∀ a → Γ ⊢ (t tm[/tp a ]) ∈ τ tp[/tp a ] tm[/tp]-preserves {Γ = Γ} {t} {τ} (Λ p) a = ctx-subst C.ctx-weaken-sub-vanishes (p / (Tp.sub a)) where ctx-subst = Prelude.subst (λ c → c ⊢ t tm[/tp a ] ∈ τ tp[/tp a ]) module WtTermLemmas where private module Tp = TypeLemmas module TmTp = TermTypeLemmas module TmTm = TermTermSubst module Var = VarSubst module C = CtxLemmas TmSub = TmTm.TermSub Term infix 4 _⇒_⊢_ -- Well-typed term substitutions are collections of well-typed terms. _⇒_⊢_ : ∀ {ν m k} → Ctx ν m → Ctx ν k → TmSub ν m k → Set Γ ⇒ Δ ⊢ ρ = Δ ⊢ⁿ ρ ∈ Γ infixl 8 _/_ _/Var_ infix 10 _↑ -- Application of term variable substitutions (renaming) lifted to -- well-typed terms. _/Var_ : ∀ {m n k} {Γ : Ctx n k} {t : Term n m} {a : Type n} (ρ : Sub Fin m k) → ρ C./Var Γ ⊢ t ∈ a → Γ ⊢ t TmTm./Var ρ ∈ a _/Var_ {Γ = Γ} ρ (var x) = ⊢substTp (sym (C./Var-lookup x ρ Γ)) (var (lookup x ρ)) _/Var_ {Γ = Γ} ρ (Λ ⊢t) = Λ (ρ /Var ⊢substCtx (C./Var-weaken ρ Γ) ⊢t) _/Var_ {Γ = Γ} ρ (λ' a ⊢t) = λ' a (ρ Var.↑ /Var ⊢substCtx (C./Var-∷ a ρ Γ) ⊢t) ρ /Var (⊢t [ b ]) = (ρ /Var ⊢t) [ b ] ρ /Var (⊢s · ⊢t) = (ρ /Var ⊢s) · (ρ /Var ⊢t) -- Weakening of terms with additional term variables lifted to -- well-typed terms. weaken : ∀ {m n} {Γ : Ctx n m} {t : Term n m} {a b : Type n} → Γ ⊢ t ∈ a → b ∷ Γ ⊢ TmTm.weaken t ∈ a weaken {Γ = Γ} {b = b} ⊢t = Var.wk /Var ⊢substCtx (C.wkVar-/Var-∷ Γ b) ⊢t -- Weakening of terms with additional term variables lifted to -- collections of well-typed terms. weakenAll : ∀ {m n k} {Γ : Ctx n m} {ts : Vec (Term n m) k} {as : Vec (Type n) k} {b : Type n} → Γ ⊢ⁿ ts ∈ as → (b ∷ Γ) ⊢ⁿ map TmTm.weaken ts ∈ as weakenAll {ts = []} {[]} [] = [] weakenAll {ts = _ ∷ _} {_ ∷ _} (⊢t ∷ ⊢ts) = weaken ⊢t ∷ weakenAll ⊢ts -- Lifting of well-typed term substitutions. _↑ : ∀ {m n k} {Γ : Ctx n m} {Δ : Ctx n k} {ρ b} → Γ ⇒ Δ ⊢ ρ → b ∷ Γ ⇒ b ∷ Δ ⊢ ρ TmTm.↑ ⊢ρ ↑ = var zero ∷ weakenAll ⊢ρ -- The well-typed identity substitution. id : ∀ {m n} {Γ : Ctx n m} → Γ ⇒ Γ ⊢ TmTm.id id {zero} {Γ = []} = [] id {suc m} {Γ = a ∷ Γ} = id ↑ -- Well-typed weakening (as a substitution). wk : ∀ {m n} {Γ : Ctx n m} {a} → Γ ⇒ a ∷ Γ ⊢ TmTm.wk wk = weakenAll id -- A well-typed substitution which only replaces the first variable. sub : ∀ {m n} {Γ : Ctx n m} {t a} → Γ ⊢ t ∈ a → a ∷ Γ ⇒ Γ ⊢ TmTm.sub t sub ⊢t = ⊢t ∷ id -- Application of term substitutions lifted to well-typed terms _/_ : ∀ {m n k} {Γ : Ctx n m} {Δ : Ctx n k} {t a ρ} → Γ ⊢ t ∈ a → Γ ⇒ Δ ⊢ ρ → Δ ⊢ t TmTm./ ρ ∈ a var x / ⊢ρ = lookup-⊢ x ⊢ρ _/_ {Γ = Γ} {Δ = Δ} {ρ = ρ} (Λ ⊢t) ⊢ρ = Λ (⊢t / weaken-⊢p) where weaken-⊢p : ctx-weaken Γ ⇒ ctx-weaken Δ ⊢ map TmTp.weaken ρ weaken-⊢p = (Prelude.subst (λ G → G ⇒ ctx-weaken Δ ⊢ map TmTp.weaken ρ) Tp.map-weaken (WtTypeLemmas.weakenAll ⊢ρ)) λ' a ⊢t / ⊢ρ = λ' a (⊢t / ⊢ρ ↑) (⊢t [ a ]) / ⊢ρ = (⊢t / ⊢ρ) [ a ] (⊢s · ⊢t) / ⊢ρ = (⊢s / ⊢ρ) · (⊢t / ⊢ρ) -- Shorthand for well-typed single-variable term substitutions. _[/_] : ∀ {m n} {Γ : Ctx n m} {s t a b} → b ∷ Γ ⊢ s ∈ a → Γ ⊢ t ∈ b → Γ ⊢ s TmTm./ TmTm.sub t ∈ a ⊢s [/ ⊢t ] = ⊢s / sub ⊢t tm[/tm]-preserves : ∀ {ν n} {Γ : Ctx ν n} {t u a b} → b ∷ Γ ⊢ t ∈ a → Γ ⊢ u ∈ b → Γ ⊢ (t tm[/tm u ]) ∈ a tm[/tm]-preserves ⊢s ⊢t = ⊢s / sub ⊢t open WtTypeLemmas public using () renaming (weaken to ⊢tp-weaken) open WtTermLemmas public using () renaming (_/_ to _⊢/tp_; _[/_] to _⊢[/_]; weaken to ⊢weaken)
pkgs/tools/yasm/src/libyasm/tests/opt-immexpand.asm
manggoguy/parsec-modified
2,151
104171
<gh_stars>1000+ label1: je label3 times 124 nop label2: je label4 label3: times 128 nop label4: push label2-label1
boards/nucleo_f303re/stm32gd-board.ads
ekoeppen/STM32_Generic_Ada_Drivers
1
18487
<reponame>ekoeppen/STM32_Generic_Ada_Drivers with STM32GD.GPIO; use STM32GD.GPIO; with STM32GD.GPIO.Pin; with STM32GD.Clocks; with STM32GD.Clocks.Tree; with STM32GD.SPI; with STM32GD.SPI.Peripheral; with STM32GD.USART; with STM32GD.USART.Peripheral; with STM32_SVD.Interrupts; with Drivers.Text_IO; package STM32GD.Board is package GPIO renames STM32GD.GPIO; package Clocks is new STM32GD.Clocks.Tree; package SCLK is new Pin (Pin => Pin_5, Port => Port_A, Mode => Mode_AF, Alternate_Function => 5); package MISO is new Pin (Pin => Pin_6, Port => Port_A, Mode => Mode_AF, Alternate_Function => 5); package MOSI is new Pin (Pin => Pin_7, Port => Port_A, Mode => Mode_AF, Alternate_Function => 5); package CSN is new Pin (Pin => Pin_6, Port => Port_B, Mode => Mode_Out); package BUTTON is new Pin (Pin => Pin_13, Port => Port_C); package LED is new Pin (Pin => Pin_5, Port => Port_A, Mode => Mode_Out); package LED2 is new Pin (Pin => Pin_8, Port => Port_C, Mode => Mode_Out); package LED3 is new Pin (Pin => Pin_6, Port => Port_C, Mode => Mode_Out); package TX is new Pin (Pin => Pin_2, Port => Port_A, Pull_Resistor => Pull_Up, Mode => Mode_AF, Alternate_Function => 7); package RX is new Pin (Pin => Pin_3, Port => Port_A, Pull_Resistor => Pull_Up, Mode => Mode_AF, Alternate_Function => 7); package USART is new STM32GD.USART.Peripheral ( USART => STM32GD.USART.USART_2, Speed => 115200, RX_DMA_Buffer_Size => 64, IRQ => STM32_SVD.Interrupts.USART2_EXTI26, Clock => Clocks.PCLK1); package Text_IO is new Drivers.Text_IO (USART => STM32GD.Board.USART); package SPI is new STM32GD.SPI.Peripheral (SPI => STM32GD.SPI.SPI_1); procedure Init; end STM32GD.Board;
alloy4fun_models/trashltl/models/11/HJWR575PocFZ5jvXZ.als
Kaixi26/org.alloytools.alloy
0
1142
<gh_stars>0 open main pred idHJWR575PocFZ5jvXZ_prop12 { always all f: File | f in Trash triggered always f in Trash } pred __repair { idHJWR575PocFZ5jvXZ_prop12 } check __repair { idHJWR575PocFZ5jvXZ_prop12 <=> prop12o }
programs/oeis/003/A003815.asm
karttu/loda
1
89513
; A003815: a(0) = 0, a(n) = a(n-1) XOR n. ; 0,1,3,0,4,1,7,0,8,1,11,0,12,1,15,0,16,1,19,0,20,1,23,0,24,1,27,0,28,1,31,0,32,1,35,0,36,1,39,0,40,1,43,0,44,1,47,0,48,1,51,0,52,1,55,0,56,1,59,0,60,1,63,0,64,1,67,0,68,1,71,0,72,1,75,0,76,1,79,0,80,1,83,0,84,1,87,0,88,1,91,0,92,1,95,0,96,1,99,0,100,1,103,0,104,1,107,0,108,1,111,0,112,1,115,0,116,1,119,0,120,1,123,0,124,1,127,0,128,1,131,0,132,1,135,0,136,1,139,0,140,1,143,0,144,1,147,0,148,1,151,0,152,1,155,0,156,1,159,0,160,1,163,0,164,1,167,0,168,1,171,0,172,1,175,0,176,1,179,0,180,1,183,0,184,1,187,0,188,1,191,0,192,1,195,0,196,1,199,0,200,1,203,0,204,1,207,0,208,1,211,0,212,1,215,0,216,1,219,0,220,1,223,0,224,1,227,0,228,1,231,0,232,1,235,0,236,1,239,0,240,1,243,0,244,1,247,0,248,1 cal $0,199398 ; XOR of the first n odd numbers. div $0,2 mov $1,$0
tests/ships-movement-test_data-tests.ads
thindil/steamsky
80
9843
-- This package has been generated automatically by GNATtest. -- Do not edit any part of it, see GNATtest documentation for more details. -- begin read only with Gnattest_Generated; package Ships.Movement.Test_Data.Tests is type Test is new GNATtest_Generated.GNATtest_Standard.Ships.Movement .Test_Data .Test with null record; procedure Test_MoveShip_143def_3bb6cb(Gnattest_T: in out Test); -- ships-movement.ads:36:4:MoveShip:Test_MoveShip procedure Test_DockShip_bfbe82_875e5b(Gnattest_T: in out Test); -- ships-movement.ads:52:4:DockShip:Test_DockShip procedure Test_ChangeShipSpeed_a103ef_17b968(Gnattest_T: in out Test); -- ships-movement.ads:65:4:ChangeShipSpeed:Test_ChangeShipSpeed procedure Test_RealSpeed_da7fcb_f7fd56(Gnattest_T: in out Test); -- ships-movement.ads:79:4:RealSpeed:Test_RealSpeed procedure Test_CountFuelNeeded_db602d_18e85d(Gnattest_T: in out Test); -- ships-movement.ads:90:4:CountFuelNeeded:Test_CountFuelNeeded procedure Test_WaitInPlace_a6040e_d787da(Gnattest_T: in out Test); -- ships-movement.ads:100:4:WaitInPlace:Test_WaitInPlace end Ships.Movement.Test_Data.Tests; -- end read only