-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YARN-913 Initial yarn registry just to get the git process booted
- Loading branch information
1 parent
e53813b
commit 40f777b
Showing
2 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,8 @@ hs_err_pid* | |
|
||
# Tex artifacts | ||
*.dvi | ||
*.aux | ||
*.aux | ||
*.log | ||
.project | ||
*.toolbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
---------------------------- MODULE yarnregistry ---------------------------- | ||
|
||
|
||
EXTENDS Sequences | ||
|
||
(* a path element is all chars excluding "/" *) | ||
|
||
CONSTANTS | ||
PathChars, \* the set of valid characters in a path | ||
Paths, \* the set of all possible valid paths | ||
Data \* the set of all possible sequences of bytes | ||
|
||
|
||
|
||
(* all paths in the system *) | ||
VARIABLE registryPaths | ||
|
||
PathCharInvariant == PathChars \subseteq STRING | ||
|
||
PathInvariant == \A p \in registryPaths: \A pe \in p : pe \in PathChars | ||
|
||
(* | ||
isRoot[P] == p = [] | ||
*) | ||
(* parent(p, q) == *) | ||
|
||
============================================================================= | ||
|
||
(* | ||
An Entry is defined as a path, an ephemerality flag, and the actual data which it contains. | ||
|
||
By including the path in an entry, we avoid having to define some function | ||
mapping Path -> entry. Instead a registry can be defined as a set of RegistryEntries | ||
matching the validity critera. | ||
|
||
*) | ||
|
||
RegistryEntry == [ | ||
path: Paths, \* The path to the entry | ||
ephemeral: BOOLEAN, \* A flag to indicate when the entry is ephemeral | ||
data: Data] \* the data in the entry | ||
|
||
|
||
(*************************************************************************** | ||
For validity, all entries must match the following criteria | ||
|
||
* there can be at most one entry with a given path in the set | ||
* their path is either [] or a parent path which must also be found in the registry | ||
* no entry may have a parent that is ephemeral | ||
|
||
***************************************************************************) | ||
|
||
============================================================================= | ||
============================================================================= | ||
\* Modification History | ||
\* Last modified Mon Sep 01 18:50:01 BST 2014 by stevel | ||
\* Created Sun Aug 31 14:54:47 BST 2014 by stevel |