MOBICAL(1)

πŸ’– MOBICAL(1) πŸ’–

okay bestie, so this is mobical, aka the Model Based Tester for CaDiCaL ✨ she lives in the User Commands section of your manual, and she is literally the girl who finds bugs by vibing with random traces until something breaks. main character energy fr fr πŸŽ€


🌸 NAME 🌸

mobical β€” Model Based Tester for CaDiCaL πŸ’…


✨ DESCRIPTION ✨

so basically, the usage is:

usage: mobical [ <option> ... ] [ <mode> ]

where <option> can be one of the following 🫢

  • --help | -h β€” print this command line option summary and dip out, no cap
  • --version β€” print CaDiCaL's three character version and exit
  • --build β€” print build configuration
  • -v | --verbose β€” increase verbosity, she's a yapper now
  • -q | --quiet β€” be quiet (only print failing and reduced traces)
  • --colors β€” force colors for both <stdout> and <stderr>
  • --no-colors β€” disable colors if <stderr> is connected to terminal
  • --no-terminal β€” assume <stderr> is not connected to terminal
  • --no-seeds β€” do not print seeds in random mode
  • -<n> β€” specify the number of solving phases explicitly
  • --time <seconds> β€” set time limit per trace (none=0, default=10) ⏰
  • --space <MB> β€” set space limit (none=0, default=1024) 🧠
  • --bad-alloc β€” generate failing memory allocations, monitor for crashes πŸ’€
  • --leak-alloc β€” generate failing memory allocations, monitor for leaks 🚰
  • --do-not-ignore-resource-limits β€” consider out-of-time or memory as error
  • --tiny β€” generate tiny formulas only
  • --small β€” generate small formulas only
  • --medium β€” generate medium sized formulas only
  • --big β€” generate big formulas only

πŸ¦‹ and then <mode> is one of these πŸ¦‹

  • <seed> β€” generate and execute trace for given 64-bit seed 🌱
  • <seed> <output> β€” generate trace, shrink and write it to file
  • <input> <output> β€” read trace, shrink and write it to output file
  • <input> β€” read and replay the specified input trace

in order to let the test execute <r> runs (starting from <seed>) use:

-L[ ]<r>
  • -L[ ]<r> β€” execute <r> runs πŸ”

the output trace is not shrunken if it is not failing. however, before it is written it is executed, unless --do-not-execute is specified:

  • --do-not-execute β€” just write to <output> without execution πŸ™ˆ

in order to check memory issues or collect coverage you can force execution within the main process, which however also means that the model based tester aborts as soon a test fails 😭 so like, be aware bestie:

  • --do-not-fork β€” execute all tests in main process directly

in order to replay a trace which violates an API contract use:

  • --do-not-enforce-contracts

to read from <stdin> use - as <input> and also - instead of <output> to write to <stdout> πŸ’«

as the library is compiled with logging support (-DLOGGING) one can force to add the set log 1 call to the trace with:

  • --log | -l β€” force low-level logging for detailed debugging πŸ”

implicitly add dump and stats calls to traces:

  • --dump | -d β€” force dumping the CNF before every solve
  • --stats | -s β€” force printing statistics after every solve

implicitly add configure plain after setting options:

  • --plain | -p

otherwise, if no <mode> is specified, the default is to generate random traces internally until the execution of a trace fails, which means it produces a non-zero exit code. then the trace is rerun and shrunken through delta-debugging to produce a smaller trace. the shrunken failing trace is written as red-<seed>.trace to the current working directory 🩸 (not me, that's literally the filename).


πŸ’œ options that disable parts of the shrinking algorithm πŸ’œ

the following options disable certain parts of the shrinking algorithm:

  • --do-not-shrink[-at-all]
  • --do-not-add-options[-before-shrinking]
  • --do-not-shrink-phases
  • --do-not-shrink-clauses
  • --do-not-shrink-literals
  • --do-not-shrink-basic[-calls]
  • --do-not-disable[-options]
  • --do-not-reduce[[-option]-values]
  • --do-not-shrink-variables
  • --do-not-shrink-options

🧚 the standard mode 🧚

the standard mode of using the model based tester is to start it in random testing mode without <input>, <seed> nor <output> option. if a failing trace is found it will be shrunken and the resulting trace written to the current working directory. then the model based tester can be interrupted and then called again with the produced failing trace as single argument ✨

this second invocation will execute the trace within the same process and thus can directly be investigated with a symbolic debugger such as gdb or maybe first checked for memory issues with valgrind or recompilation with memory checking -fsanitize=address πŸ”₯


okay that's the whole vibe check, bestie. go forth and shrink traces πŸ’…

mobical 2.2.1 🌈 April 2026 β€” that's the version and date, love u, bye πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from