BDD JSON Writer

This transformation saves an in-memory BDD to a JSON file with the dd library’s JSON format. It works with both dd engines (the pure-Python one and CUDD), so it is the portable way to store a compiled BDD and load it back later with the BDD JSON Reader. The file extension for this file is .json


Code Examples

from flamapy.metamodels.bdd_metamodel.transformations import JSONWriter

# Save the BDD to a JSON file
JSONWriter(path='path/to/save/bdd.json', source_model=bdd_model).transform()