"FizzBee upholds the rigor of TLA+ while making formal verification simpler and more accessible for engineers. By leveraging Python, it reduces the learning curve, with the potential to surpass TLA+ as the go-to tool for engineers."
- — Jack Vanlightly, Principal Technologist, Confluent -"I discovered FizzBee while designing the manifest for SlateDB, an embedded key-value store. FizzBee’s concepts were easy to grasp in hours, and by the next day, I had a working spec that uncovered a real concurrency bug!"
- — Vignesh Chandramohan, Engineering Manager, Doordash +{{< rawhtml >}} +Specify your system design in a Pythonic modeling language. Let FizzBee verify your design and generate a test harness for your code.
+ -"FizzBee’s Python-like syntax made it easy to learn and use, unlike other formal methods languages. I picked it up over a weekend and successfully modeled our streaming ingestion platform to identify correctness bugs. It's intuitive and incredibly effective!"
- — Franklyn D'souza"FizzBee cured my fear of formal methods after struggling with TLA+ years ago. It's surprisingly easy to learn and a refreshing experience—something I never thought I could master. Universities should teach FizzBee!"
- — Li YazhouFizzBee uses Starlark, the same Python dialect as Bazel. Your models stay both human-readable and AI-friendly.
+ Run in playground +role Participant:
action Init:
self.status = "init"
-
+
func placehold():
vote = any ["accepted", "aborted"]
- self.status = vote
+ self.status = vote
return self.status
-
+
func finalize(decision):
self.status = decision
@@ -109,7 +113,7 @@ role Participant:
role Coordinator:
action Init:
self.status = "init"
-
+
action Checkout:
require(self.status == "init")
self.status = "inprogress"
@@ -118,18 +122,18 @@ role Coordinator:
if vote == "aborted":
self.finalize("aborted")
return
-
+
self.finalize("committed")
-
-
+
+
func finalize(decision):
self.status = decision
for p in participants:
p.finalize(decision)
-
+
NUM_PARTICIPANTS=2
-
+
action Init:
coordinator = Coordinator()
participants = []
@@ -141,8 +145,173 @@ always assertion ParticipantsConsistent:
for p2 in participants:
if p1.status == 'committed' and p2.status == 'aborted':
return False
- return True
+ return True
+ Run the model checker and get a concrete result: explored states, generated artifacts, failed assumptions, and deadlock scenarios.
+ Read the model checking guide +DeprecationWarning: 'VAR = any COLLECTION' is deprecated, use 'VAR = oneof COLLECTION' instead
+Model checking /tmp/travel_booking_home.json
+configFileName: /tmp/fizz.yaml
+fizz.yaml not found. Using default options
+StateSpaceOptions: options:{max_actions:100 max_concurrent_actions:2}
+Nodes: 32, queued: 0, elapsed: 8.489375ms
+Time taken for model checking: 8.509541ms
+Writen graph dotfile: /tmp/fizzbee-home-run/graph.dot
+Writen communication diagram dotfile: /tmp/fizzbee-home-run/communication.dot
+DEADLOCK detected
+FAILED: Model checker failed
+------
+Init
+--
+state: {"coordinator":"role Coordinator#0","participants":["role Participant#0","role Participant#1"]}
+Coordinator#0: fields(status = "init")
+Participant#0: fields(status = "init")
+Participant#1: fields(status = "init")
+------
+Coordinator#0.Checkout
+--
+Coordinator#0: fields(status = "inprogress")
+Participant#0: fields(status = "init")
+Participant#1: fields(status = "init")
+------
+crash
+--
+Coordinator#0: fields(status = "inprogress")
+Participant#0: fields(status = "init")
+Participant#1: fields(status = "init")
+------
+Writen graph dotfile: /tmp/fizzbee-home-run/error-graph.dot
+Writen error states as html: /tmp/fizzbee-home-run/error-states.html
+ The same run emits graph data for the state explorer. The error graph shows the short path from Init to Checkout to the crash state.
+ Explore visualizations +Convert your model into a test harness for your production code. FizzBee offers Go, Java, and Rust harness support. Connect the harness and let FizzBee drive state exploration.
+ Read the testing guide +use async_trait::async_trait;
+use fizzbee_mbt::{
+ run_mbt_test,
+ traits::{DispatchModel, Model},
+ types::{Arg, RoleId},
+ value::Value,
+ TestOptions,
+};
+
+struct BookingHarness {
+ service: TravelBookingService,
+}
+
+#[async_trait]
+impl Model for BookingHarness {
+ async fn init(&mut self) -> Result<(), fizzbee_mbt::error::MbtError> {
+ self.service.reset().await?;
+ Ok(())
+ }
+
+ async fn cleanup(&mut self) -> Result<(), fizzbee_mbt::error::MbtError> {
+ self.service.close().await?;
+ Ok(())
+ }
+}
+
+#[async_trait]
+impl DispatchModel for BookingHarness {
+ async fn execute(
+ &self,
+ role_id: &RoleId,
+ function_name: &str,
+ args: &[Arg],
+ ) -> Result<Value, fizzbee_mbt::error::MbtError> {
+ match (role_id.role_name.as_str(), function_name) {
+ ("Coordinator", "Checkout") => self.service.checkout(args).await,
+ ("Participant", "placehold") => self.service.placehold(role_id.index).await,
+ _ => Ok(Value::None),
+ }
+ }
+
+ fn get_roles(&self) -> Result<Vec<RoleId>, fizzbee_mbt::error::MbtError> {
+ Ok(vec![RoleId { role_name: "Coordinator".into(), index: 0 }])
+ }
+}
+
+#[test]
+fn checkout_matches_model() {
+ run_mbt_test(
+ BookingHarness::new(),
+ TestOptions { max_actions: Some(12), max_parallel_runs: Some(32), ..Default::default() },
+ ).unwrap();
+}
+ FizzBee upholds the rigor of TLA+ while making formal verification simpler and more accessible for engineers. By leveraging Python, it reduces the learning curve, with the potential to surpass TLA+ as the go-to tool for engineers.+
I discovered FizzBee while designing the manifest for SlateDB, an embedded key-value store. FizzBee's concepts were easy to grasp in hours, and by the next day, I had a working spec that uncovered a real concurrency bug!+
FizzBee's Python-like syntax made it easy to learn and use, unlike other formal methods languages. I picked it up over a weekend and successfully modeled our streaming ingestion platform to identify correctness bugs. It's intuitive and incredibly effective!+
FizzBee cured my fear of formal methods after struggling with TLA+ years ago. It's surprisingly easy to learn and a refreshing experience, something I never thought I could master. Universities should teach FizzBee!+
Tap Homebrew, install the CLI, and add AI agent skills.
+brew tap fizzbee-io/fizzbee
+brew install fizzbee
+fizz install-skills
+ diff --git a/layouts/partials/head/custom.html b/layouts/partials/head/custom.html index 509639a..e1a3e0e 100644 --- a/layouts/partials/head/custom.html +++ b/layouts/partials/head/custom.html @@ -1,38 +1,106 @@ - - + + + + + + - - - - \ No newline at end of file + + diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..0e13098 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,41 @@ + diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html index 6e644a5..af3672a 100644 --- a/layouts/partials/site-footer.html +++ b/layouts/partials/site-footer.html @@ -1,46 +1,24 @@ -