A revolutionary implementation of P-System Membrane Computing as Dev Container Features, enabling containerized environments to function as computational membranes with hierarchical nesting, evolution rules, and inter-membrane communication capabilities.
P-Systems (Membrane Systems) are computational models inspired by the structure and functioning of biological cells. This repository implements P-System concepts using modern container technology:
graph TB
subgraph "P-System Architecture"
CM[Cognitive Membrane]
PM[Perception Membrane]
AM[Action Membrane]
subgraph "Nested Workers"
VW[Visual Worker]
AW[Audio Worker]
MW[Motor Worker]
OW[Output Worker]
end
CM --> PM
CM --> AM
PM --> VW
PM --> AW
AM --> MW
AM --> OW
VW -.->|Messages| CM
AW -.->|Messages| CM
MW -.->|Commands| OW
end
This repository provides four specialized dev container features:
Transforms a dev container into a P-System membrane with evolution rules, communication capabilities, hierarchical nesting support, and distributed namespace registration.
Key Capabilities:
- ๐ Evolution rule execution engine
- ๐ก Inter-membrane communication protocols
- ๐ฃ Scheme-based hypergraph representation
- ๐ Real-time monitoring and event logging
- ๐ณ Hierarchical membrane nesting
- ๐ Distributed namespace registration and discovery
- ๐ Dynamic membrane communication without static configuration
Orchestrates complex P-System hierarchies using Docker Compose or Kubernetes, with visualization and auto-scaling capabilities.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/opencoq/devconfeat-p-star/orchestrator:1": {
"orchestrationType": "docker-compose",
"maxNestingDepth": "5",
"enableVisualization": true,
"enableAutoScaling": true
}
}
}Key Capabilities:
- ๐ณ Docker Compose and Kubernetes deployment
- ๐ Auto-scaling based on membrane load
- ๐จ Web-based hierarchy visualization
- โ๏ธ Configuration generation and management
Simple demonstration features showing basic dev container feature patterns.
# Test color feature
$ color
my favorite color is green
# Test hello feature
$ hello
Hello, user.P-System Membrane Computing architecture maps naturally to containerized environments:
graph LR
subgraph "Container โ
Membrane"
C1[Dev Container]
C2[Nested Container]
C3[Worker Container]
end
subgraph "Communication โ
Evolution Rules"
M1[Shared Volumes]
M2[Network Messages]
M3[IPC Channels]
end
subgraph "Hierarchy โ
Nesting"
H1[Parent Membrane]
H2[Child Membrane]
H3[Grandchild Membrane]
end
C1 --> H1
C2 --> H2
C3 --> H3
H1 --> H2
H2 --> H3
H1 -.->|Messages| M1
H2 -.->|Events| M2
H3 -.->|State| M3
architecture-beta
group cloud(logos:aws-cloudformation)[Cloud Infrastructure]
group container(logos:docker-icon)[Container Layer]
group membrane(logos:atom)[Membrane Layer]
group application(logos:visual-studio-code)[Application Layer]
service db(logos:postgresql)[Database] in cloud
service registry(logos:docker-icon)[Container Registry] in cloud
service orchestrator(logos:kubernetes)[Orchestrator] in container
service runtime(logos:docker-icon)[Container Runtime] in container
service membrane_core(logos:atom)[Membrane Core] in membrane
service evolution(logos:gear)[Evolution Engine] in membrane
service communication(logos:signal)[Communication] in membrane
service scheme(logos:scheme)[Scheme Interpreter] in application
service monitoring(logos:grafana)[Monitoring] in application
service visualization(logos:d3)[Visualization] in application
orchestrator:R --> L:runtime
runtime:T --> B:membrane_core
membrane_core:R --> L:evolution
evolution:R --> L:communication
membrane_core:T --> B:scheme
communication:T --> B:monitoring
monitoring:R --> L:visualization
db:R --> L:orchestrator
registry:B --> T:runtime
Create a simple P-System membrane:
# Create devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/opencoq/devconfeat-p-star/membrane:1": {
"membraneId": "my-membrane",
"enableScheme": true
}
}
}
# Open in VS Code
code .
# Container will build with membrane capabilities# Check membrane status
membrane status
# Send test message
membrane send target-membrane "test message"
# View communication logs
membrane log
# Execute evolution rule
./opt/membrane/rules/evolution.sh file_created /tmp/data.json# Generate hierarchy configuration
orchestrator generate examples/cognitive-architecture/membrane-hierarchy.json
# Deploy complete system
orchestrator deploy docker-compose.yml
# View visualization
orchestrator visualize
# Open http://localhost:8080sequenceDiagram
participant Root as Root Membrane
participant Perception as Perception Membrane
participant Visual as Visual Worker
participant Cognition as Cognition Membrane
Root->>Perception: Initialize processing
Perception->>Visual: Delegate visual task
Visual->>Visual: Process image data
Visual->>Perception: Return results
Perception->>Cognition: Send processed data
Cognition->>Root: Decision result
Root->>Perception: Update state
flowchart TD
A[Event Trigger] --> B{Rule Match?}
B -->|Yes| C[Execute Rule]
B -->|No| D[Queue Event]
C --> E[Update State]
E --> F[Send Messages]
F --> G[Log Activity]
D --> H[Wait for Match]
H --> B
G --> I[Continue Monitoring]
devconfeat-p-star/
โโโ src/
โ โโโ membrane/ # Core P-System membrane
โ โ โโโ devcontainer-feature.json
โ โ โโโ install.sh
โ โ โโโ README.md
โ โโโ orchestrator/ # Hierarchy orchestration
โ โ โโโ devcontainer-feature.json
โ โ โโโ install.sh
โ โ โโโ README.md
โ โโโ color/ # Example feature
โ โโโ hello/ # Example feature
โโโ examples/
โ โโโ cognitive-architecture/ # Complete P-System example
โโโ test/ # Feature tests
โโโ TENSOR_MAPPING.md # ggml integration guide
โโโ ARCHITECTURE.md # Detailed technical docs
This system is designed for integration with AI/ML frameworks:
graph TB
subgraph "Membrane State"
MS[Membrane State Vector]
CM[Communication Matrix]
ER[Evolution Rules]
end
subgraph "Tensor Representation"
ST[State Tensor]
CT[Communication Tensor]
ET[Evolution Tensor]
end
subgraph "Neural Processing"
NN[Neural Network]
CK[Cognitive Kernel]
AI[AI Application]
end
MS --> ST
CM --> CT
ER --> ET
ST --> NN
CT --> NN
ET --> NN
NN --> CK
CK --> AI
See TENSOR_MAPPING.md for detailed tensor specifications.
- ๐ค Cognitive AI Systems: Hierarchical reasoning with membrane-based attention
- ๐ Distributed Computing: Container orchestration with P-System semantics
- ๐งช Computational Biology: Modeling cellular processes in containers
- ๐ฎ Game AI: Multi-level decision making with nested behaviors
- ๐ญ Industrial Automation: Hierarchical control systems with evolution rules
See the complete cognitive-architecture example for:
- Multi-level membrane hierarchy
- Inter-membrane communication
- Evolution rule implementation
- Visualization dashboard
- Integration patterns
# Membrane commands
membrane status # Show membrane state
membrane send <target> <msg> # Send message
membrane log # View communication logs
membrane scheme # Enter Scheme REPL
# Namespace commands
membrane register [parent] # Register with namespace
membrane discover <membrane_id> # Discover membrane by ID
membrane list # List all membranes
membrane registry start # Start namespace registry
membrane registry status # Check registry status
# Orchestrator commands
orchestrator generate <json> # Generate configuration
orchestrator deploy <config> # Deploy hierarchy
orchestrator visualize # Start visualization
orchestrator status # Show system statusWe welcome contributions! This project implements cutting-edge computational theory in practical container environments.
# Clone repository
git clone https://github.com/OpenCoq/devconfeat-p-star.git
cd devconfeat-p-star
# Test features
./test/run-tests.sh
# Contribute new features or improvements- Create feature directory in
src/ - Add
devcontainer-feature.jsonandinstall.sh - Write tests in
test/ - Update documentation
- ARCHITECTURE.md - Detailed technical architecture
- TENSOR_MAPPING.md - ggml integration guide
- examples/ - Complete usage examples
- Dev Container Spec - Container feature specification
MIT License - see LICENSE for details.
Transform your development environment into a computational membrane with P-System capabilities. Experience the future of distributed, hierarchical computing.
{ "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/opencoq/devconfeat-p-star/membrane:1": { "membraneId": "cognitive-root", "enableScheme": true, "enableMonitoring": true, "communicationMode": "shared-volume", "enableNamespace": true, "autoRegister": true } } }