Bread Crumbs is a modern programming language designed for testing, simulations, scientific computing, AI planning, and rapid prototyping. With its unique features like declarative problem-solving (solve), scenario simulation (simulate), state management (snapshot/rollback), and execution tracing (trace), Bread Crumbs empowers developers to tackle complex problems with ease.
- Declarative Programming: Use
solveto define constraints and let the language find solutions.solve (x: int) { where x * x == 16 } print(x) // Outputs: 4 or -4 - Simulation: Simulate scenarios with
simulateand manage state withsnapshot/rollback.snapshot state simulate scenarios { timeline test { x += 1 if (error) { rollback state } } } - Build-in Testing and Fork the branches
test find_numbers { solve (x, y: int) { where x + y == 10, x * y == 21 } assert(x + y == 10) assert(x * y == 21) fork scenarios { branch positive { assert(x > 0 && y > 0) print("Positive solution: x = {x}, y = {y}") } branch negative { assert(x < 0 || y < 0) print(f"Negative solution: x = {x}, y = {y}") } } } run find_numbers - Tracing: Debug and analyze with
tracefor transparent execution.
-
Clone the Repository:
git clone https://github.com/Bre4dGC/bread-crumbs.git cd bread-crumbs -
Build from Source:
make sudo make install
-
Verify Installation:
crumbs --version
Try this simple example to explore Bread Crumbs:
var numbers: list<int> = [1, 2, 3]
print(numbers) // Outputs: [1, 2, 3]
snapshot state
numbers.push(4)
print(numbers) // Outputs: [1, 2, 3, 4]
rollback state
print(numbers) // Outputs: [1, 2, 3]
For more examples, check the documentation.
We welcome contributions! Here's how to get involved:
- Fork the repository.
- Create a branch:
git checkout -b my-feature. - Commit your changes:
git commit -m "Add my feature". - Push to the branch:
git push origin my-feature. - Open a pull request.
Please read our Contributing Guidelines for details.
Join our community to discuss Bread Crumbs, share ideas, and get help:
- Discord: Join Bread Crumbs Community
- GitHub Issues: Report bugs or suggest features here.
Bread Crumbs is licensed under the MIT License.
