Skip to content

Commit 877b1df

Browse files
authored
Merge pull request #72 from BlockScience/push
Push
2 parents 5f71b87 + 9e57733 commit 877b1df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+592
-316
lines changed

V1 Architecture/Class/Methods 1.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## System Methods
2+
3+
- isValid: system $\rightarrow$ Bool
4+
- isDirected: system $\rightarrow$ Bool
5+
- isConnected: system $\rightarrow$ Bool
6+
- isDynamical: system $\rightarrow$ Bool
7+
- getOpenPorts: system $\rightarrow$ List[Terminal] = List[\{Processor, Index, Type\}]
8+
- getAvailableTerminals: system $\rightarrow$ List[Terminal] = List[\{Processor, Index, Type\}]
9+
- getConnectedComponents: system $\rightarrow$ List[System]
10+
- getSubsystems: system $\rightarrow$ List[Processor] (subset of the processor list which isSubsystem)
11+
- getHierarchy: system $\rightarrow$ NestedDict (primitive processors are leaves in this tree)
12+
- getSpaces: system $\rightarrow$ List[Space]
13+
- makeProcessor:system x block x List[wires] $\rightarrow$ Processor
14+
- Imp: system $\rightarrow$ Processor (aka "lazy make processor)
15+
16+
## Processor Methods
17+
18+
- isSubsystem: processor $\rightarrow$ Bool
19+
- isPrimitive: Process $\rightarrow$ Bool
20+
- getSystem: processor $\rightarrow$ System
21+
- getShape: processor $\rightarrow$ Block
22+
23+
## Project Methods
24+
25+
- lazyLoadCompositeProcessor
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"nodes":[
3+
{"id":"b6fab004d256f8de","type":"text","text":"# Project\nComponents:\nToolbox\nWorkbench","x":-190,"y":-430,"width":160,"height":160},
4+
{"id":"3df945f3f7d36b92","type":"text","text":"# Workbench\nComponents:\nList[Processor]\nList[Wire]\nList[System]","x":-30,"y":-230,"width":285,"height":160},
5+
{"id":"3d7dedce274a492e","type":"text","text":"# Toolbox\nComponents:\nList[Block]\nList[Space]","x":-350,"y":-230,"width":160,"height":160},
6+
{"id":"630f2a5feaf2fb22","type":"text","text":"# Processor\n\n**NOTE**: Subsystem is optional and if present turns it into a composite processor representing a system\n\nID: string (required) \n\nName: string (required) \n\nDescription: string \n\nParent: BlockID (required)\n\nPorts: array[Space.ID] \n\nTerminals: array[Space.ID] (required) \n\nSubsystem: { System ID: System.ID (required) Wires: array[string] (required) }","x":-150,"y":-30,"width":263,"height":590},
7+
{"id":"110e3e478c6c326c","type":"text","text":"# System\n\nID: string (required)\n\nName: string (required) \n\nDescription: string \n\nProcessors: array[Processor.ID] (required) \n\nWires: array[Wire.ID] (required)","x":390,"y":-30,"width":310,"height":590},
8+
{"id":"ae7731c5dabfb8ce","type":"text","text":"# Wire\n\nID: string (required) \n\nParent: Space.ID (required) \n\nSource: { Processor: Processor.ID, \nIndex: integer } \n\nTarget: { Processor: Processor.ID,\nIndex: integer }","x":135,"y":-30,"width":225,"height":590},
9+
{"id":"a0eb3ee9cbb2cdd3","type":"text","text":"Similar to nodes (typed by blocks)","x":-150,"y":620,"width":263,"height":60,"color":"3"},
10+
{"id":"e135c0917ca5d3a8","type":"text","text":"Similar to edges (typed by spaces)","x":135,"y":620,"width":225,"height":60,"color":"3"},
11+
{"id":"f2682c67d9b9edff","type":"text","text":"Similar to Typed Multi-Digraphs
with extra rules
* ports can only be used once
* terminals can be used any number of times","x":390,"y":590,"width":310,"height":110,"color":"3"},
12+
{"id":"3e2434525fcc8541","type":"text","text":"- Project can be thought of as your working directory \n- Each level down in the actual schema refers to nesting, i.e. a project has one toolbox and this one toolbox has a list of blocks and a list of spaces which follow the schemas described under it","x":-810,"y":-450,"width":380,"height":200,"color":"3"},
13+
{"id":"2575ee7921d36820","type":"text","text":"# Block\n\n{ ID: string (required)\n\nName: string (required) \n\nDescription: string\n\nDomain: array[Space.ID] (required) \n\nCodomain: array[Space.ID] (required) }","x":-880,"y":-30,"width":200,"height":590},
14+
{"id":"ae9da3db023837af","type":"text","text":"# Space\n\n{ ID: string (required) \n\nName: string (required) \n\nDescription: string }","x":-655,"y":-30,"width":165,"height":590},
15+
{"id":"11cab3f937d7e1eb","type":"text","text":"# Architecture\n\n- Future component that will be an abstract representation of a system\n- To be implemented much later after dogfooding","x":-470,"y":-30,"width":240,"height":590,"color":"1"}
16+
],
17+
"edges":[
18+
{"id":"0980aa1c29d50d33","fromNode":"b6fab004d256f8de","fromSide":"bottom","toNode":"3d7dedce274a492e","toSide":"top"},
19+
{"id":"7b72b0c4fb473461","fromNode":"b6fab004d256f8de","fromSide":"bottom","toNode":"3df945f3f7d36b92","toSide":"top"},
20+
{"id":"d32d2f9521cbe7e2","fromNode":"3df945f3f7d36b92","fromSide":"bottom","toNode":"630f2a5feaf2fb22","toSide":"top"},
21+
{"id":"72a268db645b3f47","fromNode":"3df945f3f7d36b92","fromSide":"bottom","toNode":"ae7731c5dabfb8ce","toSide":"top"},
22+
{"id":"f81624a9699cd0ba","fromNode":"3d7dedce274a492e","fromSide":"left","toNode":"2575ee7921d36820","toSide":"top"},
23+
{"id":"6110bad326407cae","fromNode":"3df945f3f7d36b92","fromSide":"right","toNode":"110e3e478c6c326c","toSide":"top"},
24+
{"id":"934ba36f96e6eb2a","fromNode":"630f2a5feaf2fb22","fromSide":"bottom","toNode":"a0eb3ee9cbb2cdd3","toSide":"top"},
25+
{"id":"1bbb0af8fcb604ad","fromNode":"ae7731c5dabfb8ce","fromSide":"bottom","toNode":"e135c0917ca5d3a8","toSide":"top"},
26+
{"id":"96ad533a3d4601a6","fromNode":"110e3e478c6c326c","fromSide":"bottom","toNode":"f2682c67d9b9edff","toSide":"top"},
27+
{"id":"09aa3f8d7e40bc35","fromNode":"b6fab004d256f8de","fromSide":"left","toNode":"3e2434525fcc8541","toSide":"right"},
28+
{"id":"ac47d6e396332dc5","fromNode":"3d7dedce274a492e","fromSide":"left","toNode":"ae9da3db023837af","toSide":"top"},
29+
{"id":"94464c9d19a4d5a4","fromNode":"3d7dedce274a492e","fromSide":"left","toNode":"11cab3f937d7e1eb","toSide":"top"}
30+
]
31+
}

docs/Glossary.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ nav_order: 2
44
layout: default
55
---
66

7-
- Block Diagram Protocol Schema: This schema is used to validate the JSON file that is used to store the block diagram protocol. There are two components, a toolbox which describes the abstract blocks and spaces and the model which has the actual instances of the toolbox - processors, wires and systems.
8-
- Toolbox Schema: This schema is used for describing a toolbox in bdp-lib.
9-
- Spaces: A list of spaces in the block diagram protocol that follow the space schema. It defines the abstract classes of blocks and spaces which models will instantiate.
7+
- Project: A project within the block diagram protocol. The toolbox contains the abstract representations and the workbench contains the implementations.
8+
- Toolbox: The abstract classes of blocks and spaces which the workbench will instantiate.
9+
- Spaces: A list of spaces in the block diagram protocol that follow the space schema. One can think of a space as a typed dictionary of data.
1010
- ID: The unique identifier of the space.
1111
- Name: The name of the space.
1212
- Description: The description of the space.
@@ -16,14 +16,17 @@ layout: default
1616
- Description: A description of the block.
1717
- Domain: The domain of the block which are IDs of spaces. Spaces may be repeated or it may be an empty array.
1818
- Codomain: The codomain of the block which are IDs of spaces. Spaces may be repeated or it may be an empty array.
19-
- Model Schema: This schema is used to describe a model in bdp-lib which is the actual instances of the toolbox which it would be paired with in the large bdp schema.
19+
- Workbench: The actual instances in bdp-lib which is the actual instances of the toolbox which it would be paired with in the large bdp project.
2020
- Processors: A list of processors in the block diagram protocol that follow the processor schema.
2121
- ID: A unique identifier for the processor.
2222
- Name: The name of the processor.
2323
- Description: A description of the processor.
2424
- Parent: The ID of the block that the processor is an instance of.
2525
- Ports: The IDs of spaces which must match the domain of the parent block.
2626
- Terminals: The IDs of spaces which must match the codomain of the parent block.
27+
- Subsystem: The subsystem of the processor which is a system that the processor represents and passes its ports to and receives spaces to its terminals from.
28+
- System ID: The ID of the system that the processor is a processor for.
29+
- Wires: The IDs of the wires that connect the processor ports and terminals to the system ports and terminals.
2730
- Wires: A list of wires in the block diagram protocol that follow the wire schema.
2831
- ID: A unique identifier for the wire.
2932
- Parent: The ID of the space that the wire is passing.

docs/Glossary/Toolbox.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Toolbox
3+
nav_order: 1
4+
layout: default
5+
parent: Glossary
6+
---

docs/Glossary/Toolbox/Block.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Block
3+
nav_order: 1
4+
layout: default
5+
parent: Toolbox
6+
---

docs/Glossary/Toolbox/Space.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Space
3+
nav_order: 2
4+
layout: default
5+
parent: Toolbox
6+
---

docs/Glossary/Workbench.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Workbench
3+
nav_order: 2
4+
layout: default
5+
parent: Glossary
6+
---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Processor
3+
nav_order: 1
4+
layout: default
5+
parent: Workbench
6+
---

docs/Glossary/Workbench/System.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: System
3+
nav_order: 3
4+
layout: default
5+
parent: Workbench
6+
---

docs/Glossary/Workbench/Wire.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Wire
3+
nav_order: 2
4+
layout: default
5+
parent: Workbench
6+
---

0 commit comments

Comments
 (0)