├── bymc ├── verify ├── .ocamlinit ├── doc │ ├── img │ │ ├── after-login.png │ │ ├── pml-output-annotated.png │ │ ├── ta-output-annotated.png │ │ └── ta-output-annotated2.png │ └── forte20.md ├── .merlin ├── src │ ├── taErr.ml │ ├── taIrBridge.mli │ ├── chainFactory.mli │ ├── runtime.ml │ ├── spinTypes.mli │ ├── taSource.ml │ ├── msat.ml │ ├── msat.mli │ ├── spinTypes.ml │ ├── summary.mli │ ├── msatLoader.ml │ ├── revTrans.ml │ ├── fastPlugin.ml │ ├── trc.ml │ ├── parse.mli │ ├── varRolePlugin.ml │ ├── piaDom.mli │ ├── spinParserState.mli │ ├── varRole.mli │ ├── porBoundsPlugin.ml │ ├── pSet.mli │ ├── instantiationPlugin.ml │ ├── pipeCmd.mli │ ├── skelStruc.mli │ ├── symbSkelNusmvPlugin.ml │ ├── piaDataCtx.ml │ ├── taParser.ml │ ├── promelaToTaPlugin.ml │ ├── stmtIns.ml │ ├── piaDomPlugin.ml │ ├── schemaOpt.mli │ ├── absSimple.ml │ ├── schemaOpt.ml │ ├── spinParserState.ml │ ├── pSet.ml │ └── absBasics.ml ├── test │ ├── test1.pml │ ├── unitTests.ml │ ├── ic.ta │ ├── test3.pml │ ├── test4.pml │ ├── test2-4.pml │ ├── test2-6.pml │ ├── extract-tests.py │ ├── test2-8.pml │ ├── schemaSmtTest.ml │ ├── refinement1.pml │ ├── test5.pml │ └── bcast-byz-ta-synt-rc.ta ├── script │ ├── realpath.py │ ├── make-dist │ ├── verdict-to-table │ ├── scan-yices-log.py │ ├── collect-verdict │ ├── verdict-to-csv.py │ ├── nl.py │ ├── mod-verify-spin.sh │ ├── ggetopt.py │ └── mod-verify-nusmv-bdd.sh ├── make.sh ├── verifypa-post ├── _tags ├── CHANGES ├── LICENSE ├── verifypa-fast ├── verifypa-spin ├── analyse └── Makefile ├── legacy-deps ├── pycudd2.0.2 │ ├── cudd-2.4.2 │ │ ├── include │ │ │ ├── st.h │ │ │ ├── cudd.h │ │ │ ├── epd.h │ │ │ ├── mtr.h │ │ │ ├── util.h │ │ │ ├── dddmp.h │ │ │ ├── cuddInt.h │ │ │ ├── cuddObj.hh │ │ │ └── mnemosyne.h │ │ ├── shutdown.sh │ │ ├── mtr │ │ │ ├── test.groups │ │ │ └── Makefile.sis │ │ ├── cudd │ │ │ ├── doc │ │ │ │ ├── img1.png │ │ │ │ ├── img10.png │ │ │ │ ├── img11.png │ │ │ │ ├── img12.png │ │ │ │ ├── img13.png │ │ │ │ ├── img14.png │ │ │ │ ├── img15.png │ │ │ │ ├── img16.png │ │ │ │ ├── img17.png │ │ │ │ ├── img18.png │ │ │ │ ├── img19.png │ │ │ │ ├── img2.png │ │ │ │ ├── img20.png │ │ │ │ ├── img21.png │ │ │ │ ├── img22.png │ │ │ │ ├── img3.png │ │ │ │ ├── img4.png │ │ │ │ ├── img5.png │ │ │ │ ├── img6.png │ │ │ │ ├── img7.png │ │ │ │ ├── img8.png │ │ │ │ ├── img9.png │ │ │ │ ├── icons │ │ │ │ │ ├── next.png │ │ │ │ │ ├── prev.png │ │ │ │ │ ├── up.png │ │ │ │ │ ├── up_g.png │ │ │ │ │ ├── ch_end.png │ │ │ │ │ ├── image.png │ │ │ │ │ ├── index.png │ │ │ │ │ ├── next_g.png │ │ │ │ │ ├── nx_grp.png │ │ │ │ │ ├── prev_g.png │ │ │ │ │ ├── pv_grp.png │ │ │ │ │ ├── blueball.png │ │ │ │ │ ├── ch_beg_r.png │ │ │ │ │ ├── ch_begin.png │ │ │ │ │ ├── ch_del_r.png │ │ │ │ │ ├── ch_delet.png │ │ │ │ │ ├── ch_end_r.png │ │ │ │ │ ├── contents.png │ │ │ │ │ ├── crossref.png │ │ │ │ │ ├── footnote.png │ │ │ │ │ ├── greenball.png │ │ │ │ │ ├── nx_grp_g.png │ │ │ │ │ ├── pinkball.png │ │ │ │ │ ├── pv_grp_g.png │ │ │ │ │ ├── redball.png │ │ │ │ │ ├── whiteball.png │ │ │ │ │ ├── orangeball.png │ │ │ │ │ ├── purpleball.png │ │ │ │ │ └── yellowball.png │ │ │ │ ├── cuddExt.html │ │ │ │ ├── cuddAllByFunc.html │ │ │ │ ├── cuddAllByFile.html │ │ │ │ ├── cuddTitle.html │ │ │ │ ├── cuddDesc.html │ │ │ │ ├── cuddIntro.css │ │ │ │ └── footnode.html │ │ │ └── r7x8.1.mat │ │ ├── util │ │ │ ├── ptime.c │ │ │ ├── strsav.c │ │ │ ├── prtime.c │ │ │ ├── tmpfile.c │ │ │ ├── test-sav.c │ │ │ ├── datalimit.c │ │ │ ├── test-res.c │ │ │ ├── texpand.c │ │ │ ├── stub.c │ │ │ ├── Makefile │ │ │ ├── getopt.c │ │ │ ├── cpu_time.c │ │ │ └── pathsearch.c │ │ ├── dddmp │ │ │ ├── exp │ │ │ │ ├── composeids.txt │ │ │ │ ├── one.bdd │ │ │ │ ├── zero.bdd │ │ │ │ ├── runAllTest.script │ │ │ │ ├── s27RP1.bdd │ │ │ │ ├── 0.bdd │ │ │ │ ├── 0.add │ │ │ │ ├── varauxids.ord │ │ │ │ ├── varnames.ord │ │ │ │ ├── s27deltaDddmp1.bdd │ │ │ │ ├── 5.bdd │ │ │ │ ├── s27deltaDddmp1.bdd.bis │ │ │ │ ├── s27deltaDddmp2.bdd │ │ │ │ ├── test1.script │ │ │ │ ├── 4bis.bdd │ │ │ │ ├── 1.add │ │ │ │ ├── test2.script │ │ │ │ ├── test5.script │ │ │ │ ├── test3.script │ │ │ │ ├── test4.script │ │ │ │ ├── test6.script │ │ │ │ ├── 4.bdd │ │ │ │ ├── test2.out │ │ │ │ ├── test3.out │ │ │ │ ├── test4.out │ │ │ │ ├── test5.out │ │ │ │ ├── 2and3.bdd │ │ │ │ ├── 4.bdd.bis1 │ │ │ │ ├── 4.bdd.bis2 │ │ │ │ ├── 4.bdd.bis3 │ │ │ │ └── 4.bdd.bis4 │ │ │ ├── doc │ │ │ │ ├── cmdIndex.html │ │ │ │ ├── commands.html │ │ │ │ ├── packages.html │ │ │ │ ├── dddmpExt.html │ │ │ │ ├── dddmpAllByFile.html │ │ │ │ ├── dddmpAllByFunc.html │ │ │ │ ├── pkgIndex.html │ │ │ │ ├── dddmpTitle.html │ │ │ │ ├── credit.html │ │ │ │ └── dddmpDesc.html │ │ │ ├── README.dddmp │ │ │ └── RELEASE_NOTES │ │ ├── nanotrav │ │ │ ├── C17.blif │ │ │ ├── tst.sh │ │ │ ├── s27.blif │ │ │ ├── doc │ │ │ │ ├── bnetAllAbs.html │ │ │ │ └── bnetExtAbs.html │ │ │ └── README │ │ ├── setup.sh │ │ ├── mnemosyne │ │ │ ├── mtest.c │ │ │ ├── Makefile │ │ │ └── README │ │ ├── epd │ │ │ └── Makefile │ │ ├── st │ │ │ └── Makefile │ │ ├── RELEASE.NOTES │ │ └── LICENSE │ └── pycudd │ │ ├── docstring │ │ ├── externs.i │ │ ├── ddgen.i │ │ ├── example3.py │ │ ├── example1.py │ │ ├── tlcinfo.i │ │ ├── UNIMPLEMENTED │ │ └── example2.py ├── README-pycudd.txt └── ltl2ba-1.1 │ ├── README │ └── Makefile ├── plugins └── mathsat4ml │ ├── plugin │ ├── mathsat4ml.mllib │ ├── .merlin │ ├── _tags │ ├── mlsrc │ │ ├── msat.mli │ │ └── mathsat4ml.ml │ └── Makefile │ └── test-plugin │ ├── Makefile │ ├── _tags │ └── src │ ├── msat.mli │ └── msat.ml ├── legacy-bddc ├── test1.bdd └── with-pycudd ├── run-tests ├── LICENSE └── README.md /bymc/verify: -------------------------------------------------------------------------------- 1 | verifypa-schema -------------------------------------------------------------------------------- /bymc/.ocamlinit: -------------------------------------------------------------------------------- 1 | #directory "_build/src";; 2 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/st.h: -------------------------------------------------------------------------------- 1 | ../st/st.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/cudd.h: -------------------------------------------------------------------------------- 1 | ../cudd/cudd.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/epd.h: -------------------------------------------------------------------------------- 1 | ../epd/epd.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/mtr.h: -------------------------------------------------------------------------------- 1 | ../mtr/mtr.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/util.h: -------------------------------------------------------------------------------- 1 | ../util/util.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/dddmp.h: -------------------------------------------------------------------------------- 1 | ../dddmp/dddmp.h -------------------------------------------------------------------------------- /plugins/mathsat4ml/plugin/mathsat4ml.mllib: -------------------------------------------------------------------------------- 1 | Mathsat4ml 2 | Msat 3 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/cuddInt.h: -------------------------------------------------------------------------------- 1 | ../cudd/cuddInt.h -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/cuddObj.hh: -------------------------------------------------------------------------------- 1 | ../obj/cuddObj.hh -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/include/mnemosyne.h: -------------------------------------------------------------------------------- 1 | ../mnemosyne/mnemosyne.h -------------------------------------------------------------------------------- /plugins/mathsat4ml/plugin/.merlin: -------------------------------------------------------------------------------- 1 | S mlsrc 2 | B _build/mlsrc 3 | PKG ctypes.foreign 4 | -------------------------------------------------------------------------------- /legacy-deps/README-pycudd.txt: -------------------------------------------------------------------------------- 1 | pycudd requires the following packages: swig, python-devel 2 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/shutdown.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | rm -rf include *.bak *~ 3 | -------------------------------------------------------------------------------- /bymc/doc/img/after-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/bymc/doc/img/after-login.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/mtr/test.groups: -------------------------------------------------------------------------------- 1 | 0 6 D 2 | 6 6 F 3 | 0 2 D 4 | 2 2 D 5 | 4 2 D 6 | -------------------------------------------------------------------------------- /legacy-deps/ltl2ba-1.1/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/ltl2ba-1.1/README -------------------------------------------------------------------------------- /bymc/doc/img/pml-output-annotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/bymc/doc/img/pml-output-annotated.png -------------------------------------------------------------------------------- /bymc/doc/img/ta-output-annotated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/bymc/doc/img/ta-output-annotated.png -------------------------------------------------------------------------------- /bymc/doc/img/ta-output-annotated2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/bymc/doc/img/ta-output-annotated2.png -------------------------------------------------------------------------------- /bymc/.merlin: -------------------------------------------------------------------------------- 1 | S src 2 | S test 3 | B _build/src 4 | B _build/test 5 | PKG threads batteries ocamlgraph oUnit sexplib mpi Z3 6 | -------------------------------------------------------------------------------- /bymc/src/taErr.ml: -------------------------------------------------------------------------------- 1 | (* Errors related to threshold automata *) 2 | 3 | exception SyntaxErr of string 4 | exception SemanticErr of string 5 | 6 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img1.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img10.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img11.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img12.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img13.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img14.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img15.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img16.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img17.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img18.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img19.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img2.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img20.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img21.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img22.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img3.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img4.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img5.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img6.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img7.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img8.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/img9.png -------------------------------------------------------------------------------- /bymc/src/taIrBridge.mli: -------------------------------------------------------------------------------- 1 | (** 2 | This module translates TaIr.ta_t to SymbSkel.skel_t. 3 | *) 4 | 5 | val skel_of_ta: TaIr.Ta.ta_t -> SymbSkel.Sk.skel_t 6 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/next.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/prev.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/up.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/up_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/up_g.png -------------------------------------------------------------------------------- /bymc/test/test1.pml: -------------------------------------------------------------------------------- 1 | proctype P(int a; short b) { 2 | int x = a; 3 | if 4 | :: a == 1 -> x = b; 5 | :: a == 2 -> x = 0; 6 | fi; 7 | } 8 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_end.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/image.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/index.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/next_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/next_g.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/nx_grp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/nx_grp.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/prev_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/prev_g.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pv_grp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pv_grp.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/blueball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/blueball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_beg_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_beg_r.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_begin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_begin.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_del_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_del_r.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_delet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_delet.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_end_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/ch_end_r.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/contents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/contents.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/crossref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/crossref.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/footnote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/footnote.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/greenball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/greenball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/nx_grp_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/nx_grp_g.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pinkball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pinkball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pv_grp_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/pv_grp_g.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/redball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/redball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/whiteball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/whiteball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/orangeball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/orangeball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/purpleball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/purpleball.png -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/yellowball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konnov/bymc/HEAD/legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/icons/yellowball.png -------------------------------------------------------------------------------- /bymc/script/realpath.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # a portable version of readlink -f (should work with Linux and MacOS) 4 | import os 5 | import sys 6 | 7 | print os.path.realpath(sys.argv[1]) 8 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/ptime.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | #include "util.h" 3 | 4 | /* backwards compatibility */ 5 | long 6 | ptime() 7 | { 8 | return util_cpu_time(); 9 | } 10 | -------------------------------------------------------------------------------- /bymc/src/chainFactory.mli: -------------------------------------------------------------------------------- 1 | (* The place where the standard plugin chains are constructed. 2 | * 3 | * Igor Konnov, 2014 4 | *) 5 | 6 | val create_chain: Options.input_t -> string -> Plugin.plugin_chain_t 7 | 8 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/composeids.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 2 3 | 4 4 | 6 5 | 8 6 | 10 7 | 12 8 | 14 9 | 16 10 | 18 11 | 20 12 | 22 13 | 24 14 | 26 15 | 28 16 | 30 17 | 32 18 | 34 19 | 36 20 | 38 21 | -------------------------------------------------------------------------------- /bymc/src/runtime.ml: -------------------------------------------------------------------------------- 1 | open Infra 2 | open Smt 3 | 4 | class runtime_t (i_solver: smt_solver) (i_caches: pass_caches) = 5 | object 6 | method solver = i_solver 7 | 8 | method caches = i_caches 9 | end 10 | 11 | -------------------------------------------------------------------------------- /legacy-bddc/test1.bdd: -------------------------------------------------------------------------------- 1 | (let R (exists [2 5] 2 | (and (or (and 0 1) (and (not 0) (not 1))) 3 | (or (and 2 3) (and (not 2) (not 3))) 4 | (or (and 3 5) (and (not 3) (not 5))) 5 | (or (and 1 5) (and (not 1) (not 5))) 6 | ))) 7 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/one.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-1.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 1 5 | .nvars 100 6 | .nsuppvars 0 7 | .ids 8 | .permids 9 | .nroots 1 10 | .rootids 1 11 | .nodes 12 | 1 T 1 0 0 13 | .end 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/zero.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-1.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 1 5 | .nvars 100 6 | .nsuppvars 0 7 | .ids 8 | .permids 9 | .nroots 1 10 | .rootids -1 11 | .nodes 12 | 1 T 1 0 0 13 | .end 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/runAllTest.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # Run All Test Files 4 | # 5 | ./test1.script 6 | ./test2.script 7 | ./test3.script 8 | ./test4.script 9 | ./test5.script 10 | ./test6.script 11 | ./test7.script 12 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/docstring: -------------------------------------------------------------------------------- 1 | #define DOCSTRING PyCUDD 2.0.1\n\ 2 | Python interface to Colorado University Decision Diagram package\n\ 3 | With BREL support\n\ 4 | Compiled on __DATE__, __TIME__\nBugs to:aravind@engr.ucsb.edu 5 | DOCSTRING 6 | 7 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/cmdIndex.html: -------------------------------------------------------------------------------- 1 | 2 | Command Documentation 3 | 4 | 5 |

Command Documentation


6 |
7 |
8 | Last updated on 1040218 17h15 9 | 10 | -------------------------------------------------------------------------------- /bymc/src/spinTypes.mli: -------------------------------------------------------------------------------- 1 | type var_type = TBIT | TBYTE | TSHORT 2 | | TINT | TUNSIGNED | TCHAN | TMTYPE | TPROPOSITION | TUNDEF;; 3 | type xu_type = XS | XR;; 4 | 5 | val var_type_s: 6 | var_type -> string;; 7 | 8 | val xu_type_s: 9 | xu_type -> string;; 10 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/test-plugin/Makefile: -------------------------------------------------------------------------------- 1 | TARGET=test_plugin 2 | OCFLAGS= 3 | 4 | all: $(TARGET).native 5 | ./$(TARGET).native --load 1 6 | 7 | $(TARGET).native: src/*.ml 8 | ocamlbuild ${OCFLAGS} -use-ocamlfind ./$(TARGET).native 9 | 10 | clean: 11 | ocamlbuild -clean 12 | 13 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/test-plugin/_tags: -------------------------------------------------------------------------------- 1 | # ocamlbuild tags 2 | # 3 | # check the documentation at: http://brion.inria.fr/gallium/index.php/Tags 4 | 5 | : include 6 | <**/*.native>: package(ctypes.foreign), use_dynlink 7 | 8 | : package(ctypes.foreign), use_dynlink 9 | 10 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/plugin/_tags: -------------------------------------------------------------------------------- 1 | # ocamlbuild tags 2 | # 3 | # check the documentation at: http://brion.inria.fr/gallium/index.php/Tags 4 | 5 | : include 6 | <**/*.cmxs>: package(ctypes.foreign), package(batteries) 7 | 8 | : package(ctypes.foreign), package(batteries) 9 | 10 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/strsav.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | 7 | /* 8 | * util_strsav -- save a copy of a string 9 | */ 10 | char * 11 | util_strsav(char const *s) 12 | { 13 | return strcpy(ALLOC(char, strlen(s)+1), s); 14 | } 15 | -------------------------------------------------------------------------------- /bymc/src/taSource.ml: -------------------------------------------------------------------------------- 1 | 2 | (** 3 | An abstraction of a plugin that produces a TA, e.g., SymbSkel.symb_skel_t 4 | *) 5 | class virtual ta_source_t = 6 | object 7 | (** 8 | Get the constructed TA. 9 | *) 10 | method virtual get_ta: SymbSkel.Sk.skel_t 11 | end 12 | 13 | -------------------------------------------------------------------------------- /legacy-bddc/with-pycudd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR=`dirname $0` 4 | PYCUDD=`cd $DIR/../deps/pycudd2.0.2/pycudd/; pwd` 5 | CUDD=`cd $DIR/../deps/pycudd2.0.2/cudd-2.4.2/; pwd` 6 | echo "PYCUDD=$PYCUDD" 7 | export LD_LIBRARY_PATH="$PYCUDD:$CUDD/lib:$LD_LIBRARY_PATH" 8 | export PYTHONPATH="$PYCUDD:$PYTHONPATH" 9 | 10 | python $@ 11 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/s27RP1.bdd: -------------------------------------------------------------------------------- 1 | # MONO 2 | .ver DDDMP-1.0 3 | .mode A 4 | .varinfo 3 5 | .nnodes 3 6 | .nvars 10 7 | .nsuppvars 2 8 | .varnames G5 G6 9 | .ids 4 5 10 | .permids 4 6 11 | .auxids 4 5 12 | .nroots 1 13 | .rootids -3 14 | .nodes 15 | 1 T 1 0 0 16 | 2 5 1 1 -1 17 | 3 4 0 2 -1 18 | .end 19 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/commands.html: -------------------------------------------------------------------------------- 1 | 2 | Command Documentation 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/packages.html: -------------------------------------------------------------------------------- 1 | 2 | Package Documentation 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bymc/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # back compat: now we just use make 4 | 5 | echo "*************************************************************************" 6 | echo " WARNING: this script will be removed in the future versions. Use make." 7 | echo "*************************************************************************" 8 | echo "" 9 | 10 | make 11 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/0.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 5 5 | .nvars 50 6 | .nsuppvars 3 7 | .suppvarnames DUMMY1 DUMMY2 DUMMY3 8 | .ids 1 2 3 9 | .permids 1 2 3 10 | .auxids 1 2 3 11 | .nroots 1 12 | .rootids -5 13 | .nodes 14 | 1 T 1 0 0 15 | 2 3 2 1 -1 16 | 3 2 1 1 2 17 | 4 2 1 1 -2 18 | 5 1 0 3 4 19 | .end 20 | -------------------------------------------------------------------------------- /run-tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # The script file to run the tests from buildbot 4 | # 5 | # Igor Konnov, 2014 6 | 7 | case $1 in 8 | unit) 9 | cd bymc 10 | make test 11 | ;; 12 | 13 | integrate) 14 | cd bymc 15 | make integrate 16 | ;; 17 | 18 | *) 19 | echo "Unexpected parameter: $1" 20 | esac 21 | -------------------------------------------------------------------------------- /bymc/script/make-dist: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$1" = "" ]; then 4 | echo "Specify the version first" 5 | exit 1 6 | fi 7 | 8 | VERSION="$1" 9 | DATE=`date '+%Y%m%d'` 10 | NAME="bymc-src-${VERSION}-${DATE}" 11 | 12 | echo "git archive --prefix="${NAME}/" ${VERSION} | bzip2 > ${NAME}.tar.bz2" 13 | git archive --prefix="$NAME/" ${VERSION} | bzip2 > ${NAME}.tar.bz2 14 | 15 | -------------------------------------------------------------------------------- /bymc/verifypa-post: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < int) ref 4 | val p_destroy: (int -> unit) ref 5 | val p_declare_int: (int -> string -> unit) ref 6 | val p_assert: (int -> string -> int) ref 7 | val p_solve: (int -> int) ref 8 | val p_push: (int -> unit) ref 9 | val p_pop: (int -> unit) ref 10 | val p_get_model_value: (int -> string -> string) ref 11 | 12 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/test-plugin/src/msat.mli: -------------------------------------------------------------------------------- 1 | val is_loaded: bool ref 2 | 3 | val p_create: (unit -> int) ref 4 | val p_destroy: (int -> unit) ref 5 | val p_declare_int: (int -> string -> unit) ref 6 | val p_assert: (int -> string -> int) ref 7 | val p_solve: (int -> int) ref 8 | val p_push: (int -> unit) ref 9 | val p_pop: (int -> unit) ref 10 | val p_get_model_value: (int -> string -> string) ref 11 | 12 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/externs.i: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////// 2 | // 3 | // extern declarations used to make the typemaps work 4 | // Note that the extern declaration for the default manager comes from pycudd.h 5 | // 6 | ///////////////////////////////////////////////// 7 | 8 | %{ 9 | extern DdNode ***glob_conj; 10 | extern DdNode **node_iter; 11 | extern int **cube_iter; 12 | %} 13 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddExt.html: -------------------------------------------------------------------------------- 1 | 2 | The cudd Package for Programmers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddAllByFunc.html: -------------------------------------------------------------------------------- 1 | 2 | The cudd package for maintainers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/dddmpExt.html: -------------------------------------------------------------------------------- 1 | 2 | The dddmp Package for Programmers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddAllByFile.html: -------------------------------------------------------------------------------- 1 | 2 | The cudd package for maintainers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/dddmpAllByFile.html: -------------------------------------------------------------------------------- 1 | 2 | The dddmp package for maintainers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/dddmpAllByFunc.html: -------------------------------------------------------------------------------- 1 | 2 | The dddmp package for maintainers 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/C17.blif: -------------------------------------------------------------------------------- 1 | .model C17.iscas 2 | .inputs 1GAT(0) 2GAT(1) 3GAT(2) 6GAT(3) 7GAT(4) 3 | .outputs 22GAT(10) 23GAT(9) 4 | .names 3GAT(2) 6GAT(3) 11GAT(5) 5 | 11 0 6 | .names 1GAT(0) 3GAT(2) 10GAT(6) 7 | 11 0 8 | .names 11GAT(5) 7GAT(4) 19GAT(7) 9 | 11 0 10 | .names 2GAT(1) 11GAT(5) 16GAT(8) 11 | 11 0 12 | .names 16GAT(8) 19GAT(7) 23GAT(9) 13 | 11 0 14 | .names 10GAT(6) 16GAT(8) 22GAT(10) 15 | 11 0 16 | .end 17 | -------------------------------------------------------------------------------- /bymc/src/msat.ml: -------------------------------------------------------------------------------- 1 | open BatPrintf 2 | 3 | let is_loaded = ref false 4 | 5 | let p_create = ref (fun () -> 0) 6 | let p_destroy = ref (fun (_: int) -> ()) 7 | let p_declare_int = ref (fun (_: int) (_: string) -> ()) 8 | let p_assert = ref (fun (_: int) (_: string) -> 0) 9 | let p_solve = ref (fun (_: int) -> 0) 10 | let p_push = ref (fun (_: int) -> ()) 11 | let p_pop = ref (fun (_: int) -> ()) 12 | let p_get_model_value = ref (fun (_: int) (_: string) -> "") 13 | 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/pkgIndex.html: -------------------------------------------------------------------------------- 1 | 2 | Package Documentation 3 | 4 |

Package Documentation


5 | 6 | 7 | 9 | 10 |
dddmpFunctions to read in and write out BDDs, ADDs 8 |
11 |
12 | Last updated on 1040218 17h15 13 | 14 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/test-plugin/src/msat.ml: -------------------------------------------------------------------------------- 1 | let is_loaded = ref false 2 | 3 | let p_create = ref (fun () -> 0) 4 | let p_destroy = ref (fun (_: int) -> ()) 5 | let p_declare_int = ref (fun (_: int) (_: string) -> ()) 6 | let p_assert = ref (fun (_: int) (_: string) -> 0) 7 | let p_solve = ref (fun (_: int) -> 0) 8 | let p_push = ref (fun (_: int) -> ()) 9 | let p_pop = ref (fun (_: int) -> ()) 10 | let p_get_model_value = ref (fun (_: int) (_: string) -> "") 11 | 12 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/tst.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # $Id: tst.sh,v 1.2 1998/05/03 08:41:38 fabio Exp fabio $ 4 | # 5 | ./nanotrav -p 1 -cover C17.blif > C17.tst 6 | ./nanotrav -p 1 -ordering dfs -autodyn -automethod sifting -reordering sifting -drop C880.blif > C880.tst 7 | ./nanotrav -p 1 -trav s27.blif > s27.tst 8 | ./nanotrav -p 1 -autodyn -reordering sifting -trav mult32a.blif > mult32a.tst 9 | ./nanotrav -p 1 -envelope rcn25.blif > rcn25.tst 10 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/varauxids.ord: -------------------------------------------------------------------------------- 1 | 1 2 | 3 3 | 5 4 | 7 5 | 9 6 | 11 7 | 13 8 | 15 9 | 17 10 | 19 11 | 21 12 | 23 13 | 25 14 | 27 15 | 29 16 | 31 17 | 33 18 | 35 19 | 37 20 | 39 21 | 41 22 | 43 23 | 45 24 | 47 25 | 49 26 | 51 27 | 53 28 | 55 29 | 57 30 | 59 31 | 61 32 | 63 33 | 65 34 | 67 35 | 69 36 | 71 37 | 73 38 | 75 39 | 77 40 | 79 41 | 81 42 | 83 43 | 85 44 | 87 45 | 89 46 | 91 47 | 93 48 | 95 49 | 97 50 | 99 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | CREATE="ln -s" 3 | if test -d include 4 | then 5 | : 6 | else 7 | mkdir include 8 | cd include 9 | $CREATE ../cudd/cudd.h . 10 | $CREATE ../cudd/cuddInt.h . 11 | $CREATE ../epd/epd.h . 12 | $CREATE ../dddmp/dddmp.h . 13 | $CREATE ../mtr/mtr.h . 14 | $CREATE ../obj/cuddObj.hh . 15 | $CREATE ../st/st.h . 16 | $CREATE ../util/util.h . 17 | $CREATE ../mnemosyne/mnemosyne.h . 18 | fi 19 | -------------------------------------------------------------------------------- /bymc/src/msat.mli: -------------------------------------------------------------------------------- 1 | (* Function table for linking mathsat4ml plugin to bymc. 2 | * 3 | * Igor Konnov, 2014 4 | *) 5 | 6 | 7 | val is_loaded: bool ref 8 | 9 | val p_create: (unit -> int) ref 10 | val p_destroy: (int -> unit) ref 11 | val p_declare_int: (int -> string -> unit) ref 12 | val p_assert: (int -> string -> int) ref 13 | val p_solve: (int -> int) ref 14 | val p_push: (int -> unit) ref 15 | val p_pop: (int -> unit) ref 16 | val p_get_model_value: (int -> string -> string) ref 17 | 18 | -------------------------------------------------------------------------------- /bymc/script/verdict-to-table: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | out_name="`basename $1 .csv`.tex" 6 | 7 | if echo "$1" | grep -q concrete; then 8 | ../tools/bymc/csv-to-tex.py $1 "$out_name" "04:sys,02:param,05:spec,01:valid,14:SpinTime,15:SpinMemory,12:Stored,13:Transitions,16:Depth" 9 | else 10 | ../tools/bymc/csv-to-tex.py $1 "$out_name" "04:sys,05:spec,01:valid,14:SpinTime,15:SpinMemory,12:Stored,13:Transitions,16:Depth,03:refinements,06:total-sec" 11 | fi 12 | 13 | echo "Your table is delivered to $out_name" 14 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/prtime.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | 7 | /* 8 | * util_print_time -- massage a long which represents a time interval in 9 | * milliseconds, into a string suitable for output 10 | * 11 | * Hack for IBM/PC -- avoids using floating point 12 | */ 13 | 14 | char * 15 | util_print_time(unsigned long t) 16 | { 17 | static char s[40]; 18 | 19 | (void) sprintf(s, "%lu.%02lu sec", t/1000, (t%1000)/10); 20 | return s; 21 | } 22 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/varnames.ord: -------------------------------------------------------------------------------- 1 | V1 2 | V2 3 | V3 4 | V4 5 | V5 6 | V6 7 | V7 8 | V8 9 | V9 10 | V10 11 | V11 12 | V12 13 | V13 14 | V14 15 | V15 16 | V16 17 | V17 18 | V18 19 | V19 20 | V20 21 | V21 22 | V22 23 | V23 24 | V24 25 | V25 26 | V26 27 | V27 28 | V28 29 | V29 30 | V30 31 | V31 32 | V32 33 | V33 34 | V34 35 | V35 36 | V36 37 | V37 38 | V38 39 | V39 40 | V40 41 | V41 42 | V42 43 | V43 44 | V44 45 | V45 46 | V46 47 | V47 48 | V48 49 | V49 50 | V50 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/s27.blif: -------------------------------------------------------------------------------- 1 | .model s27.bench 2 | .inputs G0 G1 G2 G3 3 | .outputs G17 4 | .latch G10 G5 0 5 | .latch G11 G6 0 6 | .latch G13 G7 0 7 | .names G11 G17 8 | 0 1 9 | .names G14 G11 G10 10 | 00 1 11 | .names G5 G9 G11 12 | 00 1 13 | .names G2 G12 G13 14 | 00 1 15 | .names G0 G14 16 | 0 1 17 | .names G14 G6 G8 18 | 11 1 19 | .names G1 G7 G12 20 | 00 1 21 | .names G12 G8 G15 22 | 1- 1 23 | -1 1 24 | .names G3 G8 G16 25 | 1- 1 26 | -1 1 27 | .names G16 G15 G9 28 | 0- 1 29 | -0 1 30 | .end 31 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddTitle.html: -------------------------------------------------------------------------------- 1 | 2 | The cudd package: Title 3 | 4 | 5 | 6 | 7 | 9 | 11 | 13 | 14 |
8 | Programmer view 10 | Maintainer by function 12 | Maintainer by file
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/dddmpTitle.html: -------------------------------------------------------------------------------- 1 | 2 | The dddmp package: Title 3 | 4 | 5 | 6 | 7 | 9 | 11 | 13 | 14 |
8 | Programmer view 10 | Maintainer by function 12 | Maintainer by file
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/credit.html: -------------------------------------------------------------------------------- 1 | 2 | Credit 3 | 4 | 5 | 6 | 8 | 10 | 12 | 13 |
7 | Command Documentation 9 | Package Documentation Generated by 11 | the Ext system
14 | 15 | 16 | -------------------------------------------------------------------------------- /bymc/src/spinTypes.ml: -------------------------------------------------------------------------------- 1 | type var_type = TBIT | TBYTE | TSHORT 2 | | TINT | TUNSIGNED | TCHAN | TMTYPE | TPROPOSITION | TUNDEF 3 | type xu_type = XS | XR 4 | 5 | let var_type_s tp = 6 | match tp with 7 | | TBIT -> "BIT" 8 | | TBYTE -> "BYTE" 9 | | TSHORT -> "SHORT" 10 | | TINT -> "INT" 11 | | TUNSIGNED -> "UNSIGNED" 12 | | TCHAN -> "CHAN" 13 | | TMTYPE -> "MTYPE" 14 | | TPROPOSITION -> "PROPOSITION" 15 | | TUNDEF -> "UNDEFINED" 16 | 17 | let xu_type_s tp = 18 | match tp with 19 | | XS -> "XS" 20 | | XR -> "XR" 21 | 22 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/s27deltaDddmp1.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-1.0 2 | .mode A 3 | .varinfo 0 4 | .dd s27adelta.bdd 5 | .nnodes 16 6 | .nvars 10 7 | .nsuppvars 7 8 | .varnames G0 G1 G2 G3 G5 G6 G7 9 | .ids 0 1 2 3 4 5 6 10 | .permids 0 1 2 3 4 6 8 11 | .auxids 0 1 2 3 4 5 6 12 | .nroots 3 13 | .rootids 6 -13 -16 14 | .nodes 15 | 1 T 1 0 0 16 | 2 6 6 1 -1 17 | 3 4 4 1 2 18 | 4 3 3 3 1 19 | 5 1 1 1 4 20 | 6 0 0 5 -1 21 | 7 5 5 1 -1 22 | 8 4 4 1 -7 23 | 9 5 5 1 -2 24 | 10 4 4 1 -9 25 | 11 3 3 10 8 26 | 12 1 1 8 11 27 | 13 0 0 5 12 28 | 14 2 2 1 -1 29 | 15 2 2 1 -2 30 | 16 1 1 14 15 31 | .end 32 | -------------------------------------------------------------------------------- /bymc/script/scan-yices-log.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | 5 | f = open("yices.log", "r") 6 | pushes = 0 7 | pops = 0 8 | level = 0 9 | for l in f: 10 | if l.strip() == '(push)': 11 | pushes += 1 12 | level += 1 13 | print "pushes = %d" % pushes 14 | elif l.strip() == '(pop)': 15 | level -= 1 16 | pops += 1 17 | 18 | if level < 0: 19 | sys.stdout.write(l) 20 | raise Exception("Context stack is exhausted") 21 | else: 22 | f.close() 23 | 24 | 25 | print "pushes = %d, pops = %d, level = %d" % (pushes, pops, level) 26 | 27 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/r7x8.1.mat: -------------------------------------------------------------------------------- 1 | 7 9 2 | 0 0 1 3 | 0 1 1 4 | 0 2 1 5 | 0 3 4 6 | 0 4 3 7 | 0 5 3 8 | 0 6 3 9 | 0 8 3 10 | 1 0 4 11 | 1 1 3 12 | 1 2 2 13 | 1 3 4 14 | 1 4 1 15 | 1 5 2 16 | 1 6 4 17 | 1 8 3 18 | 2 0 1 19 | 2 1 1 20 | 2 2 4 21 | 2 4 2 22 | 2 5 3 23 | 2 6 3 24 | 2 8 3 25 | 3 0 2 26 | 3 1 1 27 | 3 3 4 28 | 3 4 4 29 | 3 5 1 30 | 3 8 1 31 | 4 0 2 32 | 4 1 3 33 | 4 2 2 34 | 4 3 4 35 | 4 4 1 36 | 4 5 1 37 | 4 6 2 38 | 4 8 2 39 | 5 0 3 40 | 5 1 3 41 | 5 2 4 42 | 5 3 4 43 | 5 4 1 44 | 5 5 3 45 | 5 6 3 46 | 5 8 4 47 | 6 1 1 48 | 6 2 1 49 | 6 3 4 50 | 6 4 2 51 | 6 5 4 52 | 6 6 4 53 | 6 8 2 54 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/5.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 17 5 | .nvars 50 6 | .nsuppvars 6 7 | .suppvarnames DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 8 | .ids 19 20 21 22 23 24 9 | .permids 19 20 21 22 23 24 10 | .auxids 19 20 21 22 23 24 11 | .nroots 1 12 | .rootids 17 13 | .nodes 14 | 1 T 1 0 0 15 | 2 24 5 1 -1 16 | 3 23 4 1 -2 17 | 4 22 3 3 -2 18 | 5 21 2 4 -2 19 | 6 23 4 1 -1 20 | 7 22 3 6 -1 21 | 8 21 2 7 -1 22 | 9 20 1 5 8 23 | 10 23 4 2 -1 24 | 11 22 3 2 10 25 | 12 21 2 11 2 26 | 13 23 4 2 -2 27 | 14 22 3 3 -13 28 | 15 21 2 4 14 29 | 16 20 1 12 15 30 | 17 19 0 9 -16 31 | .end 32 | -------------------------------------------------------------------------------- /bymc/test/unitTests.ml: -------------------------------------------------------------------------------- 1 | open OUnit 2 | 3 | let _ = 4 | let all = "all-tests" >::: 5 | [ 6 | SchemaSmtTest.suite; 7 | TaSyntTest.suite; 8 | PipeCmdTest.suite; 9 | SmtTest.suite; 10 | AccumsTest.suite; 11 | SsaTest.suite; 12 | AbsCounterTest.suite; 13 | PiaCtrRefinementTest.suite; 14 | SymbSkelTest.suite; 15 | SummaryTest.suite; 16 | PorBoundsTest.suite; 17 | PosetTest.suite; 18 | SchemaCheckerLtlTest.suite; 19 | TaIrBridgeTest.suite; 20 | TaParserTest.suite; 21 | ] 22 | in 23 | run_test_tt_main all 24 | 25 | -------------------------------------------------------------------------------- /bymc/src/summary.mli: -------------------------------------------------------------------------------- 1 | (** Constructing a summary similar to SymbSkel, but by enumerating SMT 2 | models instead of a call to NuSMV. 3 | 4 | Igor Konnov, 2014 5 | *) 6 | 7 | (** construct a summary of a single process *) 8 | val summarize: 9 | Runtime.runtime_t -> Program.program_t -> Spin.token SpinIr.proc 10 | -> SymbSkel.Sk.skel_t 11 | 12 | 13 | (** construct summaries of all processes, find reachable states, 14 | optimize guards, and merge all summaries into one skeleton 15 | *) 16 | val summarize_optimize_fuse: 17 | keep_selfloops: bool -> Runtime.runtime_t -> Program.program_t -> SymbSkel.Sk.skel_t 18 | 19 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/s27deltaDddmp1.bdd.bis: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 16 5 | .nvars 10 6 | .nsuppvars 7 7 | .suppvarnames G0 G1 G2 G3 G5 G6 G7 8 | .orderedvarnames G0 G1 G2 G3 G5 G6 G7 DUMMY7 DUMMY8 DUMMY9 9 | .ids 0 1 2 3 4 5 6 10 | .permids 0 1 2 3 4 5 6 11 | .auxids 0 1 2 3 4 5 6 12 | .nroots 3 13 | .rootids 6 -13 -16 14 | .nodes 15 | 1 T 1 0 0 16 | 2 6 6 1 -1 17 | 3 4 4 1 2 18 | 4 3 3 3 1 19 | 5 1 1 1 4 20 | 6 0 0 5 -1 21 | 7 5 5 1 -1 22 | 8 4 4 1 -7 23 | 9 5 5 1 -2 24 | 10 4 4 1 -9 25 | 11 3 3 10 8 26 | 12 1 1 8 11 27 | 13 0 0 5 12 28 | 14 2 2 1 -1 29 | 15 2 2 1 -2 30 | 16 1 1 14 15 31 | .end 32 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/s27deltaDddmp2.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-1.0 2 | .mode A 3 | .varinfo 0 4 | .dd s27adelta.bdd 5 | .nnodes 16 6 | .nvars 10 7 | .nsuppvars 7 8 | .orderedvarnames G0 G1 G2 G3 G5 G6 G7 TMP1 TMP2 TMP3 9 | .suppvarnames G0 G1 G2 G3 G5 G6 G7 10 | .ids 0 1 2 3 4 5 6 11 | .permids 0 1 2 3 4 6 8 12 | .auxids 0 1 2 3 4 5 6 13 | .nroots 3 14 | .rootids 6 -13 -16 15 | .nodes 16 | 1 T 1 0 0 17 | 2 6 6 1 -1 18 | 3 4 4 1 2 19 | 4 3 3 3 1 20 | 5 1 1 1 4 21 | 6 0 0 5 -1 22 | 7 5 5 1 -1 23 | 8 4 4 1 -7 24 | 9 5 5 1 -2 25 | 10 4 4 1 -9 26 | 11 3 3 10 8 27 | 12 1 1 8 11 28 | 13 0 0 5 12 29 | 14 2 2 1 -1 30 | 15 2 2 1 -2 31 | 16 1 1 14 15 32 | .end 33 | -------------------------------------------------------------------------------- /bymc/src/msatLoader.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | 3 | let load_plugin_mathsat4ml plugin_dir = 4 | try 5 | if !Msat.is_loaded 6 | then raise (Failure "mathsat4ml is already loaded"); 7 | 8 | printf "# loading mathsat4ml plugin...\n"; flush stdout; 9 | Dynlink.loadfile (plugin_dir ^ "/mathsat4ml.cmxs"); 10 | printf "# success\n"; 11 | 12 | if not !Msat.is_loaded 13 | then raise (Failure "failed to load mathsat4ml") 14 | with Dynlink.Error e -> 15 | printf "error: %s\n" (Dynlink.error_message e); 16 | printf "Did you compile mathsat4ml in plugins?\n"; 17 | raise (Failure "Failed to load mathsat4ml") 18 | 19 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test1.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # Check Header Load/Store for BDD/ADD/CNFs: 4 | # Load Header 5 | # Write Information on Standard Output 6 | # 7 | rm -f *.*.tmp 8 | echo "---------------------------------------------------------------------------" 9 | echo "--------------------- TESTING Load and Write Header -----------------------" 10 | echo "---------------------------------------------------------------------------" 11 | ./../testdddmp << END 12 | mi 13 | 50 14 | hlb 15 | 4.bdd 16 | hw 17 | hlb 18 | 0.add 19 | hw 20 | hlc 21 | 4.cnf 22 | hw 23 | mq 24 | quit 25 | END 26 | echo "-------------------------------- ... END ----------------------------------" 27 | -------------------------------------------------------------------------------- /bymc/src/revTrans.ml: -------------------------------------------------------------------------------- 1 | (* 2 | * When translating one program to another, it is sometimes useful 3 | * to translate expressions and variables back to the original source. 4 | *) 5 | 6 | open Spin 7 | open SpinIr 8 | open SpinIrImp 9 | 10 | exception NoReverseError of int 11 | 12 | class retrans_tab = 13 | object(self) 14 | val mutable m_tab: (int, token expr) Hashtbl.t = Hashtbl.create 10 15 | 16 | method bind (v: var) (exp: token expr) = 17 | Hashtbl.replace m_tab v#id exp 18 | 19 | method get (v: var) = 20 | let id = v#id in 21 | if Hashtbl.mem m_tab id 22 | then Hashtbl.find m_tab id 23 | else raise (NoReverseError id) 24 | end 25 | 26 | -------------------------------------------------------------------------------- /bymc/src/fastPlugin.ml: -------------------------------------------------------------------------------- 1 | (* 2 | * Transforming process skeletons into the FAST format. 3 | * 4 | * see http://tapas.labri.fr/trac/wiki/FASTer 5 | * 6 | * Igor Konnov, 2014 7 | *) 8 | 9 | open Printf 10 | 11 | open Accums 12 | open Debug 13 | open Plugin 14 | 15 | class fast_plugin_t (plugin_name: string) = 16 | object(self) 17 | inherit analysis_plugin_t plugin_name 18 | 19 | method transform rt = 20 | let prog = self#get_input0 in 21 | let sk = Summary.summarize_optimize_fuse rt prog 22 | ~keep_selfloops:false in 23 | FastWriter.write_to_file "model.fst" rt prog [sk]; 24 | prog 25 | 26 | method update_runtime rt = 27 | () 28 | end 29 | 30 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/doc/dddmpDesc.html: -------------------------------------------------------------------------------- 1 | 2 | The dddmp package: Overview 3 | 4 | 5 |

The dddmp package

6 |

Functions to read in and write out BDDs, ADDs 7 | and CNF formulas from and to files.

8 |

By Gianpiero Cabodi and Stefano Quer

9 | 10 | 18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 | Last updated on 1040218 17h14 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /bymc/src/trc.ml: -------------------------------------------------------------------------------- 1 | (* Tracing codes (see Debug.trace). 2 | * The codes MUST be short, as they are used as the keys in 3 | * a hash table. 4 | * 5 | * Do not open this module, as it will pollute the name space, 6 | * but use the full name, e.g., Trc.SMT. 7 | * 8 | * Pass -O trace.mods=mod1,mod2 to enable tracing in a specific module. 9 | * 10 | * Igor Konnov 2013-2014 11 | *) 12 | 13 | let smt = "SMT" (* smt *) 14 | let ssa = "SSA" (* ssa *) 15 | let cmd = "CMD" (* pipeCmd *) 16 | let nse = "NSE" (* nusmvSsaEncoding *) 17 | let pcr = "PCR" (* piaCtrRefinement *) 18 | let exe = "EXE" (* symbExec *) 19 | let bnd = "BND" (* porBounds *) 20 | let sum = "SUM" (* summary *) 21 | let cfg = "CFG" (* cfg *) 22 | let ssk = "SSK" (* symbSkel *) 23 | let pos = "POS" (* poset *) 24 | let scl = "SCL" (* schemaCheckerLtl *) 25 | 26 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4bis.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 3 4 | .nnodes 35 5 | .nvars 50 6 | .nsuppvars 15 7 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 8 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 9 | .nroots 1 10 | .rootids -35 11 | .nodes 12 | 1 1 0 0 13 | 2 14 1 -1 14 | 3 13 1 2 15 | 4 12 3 1 16 | 5 12 1 -1 17 | 6 12 2 1 18 | 7 11 5 -6 19 | 8 13 1 -1 20 | 9 12 8 1 21 | 10 11 9 4 22 | 11 10 7 -10 23 | 12 9 1 -11 24 | 13 10 5 -9 25 | 14 9 1 -13 26 | 15 8 12 14 27 | 16 9 1 -7 28 | 17 9 1 -5 29 | 18 8 16 17 30 | 19 7 15 18 31 | 20 6 19 1 32 | 21 7 14 17 33 | 22 6 21 1 34 | 23 5 20 22 35 | 24 4 23 1 36 | 25 6 18 1 37 | 26 5 20 25 38 | 27 4 26 1 39 | 28 3 24 27 40 | 29 5 20 1 41 | 30 4 29 1 42 | 31 4 20 1 43 | 32 3 30 31 44 | 33 2 28 32 45 | 34 1 4 33 46 | 35 0 1 34 47 | .end 48 | -------------------------------------------------------------------------------- /bymc/src/parse.mli: -------------------------------------------------------------------------------- 1 | (** 2 | A parser of extended Promela. 3 | 4 | @author Igor Konnov, 2012-2016 5 | *) 6 | 7 | exception Syntax_err of string 8 | 9 | (** 10 | Parse a Promela file and produce a program 11 | as well as a list of hints (pragmas). 12 | *) 13 | val parse_promela: 14 | Options.options_t -> string -> string -> string 15 | -> (Program.program_t * (string * string) list) 16 | 17 | 18 | (** 19 | Parse a Promela file from a channel and produce a program 20 | as well as a list of hints (pragmas). 21 | *) 22 | val parse_promela_of_chan: 23 | Options.options_t -> in_channel -> string -> string 24 | -> (Program.program_t * (string * string) list) 25 | 26 | (** 27 | Parse a single Promela expression. 28 | *) 29 | val parse_expr: 30 | SpinIr.symb_tab -> string -> Spin.token SpinIr.expr 31 | 32 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/tmpfile.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tmpfile -- open an unnamed temporary file 3 | * 4 | * This is the ANSI C standard routine; we have hacks here because many 5 | * compilers/systems do not have it yet. 6 | */ 7 | 8 | /* LINTLIBRARY */ 9 | 10 | 11 | #include 12 | #include "util.h" 13 | 14 | 15 | #ifdef UNIX 16 | 17 | FILE * 18 | tmpfile() 19 | { 20 | FILE *fp; 21 | char *filename, *junk; 22 | 23 | junk = strsav((char *)"/usr/tmp/cudd-XXXXXX"); 24 | filename = mktemp(junk); 25 | if ((fp = fopen(filename, "w+")) == NULL) { 26 | FREE(junk); 27 | return NULL; 28 | } 29 | (void) unlink(filename); 30 | FREE(junk); 31 | return fp; 32 | } 33 | 34 | #else 35 | 36 | FILE * 37 | tmpfile() 38 | { 39 | return fopen("utiltmp", "w+"); 40 | } 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /bymc/src/varRolePlugin.ml: -------------------------------------------------------------------------------- 1 | open Plugin 2 | open VarRole 3 | 4 | class vr_plugin_t (plugin_name: string) = 5 | object(self) 6 | inherit analysis_plugin_t plugin_name 7 | 8 | val mutable m_roles: var_role_tbl option = None 9 | 10 | method get_roles = 11 | match m_roles with 12 | | Some r -> r 13 | | None -> raise (Plugin_error "No result computed") 14 | 15 | method transform rt = 16 | let prog = self#get_input0 in 17 | let r = identify_var_roles prog in 18 | m_roles <- Some r; 19 | prog 20 | 21 | method update_runtime rt = 22 | match m_roles with 23 | | Some r -> 24 | rt#caches#analysis#set_var_roles self#get_output r 25 | | _ -> () 26 | end 27 | 28 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/1.add: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .add 3 | .mode A 4 | .varinfo 0 5 | .nnodes 12 6 | .nvars 50 7 | .nsuppvars 4 8 | .suppvarnames DUMMY1 DUMMY2 DUMMY3 DUMMY4 9 | .orderedvarnames DUMMY0 DUMMY1 DUMMY2 DUMMY3 DUMMY4 DUMMY5 DUMMY6 DUMMY7 DUMMY8 DUMMY9 DUMMY10 DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 10 | .ids 1 2 3 4 11 | .permids 1 2 3 4 12 | .auxids 2 3 4 0 13 | .nroots 1 14 | .rootids 12 15 | .nodes 16 | 1 T 0 0 0 17 | 2 T 2 0 0 18 | 3 4 3 1 2 19 | 4 T 1 0 0 20 | 5 4 3 4 1 21 | 6 3 2 3 5 22 | 7 4 3 2 4 23 | 8 3 2 7 3 24 | 9 2 1 6 8 25 | 10 3 2 5 7 26 | 11 2 1 10 6 27 | 12 1 0 9 11 28 | .end 29 | -------------------------------------------------------------------------------- /bymc/script/collect-verdict: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Search a directory for experiments subdirectories and put the summary 4 | # of their results into a verdict file 5 | # 6 | # Igor Konnov, 2013 7 | 8 | VERDICT="verdict-concrete.txt" 9 | VERDICT_CSV="verdict-concrete.csv" 10 | EXP_DIR="$1" 11 | if [ "$EXP_DIR" == "" -o ! -d "$EXP_DIR" ]; then 12 | echo "Use: $0 " 13 | exit 1 14 | fi 15 | 16 | BYMC_HOME=`dirname $0` 17 | BYMC_HOME=`cd $BYMC_HOME; pwd` 18 | 19 | echo -n "" >$VERDICT 20 | 21 | files=`find "$EXP_DIR" -name exit-status.txt` 22 | 23 | for f in $files; do 24 | full_dir=`dirname $f`; dir=`basename $full_dir` 25 | spin_data=`$BYMC_HOME/parse-spin-out.py ${full_dir}/spin.out` 26 | ex_status=`head -n 1 $f` 27 | echo "07:experiment=$dir|$ex_status|$spin_data" >>$VERDICT 28 | done 29 | 30 | $BYMC_HOME/verdict-to-csv.py <$VERDICT >$VERDICT_CSV 31 | -------------------------------------------------------------------------------- /bymc/test/ic.ta: -------------------------------------------------------------------------------- 1 | /* An example from our Information & Computation paper. */ 2 | 3 | thresholdAutomaton Proc { 4 | local pc; 5 | shared x, y; 6 | parameters N, T, F; 7 | 8 | assumptions (0) { 9 | N > T; 10 | T >= F; 11 | T >= 1; 12 | } 13 | 14 | locations (0) { 15 | loc1: [0]; 16 | loc2: [1]; 17 | loc3: [2]; 18 | loc4: [3]; 19 | } 20 | 21 | inits (0) { 22 | loc1 == N; 23 | loc2 == 0; loc3 == 0; loc4 == 0; 24 | x == 0; y == 0; 25 | } 26 | 27 | rules (8) { 28 | 0: loc1 -> loc3 29 | when (x >= N - F) 30 | do { x' == x; y' == y + 1; }; 31 | 1: loc1 -> loc2 32 | when (true) 33 | do { x' == x + 1; y' == y; }; 34 | 2: loc2-> loc4 35 | when (y >= T) 36 | do { unchanged(x, y); }; 37 | } 38 | 39 | specifications (0) { 40 | unforg: (loc1 == 0) -> [](loc3 == 0); 41 | } 42 | } /* Proc */ 43 | 44 | 45 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/mnemosyne/mtest.c: -------------------------------------------------------------------------------- 1 | #include "mnemosyne.h" 2 | 3 | static char rcsid[] = "/fats/tools/hsv/mnemosyne/mtest.c,v 1.1.1.1 1995/06/06 18:18:27 fabio Exp"; 4 | 5 | /* 6 | test harness/demo of mnemosyne library. deliberately leaks memory on the 7 | floor, double frees, frees unallocated memory, etc. 8 | 9 | Marcus J. Ranum, 1990. (mjr@decuac.dec.com) 10 | */ 11 | 12 | 13 | main() 14 | { 15 | char *d = "foobar"; 16 | char *xx; 17 | int x; 18 | 19 | xx = malloc(922); 20 | xx = malloc(123); 21 | 22 | /* huh ? */ 23 | xx = malloc(-9); 24 | 25 | /* waste some memory */ 26 | for(x = 1; x < 8; x++) 27 | xx = malloc(x); 28 | 29 | /* free something we don't own */ 30 | free(d); 31 | 32 | /* double free something */ 33 | free(xx); 34 | free(xx); 35 | 36 | /* not necessary - this triggers a better printout of statistics */ 37 | mnem_writestats(); 38 | } 39 | -------------------------------------------------------------------------------- /bymc/script/verdict-to-csv.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # 3 | # Convert verdict.txt to a CSV file with a header 4 | # 5 | # Igor Konnov, 2012 6 | 7 | import sys 8 | 9 | fin = sys.stdin 10 | columns = set() 11 | rows = [] 12 | 13 | line = fin.readline() 14 | while line: 15 | line = line[:-1] 16 | fields = line.split("|") 17 | row = {} 18 | for f in fields: 19 | if f.strip() != "": 20 | vs = f.split("=") 21 | k, v = vs[0], "=".join(vs[1:]) 22 | row[k] = v 23 | columns.add(k) 24 | 25 | rows.append(row) 26 | line = fin.readline() 27 | 28 | cols = list(columns) 29 | cols.sort() 30 | print ",".join(cols) 31 | 32 | for r in rows: 33 | lst = [] 34 | for c in cols: 35 | if r.has_key(c): 36 | lst.append('"%s"' % r[c]) 37 | else: 38 | lst.append("") 39 | 40 | print ",".join(lst) 41 | 42 | -------------------------------------------------------------------------------- /bymc/src/piaDom.mli: -------------------------------------------------------------------------------- 1 | open AbsBasics 2 | open Program 3 | open Spin 4 | open SpinIr 5 | open Smt 6 | open VarRole 7 | 8 | class pia_domain: Spin.token expr list -> 9 | object 10 | method print: unit 11 | 12 | method length: int 13 | 14 | method map_concrete: smt_solver -> Spin.token expr -> Spin.token expr 15 | 16 | method expr_is_concretization: Spin.token expr -> int -> Spin.token expr 17 | 18 | method find_abs_vals: 19 | abs_type -> smt_solver -> Spin.token expr -> (SpinIr.var * int) list list 20 | 21 | (* 22 | distribute n abstract values x_i over the abstract domain s.t. 23 | sum_{i=1}^n \gamma(x_i) = num_active_processes 24 | *) 25 | method scatter_abs_vals: smt_solver -> Spin.token expr -> int -> int list list 26 | end 27 | 28 | 29 | val create: smt_solver -> var_role_tbl -> program_t -> pia_domain 30 | 31 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test2.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # Check BDDs from DDDMP-1.0: 4 | # Load an Array of BDDs from DDDMP-1.0 5 | # Store them 6 | # 7 | rm -f *.*.tmp 8 | echo "---------------------------------------------------------------------------" 9 | echo "-------------------- TESTING Load BDD from DDDMP-1.0 ----------------------" 10 | echo "---------------------------------------------------------------------------" 11 | ./../testdddmp << END 12 | mi 13 | 10 14 | hlb 15 | s27deltaDddmp1.bdd 16 | hw 17 | bal 18 | s27deltaDddmp1.bdd 19 | 0 20 | bas 21 | s27deltaDddmp1.bdd.tmp 22 | 0 23 | mq 24 | quit 25 | END 26 | echo "----------------------------- ... RESULTS ... -----------------------------" 27 | diff --brief s27deltaDddmp1.bdd.tmp s27deltaDddmp1.bdd.bis 28 | echo "-------------------------------- ... END ----------------------------------" 29 | rm -f *.*.tmp 30 | 31 | -------------------------------------------------------------------------------- /bymc/src/spinParserState.mli: -------------------------------------------------------------------------------- 1 | (* 2 | The internal state of the spin parser -- use with care and as little as possible. 3 | As ocamlyacc exports nothing but the start non-terminals, we keep the global 4 | state in this module. 5 | *) 6 | 7 | open SpinIr 8 | 9 | exception Not_implemented of string 10 | exception Parse_error of string 11 | exception State_error of string 12 | exception Promela_semantic_err of string 13 | 14 | type spin_parser_state_t 15 | 16 | (* this make the module non-reentrant, as the current state is globally kept *) 17 | val get_state: unit -> spin_parser_state_t 18 | val reset_state: unit -> unit 19 | 20 | val err_cnt: unit -> int 21 | val inc_err_cnt: unit -> unit 22 | 23 | val global_scope: unit -> symb_tab 24 | val spec_scope: unit -> symb_tab 25 | 26 | val top_scope: unit -> symb_tab 27 | val push_scope: symb_tab -> unit 28 | val pop_scope: unit -> unit 29 | 30 | val type_tab: unit -> data_type_tab 31 | 32 | -------------------------------------------------------------------------------- /bymc/src/varRole.mli: -------------------------------------------------------------------------------- 1 | type var_role = 2 | | BoundedInt of int * int | SharedBoundedInt of int * int 3 | | SharedUnbounded | LocalUnbounded | Scratch of SpinIr.var 4 | 5 | exception Role_error of string 6 | exception Var_not_found of string 7 | 8 | val var_role_s: var_role -> string 9 | 10 | val is_unbounded: var_role -> bool 11 | val is_bounded: var_role -> bool 12 | val is_scratch: var_role -> bool 13 | val is_local_unbounded: var_role -> bool 14 | val is_shared_unbounded: var_role -> bool 15 | 16 | class var_role_tbl: 17 | object 18 | method add_from_hash: (SpinIr.var, var_role) Hashtbl.t -> unit 19 | method get_role: SpinIr.var -> var_role 20 | method add: SpinIr.var -> var_role -> unit 21 | (* TODO: hide it *) 22 | method add_by_id: int -> var_role -> unit 23 | method copy: var_role_tbl 24 | end 25 | 26 | 27 | val identify_var_roles: Program.program_t -> var_role_tbl 28 | 29 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/test-sav.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "util.h" 3 | 4 | 5 | /* ARGSUSED */ 6 | static int 7 | saveit(prog, file2) 8 | char *prog, *file2; 9 | { 10 | char *file1; 11 | 12 | /* get current executable name by searching the path ... */ 13 | file1 = util_path_search(prog); 14 | if (file1 == 0) { 15 | (void) fprintf(stderr, "cannot locate current executable\n"); 16 | return 1; 17 | } 18 | 19 | /* users name for the new executable -- perform tilde-expansion */ 20 | if (! util_save_image(file1, file2)) { 21 | (void) fprintf(stderr, "error occured during save ...\n"); 22 | return 1; 23 | } 24 | FREE(file1); 25 | return 0; 26 | } 27 | 28 | int restart; 29 | 30 | main(argc, argv) 31 | char **argv; 32 | { 33 | if (restart) { 34 | (void) printf("restarted ...\n"); 35 | exit(0); 36 | } 37 | restart = 1; 38 | exit(saveit(argv[0], "foobar")); 39 | } 40 | -------------------------------------------------------------------------------- /bymc/src/porBoundsPlugin.ml: -------------------------------------------------------------------------------- 1 | (* 2 | * Computing execution bounds using partial order reduction. 3 | * 4 | * Igor Konnov, 2014 5 | *) 6 | 7 | open Printf 8 | 9 | open Accums 10 | open Debug 11 | open SymbSkel 12 | open Plugin 13 | open PorBounds 14 | 15 | class por_bounds_plugin_t (plugin_name: string) 16 | (sk_plugin: SymbSkelPlugin.symb_skel_plugin_t) = 17 | object(self) 18 | inherit analysis_plugin_t plugin_name 19 | 20 | method transform rt = 21 | let dom = rt#caches#analysis#get_pia_dom in 22 | let dom_size = dom#length in 23 | (* TODO: construct the paths for several process types properly *) 24 | assert (1 = (List.length sk_plugin#skels)); 25 | let sk = List.hd sk_plugin#skels in 26 | PorBounds.compute_diam rt#solver dom_size sk; 27 | self#get_input0 28 | 29 | method update_runtime rt = 30 | () 31 | end 32 | 33 | -------------------------------------------------------------------------------- /bymc/src/pSet.mli: -------------------------------------------------------------------------------- 1 | (* 2 | Set membership as division by prime numbers. 3 | This was a clever exercise. However, it is much easier 4 | (and probably more efficient) to use a bit vector instead of prime 5 | numbers. 6 | 7 | Igor Konnov, 2014 8 | *) 9 | 10 | type elt 11 | type t 12 | 13 | (* this is supposed to work with very small prime numbers *) 14 | val new_thing: unit -> elt 15 | 16 | val str: t -> string 17 | 18 | val elem_str: elt -> string 19 | 20 | val elem_eq: elt -> elt -> bool 21 | 22 | val empty: t 23 | 24 | val singleton: elt -> t 25 | 26 | val is_empty: t -> bool 27 | 28 | val mem: elt -> t -> bool 29 | 30 | val add: elt -> t -> t 31 | 32 | val remove: elt -> t -> t 33 | 34 | val compare: t -> t -> int 35 | 36 | val compare_elt: elt -> elt -> int 37 | 38 | val inter: t -> t -> t 39 | 40 | val union: t -> t -> t 41 | 42 | val diff: t -> t -> t 43 | 44 | val equal: t -> t -> bool 45 | 46 | val subseteq: t -> t -> bool 47 | 48 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddDesc.html: -------------------------------------------------------------------------------- 1 | 2 | The cudd package: Overview 3 | 4 | 5 |

The cudd package

6 |

The University of Colorado decision diagram package.

7 |

By Fabio Somenzi

8 | 9 | 17 | 18 |
19 | 20 | External functions and data strucures of the CUDD package. 21 |
    22 |
  • To turn on the gathering of statistics, define DD_STATS. 23 |
  • To link with mis, define DD_MIS. 24 |
25 | Modified by Abelardo Pardo to interface it to VIS. 26 | 27 |
28 | 29 | Last updated on 20090220 23h06 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /bymc/src/instantiationPlugin.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | 3 | open Debug 4 | open Instantiation 5 | open Options 6 | open Parse 7 | open Plugin 8 | open Program 9 | open Runtime 10 | open Spin 11 | open SpinIr 12 | open Writer 13 | 14 | class instantiation_plugin_t (plugin_name: string) = 15 | object(self) 16 | inherit transform_plugin_t plugin_name 17 | 18 | method transform rt = 19 | let prog = self#get_input 0 in 20 | let opts = rt#caches#options in 21 | let units = units_of_program prog in 22 | let new_units = do_substitution opts.param_assignments units in 23 | write_to_file true "concrete.prm" 24 | new_units (get_type_tab prog) (Hashtbl.create 10); 25 | program_of_units (new data_type_tab) new_units 26 | 27 | method update_runtime rt = () 28 | 29 | method decode_trail _ path = path 30 | 31 | method refine _ path = (false, self#get_output) 32 | end 33 | 34 | -------------------------------------------------------------------------------- /bymc/src/pipeCmd.mli: -------------------------------------------------------------------------------- 1 | (* 2 | * A high-level communication with a child process using readline and writeline 3 | * primitives. The process is served by a separate thread that takes care of 4 | * avoiding deadlocks and other low-level surprises. 5 | * 6 | * TODO: rewrite using lwt. 7 | * 8 | * Igor Konnov, 2013 9 | *) 10 | 11 | exception Comm_error of string 12 | 13 | type cmd_stat 14 | 15 | (* an empty instance *) 16 | val null: unit -> cmd_stat 17 | val is_null: cmd_stat -> bool 18 | 19 | (* create a new process using Unix.create_process, connect it with a pipe 20 | and associate a communicating thread with it *) 21 | val create: string -> string array -> string -> cmd_stat 22 | 23 | (* terminate the child process and the associated thread *) 24 | val destroy: cmd_stat -> bool 25 | 26 | (* read one line from the process pipe. The current thread may be blocked 27 | when there is no pending output from the process. *) 28 | val readline: cmd_stat -> string 29 | 30 | val writeline: cmd_stat -> string -> unit 31 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test5.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # Check ADD: 4 | # Load an ADD 5 | # Store the same ADD 6 | # Compare the two 7 | # (done twice on a small - 0.add - and a medium - 1.add - ADD). 8 | # 9 | rm -f *.tmp* 10 | echo "---------------------------------------------------------------------------" 11 | echo "--------------------- TESTING Load ADD and Store ADD ----------------------" 12 | echo "---------------------------------------------------------------------------" 13 | ./../testdddmp << END1 14 | mi 15 | 3 16 | hlb 17 | 0.add 18 | al 19 | 0.add 20 | 0 21 | as 22 | 0.add.tmp 23 | 0 24 | mq 25 | mi 26 | 50 27 | hlb 28 | 1.add 29 | al 30 | 1.add 31 | 1 32 | as 33 | 1.add.tmp 34 | 1 35 | mq 36 | quit 37 | END1 38 | echo "----------------------------- ... RESULTS ... -----------------------------" 39 | diff --brief 0.add 0.add.tmp 40 | diff --brief 1.add 1.add.tmp 41 | echo "-------------------------------- ... END ----------------------------------" 42 | rm -f *.*.tmp 43 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/cuddIntro.css: -------------------------------------------------------------------------------- 1 | /* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ 2 | .MATH { font-family: "Century Schoolbook", serif; } 3 | .MATH I { font-family: "Century Schoolbook", serif; font-style: italic } 4 | .BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } 5 | 6 | /* implement both fixed-size and relative sizes */ 7 | SMALL.XTINY { font-size : xx-small } 8 | SMALL.TINY { font-size : x-small } 9 | SMALL.SCRIPTSIZE { font-size : smaller } 10 | SMALL.FOOTNOTESIZE { font-size : small } 11 | SMALL.SMALL { } 12 | BIG.LARGE { } 13 | BIG.XLARGE { font-size : large } 14 | BIG.XXLARGE { font-size : x-large } 15 | BIG.HUGE { font-size : larger } 16 | BIG.XHUGE { font-size : xx-large } 17 | 18 | /* heading styles */ 19 | H1 { } 20 | H2 { } 21 | H3 { } 22 | H4 { } 23 | H5 { } 24 | 25 | /* mathematics styles */ 26 | DIV.displaymath { } /* math displays */ 27 | TD.eqno { } /* equation-number cells */ 28 | 29 | 30 | /* document-specific styles come next */ 31 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/ddgen.i: -------------------------------------------------------------------------------- 1 | %{ 2 | #ifndef FROM_PYCUDDI 3 | #error Use only from pycudd.i. Make sure to define FROM_PYCUDDI! 4 | #endif 5 | %} 6 | 7 | // These should not have to be called by the user 8 | 9 | struct DdGen { } ; 10 | 11 | %extend DdGen { 12 | %pythoncode{ 13 | __doc__ = "Not expected to be used directly." 14 | } 15 | DdGen(DdNode *node1, int method, DdNode *node2=NULL) { 16 | CUDD_VALUE_TYPE val; 17 | DdGen *result; 18 | if (method == 0) result = Cudd_FirstCube(mgr, node1, cube_iter, &val); 19 | else if (method == 1) result = Cudd_FirstNode(mgr, node1, node_iter); 20 | #if CUDDVER >= 0x020400 21 | 22 | else if (method == 2) { 23 | assert(node2 != NULL); 24 | result = Cudd_FirstPrime(mgr,node1,node2, cube_iter); 25 | } 26 | #endif 27 | 28 | #ifdef PYCUDD_DEBUG 29 | fprintf(Cudd_ReadStdout(mgr),"Generator %d was created\n",result); 30 | #endif 31 | return result; 32 | } 33 | 34 | ~DdGen() { 35 | Cudd_GenFree(self); 36 | #ifdef PYCUDD_DEBUG 37 | fprintf(Cudd_ReadStdout(mgr),"Generator %d was freed\n",self); 38 | #endif 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /bymc/_tags: -------------------------------------------------------------------------------- 1 | # ocamlbuild tags 2 | # 3 | # check the documentation at: http://brion.inria.fr/gallium/index.php/Tags 4 | 5 | <**/*.mli>: package(batteries) 6 | 7 | or : include 8 | <**/*.top>: package(threads), thread, package(ocamlgraph), package(batteries) 9 | <**/*.native> or <**/*.byte>: package(threads), thread, use_dynlink, \ 10 | package(ocamlgraph), package(batteries), package(sexplib), \ 11 | package(lazy-trie), package(mpi), package(z3) 12 | 13 | # when you want to compile against ../plugins/mathsat4ml, uncomment the package: 14 | # package(ctypes.foreign) 15 | 16 | : package(ocamlgraph), package(batteries), package(sexplib), \ 17 | package(lazy-trie), package(mpi), package(z3) 18 | 19 | : thread 20 | : package(oUnit), package(batteries), package(sexplib), \ 21 | package(lazy-trie) 22 | 23 | : package(oUnit), package(batteries), package(sexplib), \ 24 | package(lazy-trie), package(mpi), package(z3) 25 | 26 | true: use_menhir, bin_annot, annot 27 | 28 | # this is the directory containing the runtime results, ignore 29 | : -traverse 30 | -------------------------------------------------------------------------------- /bymc/src/skelStruc.mli: -------------------------------------------------------------------------------- 1 | 2 | type loop_sig 3 | 4 | val empty_loop_sig: loop_sig 5 | 6 | (* the following regions are currently extracted: 7 | decl, init, loop_prefix, comp, update, loop_body 8 | *) 9 | 10 | class type proc_struc = 11 | object 12 | method get_regions: string -> Regions.region_tbl 13 | method set_regions: string -> Regions.region_tbl -> unit 14 | method get_annotations: (int, SpinIr.annot_t) Hashtbl.t 15 | method get_loop_sig: string -> loop_sig 16 | method set_loop_sig: string -> loop_sig -> unit 17 | end 18 | 19 | val empty_proc_struc: unit -> proc_struc 20 | 21 | val extract_skel: Spin.token SpinIr.mir_stmt list -> Regions.region_tbl 22 | val compute_struc: Program.program_t -> proc_struc 23 | 24 | val extract_loop_sig: Program.program_t -> Regions.region_tbl 25 | -> Spin.token SpinIr.proc -> loop_sig 26 | 27 | val get_prev_next: loop_sig -> (SpinIr.var * SpinIr.var) list 28 | 29 | val get_loop_next: loop_sig -> SpinIr.var -> SpinIr.var 30 | 31 | val comp_seq: SpinIr.var list -> Spin.token SpinIr.mir_stmt list 32 | -> (SpinIr.var * int) list list 33 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/plugin/mlsrc/mathsat4ml.ml: -------------------------------------------------------------------------------- 1 | open Ctypes 2 | open Foreign 3 | 4 | let create = 5 | foreign "mathsat_create" (void @-> returning int) 6 | 7 | let destroy = 8 | foreign "mathsat_destroy" (int @-> returning void) 9 | 10 | let declare_int = 11 | foreign "mathsat_declare_int" (int @-> string @-> returning void) 12 | 13 | let massert = 14 | foreign "mathsat_assert" (int @-> string @-> returning int) 15 | 16 | let solve = 17 | foreign "mathsat_solve" (int @-> returning int) 18 | 19 | let push = 20 | foreign "mathsat_push" (int @-> returning void) 21 | 22 | let pop = 23 | foreign "mathsat_pop" (int @-> returning void) 24 | 25 | let get_model_value = 26 | foreign "mathsat_get_model_value" (int @-> string @-> returning string) 27 | 28 | 29 | let _ = 30 | (* register the functions *) 31 | Msat.is_loaded := true; 32 | Msat.p_create := create; 33 | Msat.p_destroy := destroy; 34 | Msat.p_declare_int := declare_int; 35 | Msat.p_assert := massert; 36 | Msat.p_solve := solve; 37 | Msat.p_push := push; 38 | Msat.p_pop := pop; 39 | Msat.p_get_model_value := get_model_value 40 | 41 | -------------------------------------------------------------------------------- /bymc/src/symbSkelNusmvPlugin.ml: -------------------------------------------------------------------------------- 1 | 2 | open Printf 3 | 4 | open Debug 5 | open Plugin 6 | 7 | class skel_nusmv_plugin_t (plugin_name: string) (out_name: string) = 8 | object(self) 9 | inherit transform_plugin_t plugin_name as super 10 | 11 | method is_disabled rt = 12 | if super#is_disabled rt 13 | then true 14 | else rt#caches#options.Options.mc_tool <> Options.ToolNusmv 15 | 16 | method transform rt = 17 | log INFO (sprintf 18 | "> writing summary NuSMV model to %s.smv..." "main-sum"); 19 | let prog = self#get_input0 in 20 | let intabs_prog = self#get_input1 in 21 | let sk = 22 | Summary.summarize_optimize_fuse rt intabs_prog 23 | ~keep_selfloops:false (* this plugin is used for reachability only *) 24 | in 25 | SymbSkelNusmv.transform rt "main-sum" intabs_prog prog [sk]; 26 | log INFO "[DONE]"; 27 | prog 28 | 29 | method update_runtime _ = 30 | () 31 | 32 | method decode_trail _ path = path 33 | 34 | method refine _ path = (false, self#get_output) 35 | end 36 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test3.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # BDD check: 4 | # Load BDDs 5 | # Make some operations 6 | # Store BDDs 7 | # 8 | rm -f *.*.tmp 9 | echo "---------------------------------------------------------------------------" 10 | echo "----------------------- TESTING basic Load/Store ... ----------------------" 11 | echo "---------------------------------------------------------------------------" 12 | ./../testdddmp << END 13 | mi 14 | 50 15 | hlb 16 | 0or1.bdd 17 | bl 18 | 0.bdd 19 | 0 20 | bl 21 | 1.bdd 22 | 1 23 | op 24 | or 25 | 0 26 | 1 27 | 2 28 | bs 29 | 0or1.bdd.tmp 30 | 2 31 | bl 32 | 2.bdd 33 | 2 34 | bl 35 | 3.bdd 36 | 3 37 | op 38 | and 39 | 2 40 | 3 41 | 4 42 | bs 43 | 2and3.bdd.tmp 44 | 4 45 | hlb 46 | 4xor5.bdd 47 | bl 48 | 4.bdd 49 | 4 50 | bl 51 | 5.bdd 52 | 5 53 | op 54 | xor 55 | 4 56 | 5 57 | 6 58 | bs 59 | 4xor5.bdd.tmp 60 | 6 61 | mq 62 | quit 63 | END 64 | echo "----------------------------- ... RESULTS ... -----------------------------" 65 | diff --brief 0or1.bdd 0or1.bdd.tmp 66 | diff --brief 2and3.bdd 2and3.bdd.tmp 67 | diff --brief 4xor5.bdd 4xor5.bdd.tmp 68 | echo "-------------------------------- ... END ----------------------------------" 69 | rm -f *.*.tmp 70 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test4.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # BDD Check: 4 | # Load BDDs 5 | # Make some operations (with reordering) 6 | # Store BDDs 7 | # 8 | rm -f *.*/tmp 9 | echo "---------------------------------------------------------------------------" 10 | echo "---------- TESTING Load/Store with sifting, varnames & varauxids ----------" 11 | echo "---------------------------------------------------------------------------" 12 | ./../testdddmp << END1 13 | mi 14 | 50 15 | onl 16 | varnames.ord 17 | bl 18 | 4.bdd 19 | 4 20 | oil 21 | varauxids.ord 22 | bs 23 | 4a.bdd.tmp 24 | 4 25 | dr 26 | 4 27 | bs 28 | 4b.bdd.tmp 29 | 4 30 | mq 31 | quit 32 | END1 33 | echo "------------------------- ... END PHASE 1 ... -----------------------------" 34 | ./../testdddmp << END2 35 | mi 36 | 50 37 | onl 38 | varnames.ord 39 | slm 40 | 3 41 | bl 42 | 4b.bdd.tmp 43 | 4 44 | oil 45 | varauxids.ord 46 | bs 47 | 4c.bdd.tmp 48 | 4 49 | mq 50 | quit 51 | END2 52 | echo "----------------------------- ... RESULTS ... -----------------------------" 53 | diff --brief 4.bdd 4a.bdd.tmp 54 | diff --brief 4a.bdd.tmp 4c.bdd.tmp 55 | echo "-------------------------------- ... END ----------------------------------" 56 | rm -f *.*.tmp 57 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test6.script: -------------------------------------------------------------------------------- 1 | # !/bin/sh 2 | # 3 | # Check CNF (short check - only NodeByNode method involved): 4 | # Load BDDs 5 | # Store corresponding CNF 6 | # Read CNF 7 | # Store corresponding BDD 8 | # Compare original and final BDDs 9 | # 10 | rm -f *.tmp* 11 | echo "---------------------------------------------------------------------------" 12 | echo "--------------------- TESTING Load BDD and Store CNF ----------------------" 13 | echo "---------------------------------------------------------------------------" 14 | ./../testdddmp << END1 15 | mi 16 | 150 17 | hlc 18 | 4.cnf.bis 19 | bl 20 | 4.bdd 21 | 0 22 | cs 23 | 4.cnf.tmp 24 | 0 25 | N 26 | 100 27 | mq 28 | quit 29 | END1 30 | echo "--------------------- TESTING Load CNF and Store BDD ----------------------" 31 | ./../testdddmp << END2 32 | mi 33 | 150 34 | hlc 35 | 4.cnf.bis 36 | cl 37 | 4.cnf.tmp 38 | 0 39 | hw 40 | bs 41 | 4.bdd.tmp 42 | 0 43 | mq 44 | quit 45 | END2 46 | echo "----------------------------- ... RESULTS ... -----------------------------" 47 | diff --brief 4.cnf.bis 4.cnf.tmp 48 | diff --brief 4.bdd.bis1 4.bdd.tmp 49 | echo "-------------------------------- ... END ----------------------------------" 50 | rm -f *.*.tmp 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 3 4 | .nnodes 35 5 | .nvars 50 6 | .nsuppvars 15 7 | .suppvarnames V2 V3 V8 V9 V10 V12 V22 V23 V24 V37 V38 V39 V48 V49 V50 8 | .orderedvarnames V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V50 9 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 10 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 11 | .auxids 3 5 15 17 19 23 43 45 47 73 75 77 95 97 99 12 | .nroots 1 13 | .rootids -35 14 | .nodes 15 | 1 T 1 0 0 16 | 2 V50 14 1 -1 17 | 3 V49 13 1 2 18 | 4 V48 12 3 1 19 | 5 V48 12 1 -1 20 | 6 V48 12 2 1 21 | 7 V39 11 5 -6 22 | 8 V49 13 1 -1 23 | 9 V48 12 8 1 24 | 10 V39 11 9 4 25 | 11 V38 10 7 -10 26 | 12 V37 9 1 -11 27 | 13 V38 10 5 -9 28 | 14 V37 9 1 -13 29 | 15 V24 8 12 14 30 | 16 V37 9 1 -7 31 | 17 V37 9 1 -5 32 | 18 V24 8 16 17 33 | 19 V23 7 15 18 34 | 20 V22 6 19 1 35 | 21 V23 7 14 17 36 | 22 V22 6 21 1 37 | 23 V12 5 20 22 38 | 24 V10 4 23 1 39 | 25 V22 6 18 1 40 | 26 V12 5 20 25 41 | 27 V10 4 26 1 42 | 28 V9 3 24 27 43 | 29 V12 5 20 1 44 | 30 V10 4 29 1 45 | 31 V10 4 20 1 46 | 32 V9 3 30 31 47 | 33 V8 2 28 32 48 | 34 V3 1 4 33 49 | 35 V2 0 1 34 50 | .end 51 | -------------------------------------------------------------------------------- /plugins/mathsat4ml/plugin/Makefile: -------------------------------------------------------------------------------- 1 | # set it to the directory, where mathsat is unpacked 2 | MATHSAT_DIR=$(HOME)/usr/mathsat 3 | CC=gcc 4 | CCFLAGS=-fPIC -O3 -I${MATHSAT_DIR}/include -Wall 5 | LDFLAGS=-fPIC -Wl,--no-as-needed -Wl,-rpath=${O} 6 | AR=ar 7 | OCFLAGS= 8 | 9 | O=`pwd`/_build 10 | OBJ=$(O)/mathsat-driver.o 11 | SRC_DIR=src 12 | LIBNAME=${O}/libmathsat4ml_driver.so 13 | 14 | # -rpath to statically set the location to mathsat4ml_driver 15 | # if you want to move the directory, recompile the library 16 | # (otherwise, one has to mess with LD_LIBRARY_PATH) 17 | # --no-as-needed to include all symbols irrespectively of whether 18 | # the compiler sees them used or not (Ctypes requires that) 19 | 20 | all: ${LIBNAME} mlsrc/*.ml mlsrc/*.mli 21 | ocamlbuild ${OCFLAGS} -use-ocamlfind mathsat4ml.so \ 22 | -lflag -cclib -lflag \ 23 | "-Wl,--no-as-needed -Wl,-rpath=${O} -L${O} -L${MATHSAT_DIR}/lib -lmathsat4ml_driver -lmathsat" 24 | cp _build/mlsrc/mathsat4ml.cmxs ../.. 25 | 26 | #${AR} rcs ${LIBNAME} ${OBJ} 27 | ${LIBNAME}: init ${OBJ} 28 | ${CC} -shared ${LDFLAGS} -o ${LIBNAME} ${OBJ} -L${MATHSAT_DIR}/lib -lmathsat -lstdc++ -lgmp -lgmpxx 29 | 30 | ${O}/%.o: ${SRC_DIR}/%.c 31 | ${CC} -o $@ ${CCFLAGS} -c $< 32 | 33 | init: 34 | mkdir -p ${O} 35 | 36 | clean: 37 | ocamlbuild -clean 38 | 39 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test2.out: -------------------------------------------------------------------------------- 1 | rm: No match. 2 | --------------------------------------------------------------------------- 3 | -------------------- TESTING Load BDD from DDDMP-1.0 ---------------------- 4 | --------------------------------------------------------------------------- 5 | #./../testdddmp Version 2.0.2 (use command help) 6 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> DD TYPE: DDDMP_BDD 7 | Number of variables: 10 8 | Number of support variables: 7 9 | suppVarNames: G0 G1 G2 G3 G5 G6 G7 10 | orderedVarNames: G0 G1 G2 G3 G5 G6 G7 DUMMY7 DUMMY8 DUMMY9 11 | varIds: 0 1 2 3 4 5 6 12 | varIds for ALL Manager Variables: 0 1 2 3 4 5 6 -1 -1 -1 13 | varComposeIds: 0 1 2 3 4 6 8 14 | varComposeIds for ALL Manager Variables: 0 1 2 3 4 6 8 -1 -1 -1 15 | varAuxIds: 0 1 2 3 4 5 6 16 | varAuxIds for ALL Manager Variables: 0 1 2 3 4 5 6 -1 -1 -1 17 | Number of roots: 3 18 | TestDddmp> File : Which Array of BDDs [0..19]: TestDddmp> File : Which Array of BDDs [0..19]: Storing Array of BDDs in file s27deltaDddmp1.bdd.tmp ... 19 | done. 20 | TestDddmp> Quitting CUDD Manager. 21 | TestDddmp> End of test. 22 | ----------------------------- ... RESULTS ... ----------------------------- 23 | -------------------------------- ... END ---------------------------------- 24 | -------------------------------------------------------------------------------- /bymc/script/nl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # 3 | # Print line number before every line. 4 | # It works like nl and cat -n, which are missing in busybox distributions. 5 | # An additional second argument limits the number of lines. 6 | # Additionally, it skips the lines starting with <<<. 7 | # 8 | # Igor Konnov, 2013 9 | 10 | import getopt 11 | import sys 12 | 13 | def usage(exitcode): 14 | print "Use: %s [-n limit] filename" % sys.argv[0] 15 | sys.exit(exitcode) 16 | 17 | 18 | try: 19 | opts, args = getopt.getopt(sys.argv[1:], "hn:") 20 | except getopt.GetoptError as err: 21 | print str(err) 22 | usage(2) 23 | 24 | limit = 0 25 | 26 | for o, a in opts: 27 | if o == "-h": 28 | usage(1) 29 | elif o == "-n": 30 | limit = int(a) 31 | else: 32 | usage(3) 33 | 34 | 35 | if len(args) == 0: 36 | fin = sys.stdin 37 | else: 38 | fin = open(args[0], 'r') 39 | 40 | num = 1 41 | try: 42 | for l in fin: 43 | if num > limit and limit != 0: 44 | sys.stdout.write("[...]\n") 45 | break 46 | 47 | 48 | if l.find("<<<") == -1: 49 | sys.stdout.write("%6d %s" % (num, l)) 50 | num += 1 51 | else: 52 | sys.stdout.write(" %s" % l) 53 | 54 | finally: 55 | fin.close() 56 | -------------------------------------------------------------------------------- /bymc/src/piaDataCtx.ml: -------------------------------------------------------------------------------- 1 | open Spin 2 | open SpinIr 3 | open VarRole 4 | 5 | (* Context of parametric interval abstraction. 6 | It collects variable roles over different process prototypes. 7 | *) 8 | class pia_data_ctx i_roles = 9 | object(self) 10 | val mutable m_roles: var_role_tbl = i_roles 11 | val mutable m_hack_shared: bool = false 12 | 13 | method is_hack_shared = m_hack_shared 14 | method set_hack_shared b = m_hack_shared <- b 15 | 16 | method set_roles r = m_roles <- r 17 | 18 | method must_keep_concrete (e: token expr) = 19 | match e with 20 | | Var v -> 21 | begin 22 | try m_hack_shared && is_shared_unbounded (m_roles#get_role v) 23 | with VarRole.Var_not_found _ -> false 24 | end 25 | 26 | | _ -> false 27 | 28 | method var_needs_abstraction (v: var) = 29 | let is_bounded_scratch = 30 | match m_roles#get_role v with 31 | | Scratch o -> is_bounded (m_roles#get_role o) 32 | | _ -> false 33 | in 34 | let r = m_roles#get_role v in 35 | (not (self#must_keep_concrete (Var v))) 36 | && (not (is_bounded r)) && (not is_bounded_scratch) 37 | end 38 | 39 | 40 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/datalimit.c: -------------------------------------------------------------------------------- 1 | /* $Id: datalimit.c,v 1.5 2007/08/24 18:17:31 fabio Exp fabio $ */ 2 | 3 | #ifndef HAVE_SYS_RESOURCE_H 4 | #define HAVE_SYS_RESOURCE_H 1 5 | #endif 6 | #ifndef HAVE_SYS_TIME_H 7 | #define HAVE_SYS_TIME_H 1 8 | #endif 9 | #ifndef HAVE_GETRLIMIT 10 | #define HAVE_GETRLIMIT 1 11 | #endif 12 | 13 | #if HAVE_SYS_RESOURCE_H == 1 14 | #if HAVE_SYS_TIME_H == 1 15 | #include 16 | #endif 17 | #include 18 | #endif 19 | 20 | #ifndef RLIMIT_DATA_DEFAULT 21 | #define RLIMIT_DATA_DEFAULT 67108864 /* assume 64MB by default */ 22 | #endif 23 | 24 | #ifndef EXTERN 25 | # ifdef __cplusplus 26 | # define EXTERN extern "C" 27 | # else 28 | # define EXTERN extern 29 | # endif 30 | #endif 31 | 32 | EXTERN unsigned long getSoftDataLimit(void); 33 | 34 | unsigned long 35 | getSoftDataLimit(void) 36 | { 37 | #if HAVE_SYS_RESOURCE_H == 1 && HAVE_GETRLIMIT == 1 && defined(RLIMIT_DATA) 38 | struct rlimit rl; 39 | int result; 40 | 41 | result = getrlimit(RLIMIT_DATA, &rl); 42 | if (result != 0 || rl.rlim_cur == RLIM_INFINITY) 43 | return((unsigned long) RLIMIT_DATA_DEFAULT); 44 | else 45 | return((unsigned long) rl.rlim_cur); 46 | #else 47 | return((unsigned long) RLIMIT_DATA_DEFAULT); 48 | #endif 49 | 50 | } /* end of getSoftDataLimit */ 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/mnemosyne/Makefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Makefile for the Mnemosyne memory allocation tracker. 4 | # 5 | # Marcus J. Ranum, 1990 6 | # 7 | #Options: 8 | # define MALLOC_IS_VOIDSTAR if your system's malloc is declared as a (void *) 9 | # otherwise, it is assumed to be a (char *). a "mall_t" is typedeffed in 10 | # mnemconf.h and mnemosyne.h to implement this. 11 | OPTNS = -DMALLOC_IS_VOIDSTAR 12 | #OPTNS = 13 | 14 | CC = cc 15 | RANLIB = ranlib 16 | 17 | #compiler flags 18 | CFLAGS = -g $(OPTNS) $(XCFLAGS) 19 | 20 | #loader flags 21 | LDFLGS = 22 | 23 | HDRS = mnemosyne.h mnemconf.h 24 | 25 | all: mnemalyse libmnem.a 26 | 27 | mnemalyse: mnemalyse.o 28 | $(CC) $(LDFLGS) -o $@ mnemalyse.o 29 | 30 | libmnem.a: mnemosyne.o 31 | ar rcv $@ mnemosyne.o 32 | $(RANLIB) $@ 33 | 34 | mtest: mtest.o libmnem.a 35 | $(CC) $(LDFLGS) -o $@ mtest.o libmnem.a 36 | 37 | runmtest: all mtest 38 | @echo "running memory waster" 39 | mtest 40 | @echo "press return for symbol list"; read ff 41 | @cat mnem.syms 42 | @echo "press return for waste analysis"; read ff 43 | mnemalyse 44 | 45 | clean: 46 | rm -f mtest core *.o mnem.dat mnem.syms 47 | 48 | distclean: clean 49 | rm -f *.bak *~ libmnem.a mnemalyse 50 | 51 | 52 | mnemosyne.o: Makefile mnemosyne.c $(HDRS) 53 | mnemalyse.o: Makefile mnemalyse.c $(HDRS) 54 | -------------------------------------------------------------------------------- /bymc/src/taParser.ml: -------------------------------------------------------------------------------- 1 | open Batteries 2 | open Lexing 3 | 4 | open Spinlex 5 | 6 | exception ParseErr of string 7 | 8 | let position_s lexbuf = 9 | let pos = lexbuf.lex_curr_p in 10 | Printf.sprintf 11 | "%s:%d:%d" pos.pos_fname pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1) 12 | 13 | 14 | let lex_pp lexfun buf = 15 | let tok = lexfun buf in 16 | (* (* uncomment to debug (you can feed the stream to menhir --interpret): *) 17 | Printf.printf "%s " (Talex.token_s tok); 18 | *) 19 | tok 20 | 21 | 22 | let parse_input name input = 23 | let buf = Lexing.from_channel input in 24 | buf.lex_curr_p <- { buf.lex_curr_p with pos_fname = name }; 25 | SpinParserState.reset_state (); 26 | try Ta.start (lex_pp Talex.token) buf with 27 | | Spinlex.Unexpected_token msg -> 28 | raise (ParseErr (Printf.sprintf "%s%!\n" msg)) 29 | 30 | | TaErr.SyntaxErr msg -> 31 | raise (ParseErr (Printf.sprintf "%s: %s%!\n" (position_s buf) msg)) 32 | 33 | | TaErr.SemanticErr msg -> 34 | raise (ParseErr (Printf.sprintf "%s%!\n" msg)) 35 | 36 | | Ta.Error -> 37 | raise (ParseErr ((position_s buf) ^ "%s: syntax error\n")) 38 | 39 | 40 | let parse_file filename = 41 | let input = open_in filename in 42 | let res = parse_input filename input in 43 | IO.close_in input; 44 | res 45 | 46 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/test-res.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "util.h" 3 | 4 | 5 | main(argc, argv, environ) 6 | int argc; 7 | char **argv; 8 | char **environ; 9 | { 10 | int i; 11 | char **ep, *prog; 12 | 13 | prog = util_path_search(argv[0]); 14 | if (prog == NIL(char)) { 15 | (void) fprintf(stderr, "Cannot find current executable\n"); 16 | exit(1); 17 | } 18 | util_restart(prog, "a.out", 0); 19 | 20 | i = recur(10); 21 | (void) fprintf(stderr, "terminated normally with i = %d\n", i); 22 | 23 | (void) printf("argc is %d\n", argc); 24 | 25 | for(i = 0, ep = argv; *ep != 0; i++, ep++) { 26 | (void) printf("%08x (%08x-%08x)\targv[%d]:\t%s\n", 27 | ep, *ep, *ep + strlen(*ep), i, *ep); 28 | } 29 | 30 | i = 0; 31 | for(i = 0, ep = environ; *ep != 0; ep++, i++) { 32 | (void) printf("%08x (%08x-%08x)\tenviron[%d]:\t%s\n", 33 | ep, *ep, *ep + strlen(*ep), i, *ep); 34 | } 35 | 36 | (void) fprintf(stderr, "returning with status=4\n"); 37 | return 4; 38 | } 39 | 40 | 41 | recur(cnt) 42 | { 43 | int i, j, sum; 44 | 45 | if (cnt > 0) { 46 | return recur(cnt-1); 47 | } else { 48 | sum = 0; 49 | for(j = 0; j < 20; j++) { 50 | for(i = 0; i < 100000; i++) { 51 | sum += 1; 52 | } 53 | (void) printf("done loop %d\n", j); 54 | } 55 | return sum; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/texpand.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | #ifdef BSD 7 | #include 8 | #endif 9 | 10 | 11 | char * 12 | util_tilde_expand(char const *fname) 13 | { 14 | #ifdef BSD 15 | struct passwd *userRecord; 16 | char username[256], *filename; 17 | register int i, j; 18 | 19 | filename = ALLOC(char, strlen(fname) + 256); 20 | 21 | /* Clear the return string */ 22 | i = 0; 23 | filename[0] = '\0'; 24 | 25 | /* Tilde? */ 26 | if (fname[0] == '~') { 27 | j = 0; 28 | i = 1; 29 | while ((fname[i] != '\0') && (fname[i] != '/')) { 30 | username[j++] = fname[i++]; 31 | } 32 | username[j] = '\0'; 33 | 34 | if (username[0] == '\0') { 35 | /* ~/ resolves to home directory of current user */ 36 | if ((userRecord = getpwuid(getuid())) != 0) { 37 | (void) strcat(filename, userRecord->pw_dir); 38 | } else { 39 | i = 0; 40 | } 41 | } else { 42 | /* ~user/ resolves to home directory of 'user' */ 43 | if ((userRecord = getpwnam(username)) != 0) { 44 | (void) strcat(filename, userRecord->pw_dir); 45 | } else { 46 | i = 0; 47 | } 48 | } 49 | } 50 | 51 | /* Concantenate remaining portion of file name */ 52 | (void) strcat(filename, fname + i); 53 | return filename; 54 | #else 55 | return strsav(fname); 56 | #endif 57 | } 58 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/stub.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #ifdef LACK_SYS5 4 | 5 | char * 6 | memcpy(s1, s2, n) 7 | char *s1, *s2; 8 | int n; 9 | { 10 | extern bcopy(); 11 | bcopy(s2, s1, n); 12 | return s1; 13 | } 14 | 15 | char * 16 | memset(s, c, n) 17 | char *s; 18 | int c; 19 | int n; 20 | { 21 | extern bzero(); 22 | register int i; 23 | 24 | if (c == 0) { 25 | bzero(s, n); 26 | } else { 27 | for(i = n-1; i >= 0; i--) { 28 | *s++ = c; 29 | } 30 | } 31 | return s; 32 | } 33 | 34 | char * 35 | strchr(s, c) 36 | char *s; 37 | int c; 38 | { 39 | extern char *index(); 40 | return index(s, c); 41 | } 42 | 43 | char * 44 | strrchr(s, c) 45 | char *s; 46 | int c; 47 | { 48 | extern char *rindex(); 49 | return rindex(s, c); 50 | } 51 | 52 | 53 | #endif 54 | 55 | #ifndef UNIX 56 | #include 57 | 58 | FILE * 59 | popen(string, mode) 60 | const char *string; 61 | const char *mode; 62 | { 63 | (void) fprintf(stderr, "popen not supported on your operating system\n"); 64 | return NULL; 65 | } 66 | 67 | 68 | int 69 | pclose(fp) 70 | FILE *fp; 71 | { 72 | (void) fprintf(stderr, "pclose not supported on your operating system\n"); 73 | return -1; 74 | } 75 | #endif 76 | 77 | /* put something here in case some compilers abort on empty files ... */ 78 | int 79 | util_do_nothing() 80 | { 81 | return 1; 82 | } 83 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/example3.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -i 2 | # This example shows how to use the BREL interface 3 | # 4 | 5 | ###################################### 6 | ### 7 | ### NOTE: THIS IS STILL IN BETA 8 | ### 9 | ###################################### 10 | 11 | import pycudd 12 | m = pycudd.DdManager() 13 | m.SetDefault() 14 | 15 | # Note how the DdArrays are created and initialised 16 | ips = pycudd.DdArray(2) 17 | ops=pycudd.DdArray(2) 18 | a = m.IthVar(0) 19 | b = m.IthVar(1) 20 | c = m.IthVar(2) 21 | d = m.IthVar(3) 22 | ips.Push(a) 23 | ips.Push(b) 24 | ops.Push(c) 25 | ops.Push(d) 26 | 27 | # 28 | # Create a relation -- this maps 00 -> 00, 11; 11 -> 01, 10; 01 -> --; 10 -> -- 29 | # 30 | rel = (~a & ~b & ((~c & ~d) | (c & d))) | (a & b & ((~c & d) | (c & ~d))) 31 | rel |= (~a & b) 32 | rel |= (a & ~b) 33 | print "The relation is" 34 | rel.PrintMinterm() 35 | 36 | # Create a BrelRelation_t object 37 | bbr = pycudd.BrelRelation_t(rel,ips,ops) 38 | # Create a BREL Context -- more methods will be added to this class 39 | ct = pycudd.BrelContext_t() 40 | # Call the solver 41 | z = bbr.SolveRelation(ct) 42 | 43 | # 44 | # The solution is returned as a DdArray, which contains functions for the onset of 45 | # each minimised output. In our case, note how output 1 is reduced to always 0 -- 46 | # thus, the call to PrintMinterm doesn't produce any output 47 | # 48 | print "Output 0 is" 49 | z[0].PrintMinterm() 50 | 51 | print "Output 1 is" 52 | z[1].PrintMinterm() 53 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test3.out: -------------------------------------------------------------------------------- 1 | rm: No match. 2 | --------------------------------------------------------------------------- 3 | ----------------------- TESTING basic Load/Store ... ---------------------- 4 | --------------------------------------------------------------------------- 5 | #./../testdddmp Version 2.0.2 (use command help) 6 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Loading 0.bdd ... 7 | TestDddmp> File : Which BDDs [0..19]: Loading 1.bdd ... 8 | TestDddmp> Operation [or,and,xor,!,buf(=)] : Source1 [0..19]: Source2 [0..19]: Destination [0..19]: TestDddmp> File : Which BDDs [0..19]: Storing 0or1.bdd.tmp ... 9 | TestDddmp> File : Which BDDs [0..19]: Loading 2.bdd ... 10 | TestDddmp> File : Which BDDs [0..19]: Loading 3.bdd ... 11 | TestDddmp> Operation [or,and,xor,!,buf(=)] : Source1 [0..19]: Source2 [0..19]: Destination [0..19]: TestDddmp> File : Which BDDs [0..19]: Storing 2and3.bdd.tmp ... 12 | TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Loading 4.bdd ... 13 | TestDddmp> File : Which BDDs [0..19]: Loading 5.bdd ... 14 | TestDddmp> Operation [or,and,xor,!,buf(=)] : Source1 [0..19]: Source2 [0..19]: Destination [0..19]: TestDddmp> File : Which BDDs [0..19]: Storing 4xor5.bdd.tmp ... 15 | TestDddmp> Quitting CUDD Manager. 16 | TestDddmp> End of test. 17 | ----------------------------- ... RESULTS ... ----------------------------- 18 | -------------------------------- ... END ---------------------------------- 19 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/epd/Makefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # epd -- extended precision 4 | #--------------------------------------------------------------------------- 5 | .SUFFIXES: .c .o .u 6 | 7 | CC = gcc 8 | RANLIB = ranlib 9 | 10 | MFLAG = 11 | ICFLAGS = -g -O6 -Wall 12 | CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS) 13 | 14 | LINTFLAGS = -u -n 15 | 16 | # this is to create the lint library 17 | LINTSWITCH = -o 18 | 19 | P = epd 20 | PSRC = epd.c 21 | PHDR = epd.h 22 | POBJ = $(PSRC:.c=.o) 23 | PUBJ = $(PSRC:.c=.u) 24 | 25 | WHERE = .. 26 | INCLUDE = $(WHERE)/include 27 | 28 | 29 | 30 | 31 | #--------------------------- 32 | 33 | lib$(P).a: $(POBJ) 34 | ar rv $@ $? 35 | $(RANLIB) $@ 36 | 37 | .c.o: $(PSRC) $(PHDR) 38 | $(CC) -c $< -I$(INCLUDE) $(CFLAGS) 39 | 40 | optimize_dec: lib$(P).b 41 | 42 | lib$(P).b: $(PUBJ) 43 | ar rv $@ $? 44 | $(RANLIB) $@ 45 | 46 | .c.u: $(PSRC) $(PHDR) 47 | cc -j $< -I$(INCLUDE) $(XCFLAGS) 48 | 49 | # if the header files change, recompile 50 | $(POBJ): $(PHDR) 51 | $(PUBJ): $(PHDR) 52 | 53 | lint: llib-l$(P).ln 54 | 55 | llib-l$(P).ln: $(PSRC) $(PHDR) 56 | lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC) 57 | 58 | tags: $(PSRC) $(PHDR) 59 | ctags $(PSRC) $(PHDR) 60 | 61 | all: lib$(P).a lib$(P).b llib-l$(P).ln tags 62 | 63 | clean: 64 | rm -f *.o *.u .pure *.warnings 65 | 66 | distclean: clean 67 | rm -f lib*.a lib$(P).b llib-l$(P).ln tags *~ *.bak *.qv *.qx 68 | 69 | 70 | libso: 71 | gcc -shared $(POBJ) -o ../lib/libcuddepd.so 72 | -------------------------------------------------------------------------------- /bymc/doc/forte20.md: -------------------------------------------------------------------------------- 1 | # Resources on ByMC for FORTE'2020 2 | 3 | Check the [tutorial paper at FORTE'20](https://link.springer.com/chapter/10.1007%2F978-3-030-50086-3_11). 4 | 5 | We recommend trying ByMC in [VirtualBox](https://www.virtualbox.org/). To do 6 | so, download 7 | [bymc-2.4.4.ova](http://forsyte.at/static/download/bymc-2.4.4.ova), import the 8 | appliance in VirtualBox and login as `user` using the password `user`. The tool 9 | source code is available at the [github 10 | repository](https://github.com/konnov/bymc). 11 | 12 | To find the commmand-line parameters, see [ByMC 13 | tutorial](https://github.com/konnov/bymc/blob/master/bymc/doc/tutorial.md). 14 | The related papers can be found at the [ByMC 15 | page](https://forsyte.at/software/bymc/) at [Forsyte](https://forsyte.at). 16 | 17 | You may also like to check the 18 | [examples](https://github.com/konnov/fault-tolerant-benchmarks/tree/master/forte20) 19 | of the threshold automata that are presented in the tutorial. A larger set of 20 | ByMC benchmarks is available in the 21 | [TA-format](https://github.com/konnov/fault-tolerant-benchmarks/tree/master/isola18/ta) 22 | and [Parametric 23 | Promela](https://github.com/konnov/fault-tolerant-benchmarks/tree/master/isola18/promela) 24 | (the latter use an additional abstraction step). The TA-format is summarized 25 | [here](https://github.com/konnov/bymc/blob/master/bymc/doc/ta-format.md). 26 | 27 | If you have any questions on this tutorial, ask [Igor Konnov](https://konnov.github.io/). 28 | 29 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/st/Makefile: -------------------------------------------------------------------------------- 1 | # $Id: Makefile,v 1.3 2004/01/01 06:53:06 fabio Exp fabio $ 2 | # 3 | # st -- hash table package 4 | #--------------------------------------------------------------------------- 5 | .SUFFIXES: .c .o .u 6 | 7 | CC = gcc 8 | RANLIB = ranlib 9 | 10 | MFLAG = 11 | ICFLAGS = -g -O6 -Wall 12 | CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS) 13 | 14 | LINTFLAGS = -u -n 15 | 16 | # this is to create the lint library 17 | LINTSWITCH = -o 18 | 19 | P = st 20 | PSRC = st.c 21 | PHDR = st.h 22 | POBJ = $(PSRC:.c=.o) 23 | PUBJ = $(PSRC:.c=.u) 24 | 25 | WHERE = .. 26 | INCLUDE = $(WHERE)/include 27 | 28 | 29 | 30 | 31 | 32 | #--------------------------- 33 | 34 | lib$(P).a: $(POBJ) 35 | ar rv $@ $? 36 | $(RANLIB) $@ 37 | 38 | .c.o: $(PHDR) 39 | $(CC) -c $< -I$(INCLUDE) $(CFLAGS) 40 | 41 | optimize_dec: lib$(P).b 42 | 43 | lib$(P).b: $(PUBJ) 44 | ar rv $@ $? 45 | $(RANLIB) $@ 46 | 47 | .c.u: $(PSRC) $(PHDR) 48 | cc -j $< -I$(INCLUDE) $(XCFLAGS) 49 | 50 | # if the header files change, recompile 51 | $(POBJ): $(PHDR) 52 | $(PUBJ): $(PHDR) 53 | 54 | lint: llib-l$(P).ln 55 | 56 | llib-l$(P).ln: $(PSRC) $(PHDR) 57 | lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC) 58 | 59 | tags: $(PSRC) $(PHDR) 60 | ctags $(PSRC) $(PHDR) 61 | 62 | all: lib$(P).a lib$(P).b llib-l$(P).ln tags 63 | 64 | clean: 65 | rm -f *.o *.u .pure *.warnings 66 | 67 | distclean: clean 68 | rm -f lib*.a lib$(P).b llib-l$(P).ln tags *~ *.bak *.qv *.qx 69 | 70 | 71 | libso: 72 | gcc -shared $(POBJ) -o ../lib/libcuddst.so 73 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test4.out: -------------------------------------------------------------------------------- 1 | rm: No match. 2 | --------------------------------------------------------------------------- 3 | ---------- TESTING Load/Store with sifting, varnames & varauxids ---------- 4 | --------------------------------------------------------------------------- 5 | #./../testdddmp Version 2.0.2 (use command help) 6 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Loading 4.bdd ... 7 | TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Storing 4a.bdd.tmp ... 8 | TestDddmp> Reordering Approach (1..17): TestDddmp> File : Which BDDs [0..19]: Storing 4b.bdd.tmp ... 9 | TestDddmp> Quitting CUDD Manager. 10 | TestDddmp> End of test. 11 | ------------------------- ... END PHASE 1 ... ----------------------------- 12 | #./../testdddmp Version 2.0.2 (use command help) 13 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> Variable matchmode: 14 | Match IDs (1) 15 | Match permIDs (2) 16 | Match names (must have been loaded) (3) 17 | Match auxids (must have been loaded) (4) 18 | Match composeids (must have been loaded) (5) 19 | Your choice: TestDddmp> File : Which BDDs [0..19]: Loading 4b.bdd.tmp ... 20 | TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Storing 4c.bdd.tmp ... 21 | TestDddmp> Quitting CUDD Manager. 22 | TestDddmp> End of test. 23 | ----------------------------- ... RESULTS ... ----------------------------- 24 | -------------------------------- ... END ---------------------------------- 25 | -------------------------------------------------------------------------------- /bymc/test/test3.pml: -------------------------------------------------------------------------------- 1 | /** 2 | A simple test, one pc, two intervals for received. 3 | */ 4 | 5 | #define IT 0 /* the initial state */ 6 | #define PC_SZ 4 7 | 8 | #define FALSE 0 9 | #define TRUE 1 10 | 11 | symbolic int N; /* the number of processes: correct + faulty */ 12 | symbolic int T; /* the threshold */ 13 | symbolic int F; /* the actual number of faulty processes */ 14 | 15 | int nsnt; 16 | 17 | assume(N > 3); 18 | assume(F >= 0); 19 | assume(T >= 1); 20 | assume(N > 3 * T); 21 | assume(F <= T); 22 | 23 | atomic prec_unforg = all(Proc:pc == 0); 24 | atomic prec_init = all(Proc@end); 25 | atomic ex_acc = some(Proc:pc == 0); 26 | atomic in_transit = some(Proc:nrcvd < nsnt); 27 | 28 | active[N - F] proctype Proc() { 29 | byte pc = 0, next_pc = 0; 30 | int nrcvd = 0, next_nrcvd = 0; 31 | 32 | /* INIT */ 33 | if 34 | :: pc = 0; 35 | fi; 36 | 37 | /* THE ALGORITHM */ 38 | end: /* at some point there will be nothing to do */ 39 | do 40 | :: atomic { 41 | if 42 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 43 | :: else -> next_nrcvd = nrcvd; 44 | fi; 45 | if 46 | :: next_pc = pc; /* pc never changes */ 47 | fi; 48 | nsnt = next_nrcvd; 49 | pc = next_pc; 50 | nrcvd = next_nrcvd; 51 | next_pc = 0; 52 | next_nrcvd = 0; 53 | } 54 | od; 55 | } 56 | 57 | ltl fairness { []<>(!in_transit) } 58 | ltl unforg { []((prec_init && prec_unforg) -> []!ex_acc) } 59 | 60 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/example1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -i 2 | ## Change above to point to your python. The -i option leaves you in interactive mode after the script has completed. Use ctrl-d to exit python. 3 | 4 | ## Import the pycudd module 5 | import pycudd 6 | 7 | ## 8 | ## The next two steps are essential. PyCUDD has been set up so that the multitudinous 9 | ## references to the DdManager are obviated. To achieve this, there is the notion of 10 | ## a default manager. Though you may have as many DdManager objects as you want, only 11 | ## one of them is active at any given point of time. All operations that require a 12 | ## manager use the manager that last called the SetDefault method. 13 | ## 14 | ## NOTE: The DdManager constructor takes the same arguments as Cudd_Init. Refer ddmanager.i 15 | ## to see the default values (which can be overriden when you call it) 16 | ## 17 | mgr = pycudd.DdManager() 18 | mgr.SetDefault() 19 | 20 | 21 | ## This simple example finds the truths set of f = (f0 | f1) & f2 where 22 | ## f0 = (x4 & ~x3) | x2 23 | ## f1 = (x3 & x1) | ~x0 24 | ## f2 = ~x0 + ~x3 + x4 25 | ## and x0 through x4 are individual Boolean variables 26 | 27 | ## Create bdd variables x0 through x4 28 | x0 = mgr.IthVar(0) 29 | x1 = mgr.IthVar(1) 30 | x2 = mgr.IthVar(2) 31 | x3 = mgr.IthVar(3) 32 | x4 = mgr.IthVar(4) 33 | 34 | ## Compute functions f0 through f2 35 | f0 = (x4 & ~x3) | x2 36 | f1 = (x3 & x1) | ~x0 37 | f2 = ~x0 + ~x3 + x4 38 | 39 | ## Compute function f 40 | f = (f0 | f1) & f2 41 | 42 | ## Print the truth set of f 43 | f.PrintMinterm() 44 | 45 | 46 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/test5.out: -------------------------------------------------------------------------------- 1 | rm: No match. 2 | --------------------------------------------------------------------------- 3 | --------------------- TESTING Load ADD and Store ADD ---------------------- 4 | --------------------------------------------------------------------------- 5 | #./../testdddmp Version 2.0.2 (use command help) 6 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Loading 0.add ... 7 | Load: 8 | -01 2 9 | -1- 1 10 | TestDddmp> File : Which BDDs [0..19]: Storing 0.add.tmp ... 11 | TestDddmp> Quitting CUDD Manager. 12 | TestDddmp> Number of Variables: TestDddmp> File : TestDddmp> File : Which BDDs [0..19]: Loading 1.add ... 13 | Load: 14 | -0001--------------------------------------------- 1 15 | -0010--------------------------------------------- 2 16 | -0100--------------------------------------------- 1 17 | -0101--------------------------------------------- 2 18 | -0111--------------------------------------------- 1 19 | -1000--------------------------------------------- 2 20 | -1010--------------------------------------------- 1 21 | -1011--------------------------------------------- 2 22 | -1101--------------------------------------------- 1 23 | -1110--------------------------------------------- 2 24 | TestDddmp> File : Which BDDs [0..19]: Storing 1.add.tmp ... 25 | TestDddmp> Quitting CUDD Manager. 26 | TestDddmp> End of test. 27 | ----------------------------- ... RESULTS ... ----------------------------- 28 | -------------------------------- ... END ---------------------------------- 29 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/Makefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # util -- miscellaneous utility routines 4 | #--------------------------------------------------------------------------- 5 | .SUFFIXES: .c .o .u 6 | 7 | CC = gcc 8 | RANLIB = ranlib 9 | 10 | FLAGS = -DUNIX 11 | MFLAG = 12 | ICFLAGS = -g 13 | CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS) 14 | 15 | LINTFLAGS = -u -n 16 | 17 | # this is to create the lint library 18 | LINTSWITCH = -o 19 | 20 | P = util 21 | PSRC = cpu_time.c cpu_stats.c getopt.c safe_mem.c strsav.c texpand.c \ 22 | ptime.c prtime.c pipefork.c pathsearch.c stub.c \ 23 | tmpfile.c datalimit.c 24 | POBJ = $(PSRC:.c=.o) 25 | PUBJ = $(PSRC:.c=.u) 26 | PHDR = util.h 27 | 28 | WHERE = .. 29 | INCLUDE = $(WHERE)/include 30 | 31 | 32 | 33 | 34 | lib$(P).a: $(POBJ) 35 | ar rv $@ $? 36 | $(RANLIB) $@ 37 | 38 | .c.o: $(PHDR) 39 | $(CC) -c $< -I$(INCLUDE) $(FLAGS) $(CFLAGS) 40 | 41 | optimize_dec: lib$(P).b 42 | 43 | lib$(P).b: $(PUBJ) 44 | ar rv $@ $? 45 | $(RANLIB) $@ 46 | 47 | .c.u: $(PHDR) 48 | cc -j $< -I$(INCLUDE) $(FLAGS) $(XCFLAGS) 49 | 50 | # if the header files change, recompile 51 | $(POBJ): $(PHDR) 52 | $(PUBJ): $(PHDR) 53 | 54 | lint: llib-l$(P).ln 55 | 56 | llib-l$(P).ln: $(PSRC) $(PHDR) 57 | lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC) 58 | 59 | tags: $(PSRC) $(PHDR) 60 | ctags $(PSRC) $(PHDR) 61 | 62 | all: lib$(P).a lib$(P).b llib-l$(P).ln tags 63 | 64 | clean: 65 | rm -f *.o *.u core *.warnings 66 | 67 | distclean: clean 68 | rm -f lib$(P).a lib$(P).b llib-l$(P).ln tags *.bak *~ .pure 69 | 70 | libso: 71 | gcc -shared $(POBJ) -o ../lib/libcuddutil.so 72 | 73 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/RELEASE.NOTES: -------------------------------------------------------------------------------- 1 | Release 2.4.2 of Cudd features several bug fixes. The most important 2 | are those that prevented Cudd from making full use of up to 4 GB of 3 | memory when using 32-bit pointers. A handful of bugs were discovered by 4 | Coverity. (Thanks to Christian Stangier!) 5 | 6 | This release can be compiled with either 64-bit pointers or 32-bit 7 | pointers on x86_64 platforms if sizeof(long) = sizeof(void *) = 8 and 8 | sizeof(int) = 4. This is known as the LP64 model. For 32-bit pointers, 9 | one usually needs supplementary libraries. On Ubuntu and Debian Linux, 10 | one needs g++-multilib, which can be installed with 11 | "apt-get install g++-multilib." 12 | 13 | Added functions 14 | 15 | DdNode *Cudd_Inequality (DdManager * dd, int N, int c, DdNode ** x, 16 | DdNode ** y); 17 | 18 | DdNode * Cudd_Disequality (DdManager * dd, int N, int c, DdNode ** x, 19 | DdNode ** y); 20 | 21 | DdNode * Cudd_bddInterval (DdManager * dd, int N, DdNode ** x, 22 | unsigned int lowerB, unsigned int upperB); 23 | 24 | Changed prototypes: 25 | 26 | int Cudd_DumpBlif (DdManager *dd, int n, DdNode **f, char 27 | **inames, char **onames, char *mname, FILE *fp, int mv); 28 | 29 | int Cudd_DumpBlifBody (DdManager *dd, int n, DdNode **f, char 30 | **inames, char **onames, FILE *fp, int mv); 31 | 32 | The additional parameter allows the caller to choose between plain blif 33 | and blif-MV. 34 | 35 | ---------------------------------------------------------------------- 36 | 37 | Release 2.4.1 of Cudd features one major change with respect to previous 38 | releases. The licensing terms are now explicitly stated. 39 | -------------------------------------------------------------------------------- /bymc/src/promelaToTaPlugin.ml: -------------------------------------------------------------------------------- 1 | 2 | open Plugin 3 | open SymbSkel 4 | 5 | (** 6 | A plugin that converts a program in Promela into a threshold automaton. 7 | 8 | @author Igor Konnov, 2016 9 | *) 10 | 11 | class promela_to_ta_plugin_t (plugin_name: string) = 12 | object(self) 13 | inherit analysis_plugin_t(plugin_name) 14 | inherit TaSource.ta_source_t 15 | 16 | val mutable m_skel: Sk.skel_t option = None 17 | 18 | method get_ta = 19 | match m_skel with 20 | | Some sk -> sk 21 | | None -> 22 | let m = 23 | "Plugin promela_to_ta_plugin_t has not been called yet" 24 | in 25 | raise (Failure m) 26 | 27 | method transform rt = 28 | (* Since the current definition of analysis_plugin_t requires 29 | us to transform a Program to a Program, we cannot return a 30 | threshold automaton directly. Instead of that, we keep it as 31 | an attribute that can be accessed with a method. 32 | *) 33 | let sprog = self#get_input0 in 34 | let tech = Options.get_plugin_opt rt#caches#options "schema.tech" in 35 | let is_ltl = tech <> Some "cav15" && tech <> Some "cav15-opt" in 36 | (* keep self-loops only for liveness properties *) 37 | let sk = 38 | Summary.summarize_optimize_fuse rt sprog ~keep_selfloops:is_ltl 39 | in 40 | m_skel <- Some sk; 41 | sprog 42 | 43 | method update_runtime rt = 44 | () 45 | 46 | end 47 | 48 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 1995-2004, Regents of the University of Colorado 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | Neither the name of the University of Colorado nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2012-2017 Igor Konnov, Josef Widder, Helmut Veith, 2 | Forsyte, Institute of Information Systems, Vienna University of Technology 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /bymc/CHANGES: -------------------------------------------------------------------------------- 1 | Version 2.4.2 2 | 3 | * fixing memory leaks 4 | 5 | * replacing the hashtable of fingerprints with a prefix tree 6 | 7 | * superincremental optimization 8 | 9 | * Allowing linear combinations in the left-hand side of a guard, 10 | e.g., a * x + b * y + c * z >= n - t + f. The coefficients a, b, ..., c 11 | should be either non-negative integers, or unknowns (for synthesis). 12 | The parameters can have both positive and negative coefficients. 13 | It is sound to use sums of shared variables in the guards. 14 | However, differences lead to undecidability. See CONCUR'18 for details. 15 | 16 | Version 2.4.1 17 | 18 | * Compatibility with MacOS 19 | 20 | * Multiple bugfixes 21 | 22 | 23 | Version 2.4.0 24 | 25 | * Artifact for OPODIS'17 26 | 27 | * Support for MPI 28 | 29 | * Binding against Z3 directly 30 | 31 | 32 | Version 2.2.1 33 | 34 | * threshold automata are supported directly as the input format 35 | 36 | * switched from ocaml parser to menhir 37 | 38 | 39 | Version 2.1.4 40 | 41 | * A stable artifact for POPL'17. 42 | 43 | 44 | Version 2.0.0 45 | 46 | * Stable support for liveness properties with schemas 47 | 48 | 49 | Version 1.0.1 50 | 51 | * A stable version of after CAV'15 52 | 53 | * Fixed all tests 54 | 55 | 56 | Version cav15-rc2 57 | 58 | * Reachability with schemas, CAV'15 59 | 60 | 61 | Version 0.8.0 62 | 63 | * Supporting SMTLIB2 64 | 65 | 66 | Version concur14-rc10 67 | 68 | * Computing diameter bounds for counter abstraction. CONCUR'14. 69 | 70 | * Encoding in NuSMV 71 | 72 | 73 | Version 0.1.2 74 | 75 | * Parameterized interval data and counter abstraction. FMCAD'13. 76 | 77 | -------------------------------------------------------------------------------- /bymc/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2012-2017 Igor Konnov, Josef Widder, Helmut Veith, 2 | Forsyte, Institute of Information Systems, Vienna University of Technology 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /bymc/src/stmtIns.ml: -------------------------------------------------------------------------------- 1 | (* This is a high-level interface to insert statements into the process code. 2 | Use it in case if you do not want to rewrite the process body completely, 3 | but only to insert a couple of statements in the middle. 4 | 5 | This module takes care of updating analysis caches, e.g., regions. 6 | That is why it is not recommended to use it in global rewrites. 7 | 8 | Igor Konnov, 2013 9 | *) 10 | 11 | open Printf 12 | 13 | open Accums 14 | open Infra 15 | open Program 16 | open SkelStruc 17 | open Spin 18 | open SpinIr 19 | 20 | type st = token mir_stmt 21 | 22 | (* 23 | Insert statement s after statement anchor, 24 | extend all anchor's regions to include s. 25 | *) 26 | let insert_after (struc: proc_struc) (p: token proc) 27 | (anchor: st) (elems: st list) = 28 | let sub_fun s = 29 | if (m_stmt_id anchor) = (m_stmt_id s) 30 | then (true, s :: elems) 31 | else (false, []) 32 | in 33 | let reg_tab = struc#get_regions p#get_name in 34 | reg_tab#extend_after anchor elems; 35 | proc_replace_body p (sub_stmt_with_list sub_fun p#get_stmts) 36 | 37 | (* 38 | Insert statement s before statement anchor, 39 | extend all anchor's regions to include s. 40 | *) 41 | let insert_before (struc: proc_struc) (p: token proc) 42 | (anchor: st) (elems: st list) = 43 | let sub_fun s = 44 | if (m_stmt_id anchor) = (m_stmt_id s) 45 | then (true, elems @ [s]) 46 | else (false, []) 47 | in 48 | let reg_tab = struc#get_regions p#get_name in 49 | reg_tab#extend_before anchor elems; 50 | proc_replace_body p (sub_stmt_with_list sub_fun p#get_stmts) 51 | 52 | -------------------------------------------------------------------------------- /bymc/test/test4.pml: -------------------------------------------------------------------------------- 1 | /** 2 | A simple test, one pc, two intervals for received. 3 | */ 4 | 5 | #define IT 0 /* the initial state */ 6 | #define PC_SZ 4 7 | 8 | #define FALSE 0 9 | #define TRUE 1 10 | 11 | symbolic int N; /* the number of processes: correct + faulty */ 12 | symbolic int T; /* the threshold */ 13 | symbolic int F; /* the actual number of faulty processes */ 14 | 15 | int nsnt; 16 | 17 | assume(N > 3); 18 | assume(F >= 0); 19 | assume(T >= 1); 20 | assume(N > 3 * T); 21 | assume(F <= T); 22 | 23 | atomic prec_unforg = all(Proc:pc == 0); 24 | atomic prec_init = all(Proc@end); 25 | atomic ex_acc = some(Proc:pc == 0); 26 | atomic in_transit = some(Proc:nrcvd < nsnt); 27 | 28 | active[N - F] proctype Proc() { 29 | byte pc = 0, next_pc = 0; 30 | int nrcvd = 0, next_nrcvd = 0; 31 | 32 | /* INIT */ 33 | if 34 | :: pc = 0; 35 | fi; 36 | 37 | /* THE ALGORITHM */ 38 | end: /* at some point there will be nothing to do */ 39 | do 40 | :: atomic { 41 | if 42 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 43 | :: else -> next_nrcvd = nrcvd; 44 | fi; 45 | if 46 | :: next_pc = 1; 47 | :: next_pc = pc; /* pc never changes */ 48 | fi; 49 | if 50 | :: nsnt == 0 -> nsnt++; 51 | :: else; 52 | fi; 53 | pc = next_pc; 54 | nrcvd = next_nrcvd; 55 | next_pc = 0; 56 | next_nrcvd = 0; 57 | } 58 | od; 59 | } 60 | 61 | ltl fairness { []<>(!in_transit) } 62 | ltl unforg { []((prec_init && prec_unforg) -> []!ex_acc) } 63 | 64 | -------------------------------------------------------------------------------- /bymc/verifypa-fast: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Check the result of PIA data abstraction with FAST. 4 | # 5 | # Igor Konnov, 2014 6 | 7 | FAST=${FAST:-"fast"} 8 | FAST_PLUGIN=${FAST_PLUGIN:-"lash-msdf"} 9 | MEM_LIMIT="unlimited" 10 | TIME_LIMIT="unlimited" 11 | 12 | # parse options 13 | DIR=`dirname $0` 14 | DIR=`cd "$DIR"; pwd` 15 | # parse options 16 | TEMPOPTS=`"$DIR"/script/ggetopt.py -o h --long help,plugin:,limit-time:,limit-mem: -n '$@' -- "$@"` 17 | if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi 18 | 19 | function help_and_quit() { 20 | echo "use $0 prog spec " 21 | echo " where are" 22 | echo " --plugin : set fast engine to (default: lash-msdf)" 23 | echo " --limit-time: limit (in seconds) cpu time of subprocesses (ulimit -t)" 24 | echo " --limit-mem: limit (in MB) virtual memory of subprocesses (ulimit -v)" 25 | echo " -h|--help: show this help message" 26 | exit 1 27 | } 28 | 29 | eval set -- "$TEMPOPTS" 30 | while true ; do 31 | case "$1" in 32 | --limit-time) TIME_LIMIT=$2 ; shift 2 ;; 33 | --limit-mem) MEM_LIMIT=$((1024*$2)) ; shift 2 ;; 34 | --plugin) FAST_PLUGIN=$2 ; shift 2 ;; 35 | -h|--help) help_and_quit ;; 36 | --) shift ; break ;; 37 | *) echo "Internal error!" ; help_and_quit ;; 38 | esac 39 | done 40 | 41 | if [ "$#" -lt 2 ]; then 42 | help_and_quit 43 | fi 44 | 45 | echo ulimit -SHv $MEM_LIMIT 46 | ulimit -SHv $MEM_LIMIT 47 | echo ulimit -SHt $TIME_LIMIT 48 | ulimit -SHt $TIME_LIMIT 49 | 50 | PROG=$1 51 | SPEC=$2 52 | shift 2 53 | export BYMC_FLAGS="$@ $BYMC_FLAGS" 54 | 55 | # run the tool 56 | export TARGET_MC=fast 57 | export FAST_PLUGIN 58 | `dirname $0`/script/refinement-loop.sh "$PROG" "$SPEC" 59 | 60 | -------------------------------------------------------------------------------- /bymc/src/piaDomPlugin.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | 3 | open Accums 4 | open Debug 5 | open PiaDom 6 | open Plugin 7 | open SpinIr 8 | open SpinIrImp 9 | 10 | class pia_dom_plugin_t (plugin_name: string) = 11 | object(self) 12 | inherit analysis_plugin_t plugin_name 13 | 14 | val mutable m_dom: pia_domain option = None 15 | 16 | method transform rt = 17 | let prog = self#get_input0 in 18 | let roles = rt#caches#analysis#get_var_roles prog in 19 | let pxz = (self#has_opt rt "pxz02") 20 | && (self#get_opt rt "pxz02") <> "0" in 21 | if pxz 22 | then begin 23 | m_dom <- Some (new pia_domain [IntConst 0; IntConst 1; IntConst 2]); 24 | log INFO " forced (0, 1, \\infty) by Pnueli, Xu, Zuck 2002" 25 | end else if self#has_opt rt "thresholds" 26 | then begin 27 | let ts = 28 | self#parse_thresholds prog (self#get_opt rt "thresholds") in 29 | let ts_s = str_join ", " (List.map expr_s ts) in 30 | log INFO (sprintf " forced the thresholds: [%s]" ts_s); 31 | m_dom <- Some (new pia_domain ts) 32 | end else m_dom <- Some (create rt#solver roles prog); 33 | log INFO (sprintf " PIA domain size: %d" (get_some m_dom)#length); 34 | prog 35 | 36 | method update_runtime rt = 37 | match m_dom with 38 | | Some d -> rt#caches#analysis#set_pia_dom d 39 | | _ -> () 40 | 41 | method parse_thresholds prog thr_s = 42 | let tss = Str.split (Str.regexp_string ",") thr_s in 43 | List.map (Parse.parse_expr (Program.get_sym_tab prog)) tss 44 | end 45 | 46 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/doc/bnetAllAbs.html: -------------------------------------------------------------------------------- 1 | 2 | bnet package abstract (Internal) 3 | 4 | 5 |

bnet package abstract (Internal)

6 |

7 |
8 | 9 | 10 | 11 |
12 |
Bnet_BuildNodeBDD() 13 |
Builds the BDD for the function of a node. 14 | 15 |
Bnet_DfsVariableOrder() 16 |
Orders the BDD variables by DFS. 17 | 18 |
Bnet_FreeNetwork() 19 |
Frees a boolean network created by Bnet_ReadNetwork. 20 | 21 |
Bnet_PrintNetwork() 22 |
Prints a boolean network created by readNetwork. 23 | 24 |
Bnet_PrintOrder() 25 |
Prints the order of the DD variables of a network. 26 | 27 |
Bnet_ReadNetwork() 28 |
Reads boolean network from blif file. 29 | 30 |
Bnet_ReadOrder() 31 |
Reads the variable order from a file. 32 | 33 |
Bnet_bddArrayDump() 34 |
Writes an array of BDDs to a file in dot, blif, DDcal, factored-form, or daVinci format. 35 | 36 |
Bnet_bddDump() 37 |
Writes the network BDDs to a file in dot, blif, or daVinci format. 38 | 39 |
40 | 41 |
42 | 43 | Generated automatically by extdoc on 1010215 44 | 45 | 46 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/doc/bnetExtAbs.html: -------------------------------------------------------------------------------- 1 | 2 | bnet package abstract 3 | 4 | 5 |

bnet package abstract

6 |

Simple-minded package to read a blif file.

7 |
8 | 9 | 10 | 11 |
12 |
Bnet_BuildNodeBDD() 13 |
Builds the BDD for the function of a node. 14 | 15 |
Bnet_DfsVariableOrder() 16 |
Orders the BDD variables by DFS. 17 | 18 |
Bnet_FreeNetwork() 19 |
Frees a boolean network created by Bnet_ReadNetwork. 20 | 21 |
Bnet_PrintNetwork() 22 |
Prints a boolean network created by readNetwork. 23 | 24 |
Bnet_PrintOrder() 25 |
Prints the order of the DD variables of a network. 26 | 27 |
Bnet_ReadNetwork() 28 |
Reads boolean network from blif file. 29 | 30 |
Bnet_ReadOrder() 31 |
Reads the variable order from a file. 32 | 33 |
Bnet_bddArrayDump() 34 |
Writes an array of BDDs to a file in dot, blif, DDcal, factored-form, or daVinci format. 35 | 36 |
Bnet_bddDump() 37 |
Writes the network BDDs to a file in dot, blif, or daVinci format. 38 | 39 |
40 | 41 |
42 | 43 | Generated automatically by extdoc on 1010215 44 | 45 | 46 | -------------------------------------------------------------------------------- /bymc/src/schemaOpt.mli: -------------------------------------------------------------------------------- 1 | (** 2 | Various options that control the behaviour of schema checkers. 3 | 4 | Igor Konnov, 2016 5 | *) 6 | 7 | (** is the solver working in the incremental mode? *) 8 | val is_incremental: unit -> bool 9 | (** set the solver to the incremental mode *) 10 | val set_incremental: bool -> unit 11 | 12 | (** is the control flow optimization enabled? *) 13 | val is_flow_opt_enabled: unit -> bool 14 | (** is the reachability optimization enabled *) 15 | val is_reach_opt_enabled: unit -> bool 16 | (** is the adaptive reachability optimization enabled *) 17 | val is_adaptive_reach_opt_enabled: unit -> bool 18 | 19 | (** enable/disable the control flow optimization *) 20 | val set_flow_opt: bool -> unit 21 | (** enable/disable the reachability optimization *) 22 | val set_reach_opt: bool ->unit 23 | (** enable/disable the reachability optimization *) 24 | val set_adaptive_reach_opt: bool -> unit 25 | 26 | (** how often to try to switch between the reachability 27 | and non-reachability optimizations (in the adaptive mode) *) 28 | val get_ada_reach_adapt_after: unit -> int 29 | (** set the number of rounds to wait before switching reachability on/off *) 30 | val set_ada_reach_adapt_after: int -> unit 31 | 32 | (** do we associate a predicate with every guard when switching contexts? 33 | (see BUGFIX-20160628) 34 | *) 35 | val use_guard_predicates: unit -> bool 36 | (** associate a predicate with every guard when switching a context *) 37 | val set_use_guard_predicates: bool -> unit 38 | 39 | (** is the total number of schemas always computed, 40 | even if there are too many (default: no) *) 41 | val is_always_compute_nschemas: unit -> bool 42 | 43 | (* enable/disable computation of the number of schemas *) 44 | val set_always_compute_nschemas: bool -> unit 45 | 46 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/tlcinfo.i: -------------------------------------------------------------------------------- 1 | %{ 2 | #ifndef FROM_PYCUDDI 3 | #error Use only from pycudd.i. Make sure to define FROM_PYCUDDI! 4 | #endif 5 | %} 6 | 7 | // Return the clauses as (valid?, (var1,phase1), (var2,phase2)) 8 | %typemap (argout) (DdHalfWord *dum_var1, DdHalfWord *dum_var2, int *dum_phase1, int *dum_phase2) { 9 | PyObject *o, *o2, *o3; 10 | o2 = $result; 11 | $result = PyTuple_New(3); 12 | PyTuple_SetItem($result,0,o2); 13 | 14 | o3 = PyTuple_New(2); 15 | if (*$1 == CUDD_MAXINDEX) o = PyInt_FromLong(-1); 16 | else o = PyInt_FromLong(*$1); 17 | PyTuple_SetItem(o3,0,o); 18 | o = PyInt_FromLong(*$3); 19 | PyTuple_SetItem(o3,1,o); 20 | PyTuple_SetItem($result,1,o3); 21 | 22 | o3 = PyTuple_New(2); 23 | if (*$2 == CUDD_MAXINDEX) o = PyInt_FromLong(-1); 24 | else o = PyInt_FromLong(*$2); 25 | PyTuple_SetItem(o3,0,o); 26 | o = PyInt_FromLong(*$4); 27 | PyTuple_SetItem(o3,1,o); 28 | PyTuple_SetItem($result,2,o3); 29 | 30 | Py_DECREF(o2); 31 | } 32 | 33 | 34 | %typemap(in,numinputs=0) DdHalfWord *dum_var1 (DdHalfWord dv1) { 35 | $1 = &dv1; 36 | } 37 | 38 | %typemap(in,numinputs=0) DdHalfWord *dum_var2 (DdHalfWord dv2) { 39 | $1 = &dv2; 40 | } 41 | 42 | struct DdTlcInfo { }; 43 | 44 | %extend DdTlcInfo { 45 | %pythoncode %{ 46 | __doc__ = "Helper class for enumeration of two literal clauses. Look at example2.py for usage." 47 | %} 48 | DdTlcInfo() { 49 | return NULL; 50 | } 51 | 52 | ~DdTlcInfo() { 53 | Cudd_tlcInfoFree(self); 54 | } 55 | %apply int *OUTPUT { int * dum_phase1 } 56 | %apply int *OUTPUT { int * dum_phase2 } 57 | int ReadIthClause(int i, DdHalfWord *dum_var1, DdHalfWord *dum_var2, int *dum_phase1, int *dum_phase2) { return Cudd_ReadIthClause(self, i, dum_var1, dum_var2, dum_phase1, dum_phase2); } 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /bymc/test/test2-4.pml: -------------------------------------------------------------------------------- 1 | /** 2 | * A parameterized model of the broadcast distributed algorithm 3 | * in the symbolic extension of Promela. 4 | * 5 | * Igor Konnov, Josef Widder, 2012 6 | */ 7 | 8 | #define IT 0 /* the initial state */ 9 | #define SE 1 /* the echo message sent */ 10 | #define PC_SZ 4 11 | 12 | #define FALSE 0 13 | #define TRUE 1 14 | 15 | symbolic int N; /* the number of processes: correct + faulty */ 16 | symbolic int T; /* the threshold */ 17 | symbolic int F; /* the actual number of faulty processes */ 18 | 19 | int nsnt; 20 | 21 | assume(N > 3); 22 | assume(F >= 0); 23 | assume(T >= 1); 24 | assume(N > 3 * T); 25 | assume(F <= T); 26 | 27 | atomic prec_unforg = all(Proc:pc == IT); 28 | atomic prec_init = all(Proc@end); 29 | atomic ex_acc = some(Proc:pc == SE); 30 | atomic in_transit = some(Proc:nrcvd < nsnt); 31 | 32 | active[N - F] proctype Proc() { 33 | byte pc = 0, next_pc = 0; 34 | int nrcvd = 0, next_nrcvd = 0; 35 | 36 | /* INIT */ 37 | pc = IT; 38 | 39 | /* THE ALGORITHM */ 40 | end: /* at some point there will be nothing to do */ 41 | do 42 | :: atomic { 43 | if 44 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 45 | :: else -> next_nrcvd = nrcvd; 46 | fi; 47 | if 48 | :: pc == 0 -> next_pc = 1; 49 | :: pc == 1 -> next_pc = 2; 50 | :: pc == 2 -> next_pc = 3; 51 | :: pc == 3 -> next_pc = pc; 52 | fi; 53 | nsnt = next_nrcvd; 54 | pc = next_pc; 55 | nrcvd = next_nrcvd; 56 | next_pc = 0; 57 | next_nrcvd = 0; 58 | } 59 | od; 60 | } 61 | 62 | ltl fairness { []<>(!in_transit) } 63 | ltl unforg { []((prec_init && prec_unforg) -> []!ex_acc) } 64 | 65 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/getopt.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | 7 | /* File : getopt.c 8 | * Author : Henry Spencer, University of Toronto 9 | * Updated: 28 April 1984 10 | * 11 | * Changes: (R Rudell) 12 | * changed index() to strchr(); 13 | * added getopt_reset() to reset the getopt argument parsing 14 | * 15 | * Purpose: get option letter from argv. 16 | */ 17 | 18 | char *util_optarg; /* Global argument pointer. */ 19 | int util_optind = 0; /* Global argv index. */ 20 | static char *scan; 21 | 22 | 23 | void 24 | util_getopt_reset() 25 | { 26 | util_optarg = 0; 27 | util_optind = 0; 28 | scan = 0; 29 | } 30 | 31 | 32 | 33 | int 34 | util_getopt(int argc, char * const argv[], char const *optstring) 35 | { 36 | register int c; 37 | register char *place; 38 | 39 | util_optarg = NIL(char); 40 | 41 | if (scan == NIL(char) || *scan == '\0') { 42 | if (util_optind == 0) util_optind++; 43 | if (util_optind >= argc) return EOF; 44 | place = argv[util_optind]; 45 | if (place[0] != '-' || place[1] == '\0') return EOF; 46 | util_optind++; 47 | if (place[1] == '-' && place[2] == '\0') return EOF; 48 | scan = place+1; 49 | } 50 | 51 | c = *scan++; 52 | place = strchr(optstring, c); 53 | if (place == NIL(char) || c == ':') { 54 | (void) fprintf(stderr, "%s: unknown option %c\n", argv[0], c); 55 | return '?'; 56 | } 57 | if (*++place == ':') { 58 | if (*scan != '\0') { 59 | util_optarg = scan; 60 | scan = NIL(char); 61 | } else { 62 | if (util_optind >= argc) { 63 | (void) fprintf(stderr, "%s: %c requires an argument\n", 64 | argv[0], c); 65 | return '?'; 66 | } 67 | util_optarg = argv[util_optind]; 68 | util_optind++; 69 | } 70 | } 71 | return c; 72 | } 73 | -------------------------------------------------------------------------------- /bymc/script/mod-verify-spin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Function specific to spin 4 | # 5 | # Igor Konnov, 2012-2013 6 | 7 | SPIN=${SPIN:-spin} 8 | LTL2BA="$BYMC_HOME/../deps/ltl2ba-1.1/ltl2ba" 9 | BYMC_FLAGS="${BYMC_FLAGS} --target spin" 10 | 11 | if [ ! -x "$LTL2BA" ]; then 12 | echo "WARNING: $LTL2BA is not found. Please go to `dirname $LTL2BA` and run make." 13 | echo "WARNING: using 'spin -f' instead of ltl2ba. Performance may degrade." 14 | echo "********************************************************************" 15 | LTL2BA="$SPIN" 16 | fi 17 | 18 | function mc_compile_first { 19 | ${TOOL} ${BYMC_FLAGS} -a ${PROG} \ 20 | || die "Failure: ${TOOL} -a ${PROG}" 21 | } 22 | 23 | function mc_verify_spec { 24 | echo "Converting the spec: !`head ${PROP}.ltl`..." 25 | ${LTL2BA} -f "!`head ${PROP}.ltl`" >${PROP}.never \ 26 | || die "`cat ${PROP}.never`" 27 | echo "Generating pan..." 28 | set -x # echo on 29 | ${SPIN} -a -N ${PROP}.never abs-counter.prm || die "spin failed" 30 | gcc ${rand} ${PANCC_FLAGS} -o ./pan pan.c 31 | set +x # echo off 32 | tee_or_die "${MC_OUT}" "pan failed" ./pan ${PAN_FLAGS} -a 2>&1 33 | 34 | # the status code of spin is the return value 35 | egrep -q "errors: +0" ${MC_OUT} 36 | } 37 | 38 | function mc_refine { 39 | ./pan -S | grep -v MSC | egrep '(^S\{|^X\{|START OF CYCLE)' > ${CEX} \ 40 | && tee_or_die "refinement.out" "refinement error" ${TOOL} -t ${CEX} 2>&1 41 | 42 | echo -e "The trace in the ABSTRACT system (produced by spin):\n" 43 | echo -n " 0 "; head -n 1 ${CEX} # start with 0 44 | tail -n '+2' ${CEX} | ${BYMC_HOME}/script/nl.py -n 30 45 | echo "" 46 | } 47 | 48 | function mc_collect_stat { 49 | mc_stat=`$BYMC_HOME/script/parse-spin-out.py $MC_OUT` 50 | echo "$mc_stat|11:technique=spin" 51 | } 52 | 53 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/README.dddmp: -------------------------------------------------------------------------------- 1 | README file for the DDDMP-2.0 package 2 | Revision: Version 2.0.2, February 01, 2004 3 | 4 | 5 | 6 | WHAT IS DDDMP 7 | ============= 8 | 9 | The DDDMP package defines formats for DD storage on file, and it contains a 10 | set of functions to dump DDs and DD forests on file. 11 | 12 | In the version 1.0, only BDDs (ROBDDs) of the CUDD package (version 2.2.0 13 | or higher) were supported. 14 | The version 2.0 includes supports for ADDs and CNF formulas. 15 | The version 2.0.2 is for bug fixes. 16 | 17 | 18 | 19 | MAKE DDDMP 20 | ========== 21 | 22 | Before you build the libraries and programs, you need to check the 23 | Makefile in the top directory. 24 | Go through the definitions contained in the configuration section, and 25 | select the desired compiler and compilation flags. 26 | Instructions are provided in the comments of the Makefile. 27 | 28 | Then run "make". 29 | This should produce the dddmplib.a library. 30 | 31 | 32 | 33 | DOCUMENTATION 34 | ============= 35 | 36 | Directory dddmp/doc contains HTML documentation for the package. 37 | The recommended starting point is package.html. 38 | Documentation in both postscript format and plain text format is also 39 | provided. 40 | 41 | 42 | 43 | FTP SITE 44 | ======== 45 | 46 | The package is singularly available from the author home page: 47 | http://staff.polito.it/{gianpiero.cabodi,stefano.quer} 48 | 49 | 50 | 51 | 52 | FEEDBACK 53 | ======== 54 | 55 | Send feedback to: 56 | 57 | Stefano Quer & Gianpiero Cabodi 58 | Politecnico di Torino 59 | Dip. Automatica e Informatica 60 | C.so Duca degli Abruzzi 24 61 | I-10129 Torino 62 | Italy 63 | E-mail: {gianpiero.cabodi,stefano.quer}@polito.it 64 | WEB page: http://staff.polito.it/{gianpiero.cabodi,stefano.quer} 65 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/cpu_time.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | #ifdef IBM_WATC /* IBM Waterloo-C compiler (same as bsd 4.2) */ 7 | #define void int 8 | #define BSD 9 | #endif 10 | 11 | #ifdef BSD 12 | #include 13 | #include 14 | #include 15 | #endif 16 | 17 | #if defined(UNIX60) || defined(UNIX100) || defined(__CYGWIN32__) 18 | #include 19 | #include 20 | #endif 21 | 22 | #ifdef vms /* VAX/C compiler -- times() with 100 HZ clock */ 23 | #include 24 | #include 25 | #endif 26 | 27 | 28 | 29 | /* 30 | * util_cpu_time -- return a long which represents the elapsed processor 31 | * time in milliseconds since some constant reference 32 | */ 33 | long 34 | util_cpu_time() 35 | { 36 | long t = 0; 37 | 38 | #ifdef BSD 39 | struct rusage rusage; 40 | (void) getrusage(RUSAGE_SELF, &rusage); 41 | t = (long) rusage.ru_utime.tv_sec*1000 + rusage.ru_utime.tv_usec/1000; 42 | #endif 43 | 44 | #ifdef IBMPC 45 | long ltime; 46 | (void) time(<ime); 47 | t = ltime * 1000; 48 | #endif 49 | 50 | #ifdef UNIX60 /* times() with 60 Hz resolution */ 51 | struct tms buffer; 52 | times(&buffer); 53 | t = buffer.tms_utime * 16.6667; 54 | #endif 55 | 56 | #ifdef UNIX100 57 | struct tms buffer; /* times() with 100 Hz resolution */ 58 | times(&buffer); 59 | t = buffer.tms_utime * 10; 60 | #endif 61 | 62 | #ifdef __CYGWIN32__ 63 | /* Works under Windows NT but not Windows 95. */ 64 | struct tms buffer; /* times() with 1000 Hz resolution */ 65 | times(&buffer); 66 | t = buffer.tms_utime; 67 | #endif 68 | 69 | #ifdef vms 70 | tbuffer_t buffer; /* times() with 100 Hz resolution */ 71 | times(&buffer); 72 | t = buffer.proc_user_time * 10; 73 | #endif 74 | 75 | return t; 76 | } 77 | -------------------------------------------------------------------------------- /bymc/verifypa-spin: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PANCC_FLAGS="-DCOLLAPSE -DNOREDUCE" 4 | 5 | DIR=`dirname $0` 6 | DIR=`cd "$DIR"; pwd` 7 | TEMPOPTS=`"$DIR"/script/ggetopt.py -o hd: --long help,depth:,on-disk-stack,limit-time:,limit-mem: -n '$@' -- "$@"` 8 | if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi 9 | 10 | function help_and_quit() { 11 | echo "use $0 [-d|--depth k] [-h|--help]" 12 | echo " -d|--depth k: limit the DFS search with depth k" 13 | echo " --on-disk-stack: use spin's on-disk stack (-DSC)" 14 | echo " --limit-time: limit (in seconds) Spin's cpu time" 15 | echo " --limit-mem: limit (in MB) Spin's virtual memory" 16 | echo " -h|--help: show this help message" 17 | echo "" 18 | echo " bymc_options are as follows:" 19 | echo " --smt 'lib2|z3|-smt2|-in' (default, use z3 as the backend solver)" 20 | echo " --smt 'lib2|mysolver|arg1|arg2|arg3' (use an SMT2 solver, unsat cores are required)" 21 | echo " --smt 'yices' (use yices 1.x as the backend solver, DEPRECATED)" 22 | exit 1 23 | } 24 | 25 | eval set -- "$TEMPOPTS" 26 | while true ; do 27 | case "$1" in 28 | -d|--depth) PAN_FLAGS="$PAN_FLAGS -m$2" ; shift 2 ;; 29 | --on-disk-stack) PANCC_FLAGS="$PAN_FLAGS -DSC" ; shift 1 ;; 30 | --limit-time) PAN_FLAGS="$PAN_FLAGS -Q$(((59+$2)/60))" ; 31 | shift 2 ;; 32 | --limit-mem) 33 | PANCC_FLAGS="$PANCC_FLAGS -DMEMLIM=$2" ; 34 | shift 2 ;; 35 | -h|--help) help_and_quit ;; 36 | --) shift ; break ;; 37 | *) echo "Internal error!" ; help_and_quit ;; 38 | esac 39 | done 40 | 41 | if [ "$#" -lt 2 ]; then 42 | help_and_quit 43 | fi 44 | 45 | PROG=$1 46 | SPEC=$2 47 | shift 2 48 | export BYMC_FLAGS="$@ $BYMC_FLAGS -O smt.unsat.cores=1" 49 | 50 | TARGET_MC=spin PAN_FLAGS="$PAN_FLAGS" PANCC_FLAGS="$PANCC_FLAGS"\ 51 | `dirname $0`/script/refinement-loop.sh "$PROG" "$SPEC" 52 | 53 | -------------------------------------------------------------------------------- /bymc/test/test2-6.pml: -------------------------------------------------------------------------------- 1 | /** 2 | * A parameterized model of the broadcast distributed algorithm 3 | * in the symbolic extension of Promela. 4 | * 5 | * Igor Konnov, Josef Widder, 2012 6 | */ 7 | 8 | #define IT 0 /* the initial state */ 9 | #define SE 1 /* the echo message sent */ 10 | #define PC_SZ 4 11 | 12 | #define FALSE 0 13 | #define TRUE 1 14 | 15 | symbolic int N; /* the number of processes: correct + faulty */ 16 | symbolic int T; /* the threshold */ 17 | symbolic int F; /* the actual number of faulty processes */ 18 | 19 | int nsnt; 20 | 21 | assume(N > 3); 22 | assume(F >= 0); 23 | assume(T >= 1); 24 | assume(N > 3 * T); 25 | assume(F <= T); 26 | 27 | atomic prec_unforg = all(Proc:pc == IT); 28 | atomic prec_init = all(Proc@end); 29 | atomic ex_acc = some(Proc:pc == SE); 30 | atomic in_transit = some(Proc:nrcvd < nsnt); 31 | 32 | active[N - F] proctype Proc() { 33 | byte pc = 0, next_pc = 0; 34 | int nrcvd = 0, next_nrcvd = 0; 35 | 36 | /* INIT */ 37 | pc = IT; 38 | 39 | /* THE ALGORITHM */ 40 | end: /* at some point there will be nothing to do */ 41 | do 42 | :: atomic { 43 | if 44 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 45 | :: else -> next_nrcvd = nrcvd; 46 | fi; 47 | if 48 | :: pc == 0 -> next_pc = 1; 49 | :: pc == 1 -> next_pc = 2; 50 | :: pc == 2 -> next_pc = 3; 51 | :: pc == 3 -> next_pc = 4; 52 | :: pc == 4 -> next_pc = 5; 53 | :: pc == 5 -> next_pc = pc; 54 | fi; 55 | nsnt = next_nrcvd; 56 | pc = next_pc; 57 | nrcvd = next_nrcvd; 58 | next_pc = 0; 59 | next_nrcvd = 0; 60 | } 61 | od; 62 | } 63 | 64 | ltl fairness { []<>(!in_transit) } 65 | ltl unforg { []((prec_init && prec_unforg) -> []!ex_acc) } 66 | 67 | -------------------------------------------------------------------------------- /bymc/src/absSimple.ml: -------------------------------------------------------------------------------- 1 | (* Very simple abstractions are collected here *) 2 | 3 | open Printf 4 | 5 | open Simplif 6 | open Spin 7 | open SpinIr 8 | open SpinIrImp 9 | 10 | (* 11 | Remove the variables recognized by is_nuked from the expression, i.e., 12 | replace any arithmetic expressions involving 'foo' with TRUE. 13 | It is somewhat similar to infinite data abstraction in CMP by McMillan. *) 14 | let nuke_vars is_nuked exp = 15 | let rec red = function 16 | | Var v -> 17 | if is_nuked v 18 | then (Var v, true) 19 | else (Var v, false) 20 | 21 | | IntConst i -> 22 | (IntConst i, false) 23 | 24 | | BinEx (PLUS as t, l, r) 25 | | BinEx (MINUS as t, l, r) 26 | | BinEx (MULT as t, l, r) 27 | | BinEx (DIV as t, l, r) 28 | | BinEx (MOD as t, l, r) -> 29 | let nl, nukel = red l and nr, nuker = red r in 30 | if nukel || nuker 31 | then (IntConst 1, true) 32 | else (BinEx (t, nl, nr), false) 33 | 34 | | BinEx (EQ as t, l, r) 35 | | BinEx (NE as t, l, r) 36 | | BinEx (LE as t, l, r) 37 | | BinEx (GE as t, l, r) 38 | | BinEx (LT as t, l, r) 39 | | BinEx (GT as t, l, r) -> 40 | let nl, nukel = red l and nr, nuker = red r in 41 | if nukel || nuker 42 | then (IntConst 1, false) 43 | else (BinEx (t, nl, nr), false) 44 | 45 | | BinEx (t, l, r) -> 46 | let nl, _ = red l and nr, _ = red r in 47 | (BinEx (t, nl, nr), false) 48 | 49 | (* next(x) in nusmv *) 50 | | UnEx (NEXT, e) -> 51 | let ne, nukee = red e in 52 | if nukee 53 | then (IntConst 1, true) 54 | else (UnEx (NEXT, ne), false) 55 | 56 | | UnEx (t, e) -> 57 | let ne, _ = red e in 58 | (UnEx (t, ne), false) 59 | 60 | | _ as e -> (e, false) 61 | in 62 | compute_consts (fst (red exp)) 63 | 64 | -------------------------------------------------------------------------------- /bymc/src/schemaOpt.ml: -------------------------------------------------------------------------------- 1 | 2 | module F = struct 3 | (** is the incremental mode enabled *) 4 | let incremental = ref true 5 | 6 | (** is the control flow optimization enabled *) 7 | let flow_opt_enabled = ref true 8 | (** is the reachability optimization enabled *) 9 | let reach_opt_enabled = ref true 10 | (** is the adaptive reachability optimization enabled *) 11 | let ada_reach_opt_enabled = ref true 12 | (** how often to try to switch between the reachability 13 | and non-reachability optimizations (in the adaptive mode) *) 14 | let ada_reach_adapt_after = ref 3 15 | (** do we introduce predicates for each guard when switching context? *) 16 | let use_guard_predicates = ref true 17 | (** do we always predict the number of schemas? *) 18 | let always_compute_nschemas = ref false 19 | end 20 | 21 | let is_incremental _ = 22 | !F.incremental 23 | 24 | let set_incremental b = 25 | F.incremental := b 26 | 27 | let is_flow_opt_enabled _ = 28 | !F.flow_opt_enabled 29 | 30 | let set_flow_opt enabled = 31 | F.flow_opt_enabled := enabled 32 | 33 | let is_reach_opt_enabled _ = 34 | !F.reach_opt_enabled 35 | 36 | let set_reach_opt enabled = 37 | F.reach_opt_enabled := enabled 38 | 39 | let is_adaptive_reach_opt_enabled _ = 40 | !F.ada_reach_opt_enabled 41 | 42 | let set_adaptive_reach_opt enabled = 43 | F.ada_reach_opt_enabled := enabled 44 | 45 | let get_ada_reach_adapt_after _ = 46 | !F.ada_reach_adapt_after 47 | 48 | let set_ada_reach_adapt_after n = 49 | F.ada_reach_adapt_after := n 50 | 51 | let use_guard_predicates _ = 52 | !F.use_guard_predicates 53 | 54 | let set_use_guard_predicates b = 55 | F.use_guard_predicates := b 56 | 57 | let is_always_compute_nschemas () = 58 | !F.always_compute_nschemas 59 | 60 | (* enable/disable computation of the number of schemas *) 61 | let set_always_compute_nschemas b = 62 | F.always_compute_nschemas := b 63 | 64 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/UNIMPLEMENTED: -------------------------------------------------------------------------------- 1 | UNNECESSARY FUNCTIONS 2 | --------------------- 3 | Reference counting and manager init and shutdown are all implicitly done: 4 | 5 | Cudd_DelayedDerefBdd 6 | Cudd_Deref 7 | Cudd_IterDerefBdd 8 | Cudd_RecursiveDeref 9 | Cudd_RecursiveDerefZdd 10 | Cudd_Ref 11 | Cudd_Init 12 | Cudd_Quit 13 | 14 | Hooks are meaningless in this context: 15 | Cudd_RemoveHook 16 | Cudd_StdPostReordHook 17 | Cudd_StdPreReordHook 18 | Cudd_AddHook 19 | Cudd_IsInHook 20 | 21 | The following iterator functions have been replaced by being made available directly 22 | as for constructs in Python: 23 | 24 | Cudd_ForeachCube 25 | Cudd_ForeachNode 26 | Cudd_ForeachPrime 27 | Cudd_GenFree 28 | Cudd_IsGenEmpty 29 | Cudd_ReadIthClause 30 | Cudd_tlcInfoFree 31 | Cudd_FirstPrime 32 | Cudd_NextPrime 33 | 34 | Refer example2.py to see how to use the loops. 35 | 36 | UNIMPLEMENTED FUNCTIONS 37 | ----------------------- 38 | 39 | ZDD iterator functions: 40 | 41 | Cudd_zddForeachPath 42 | Cudd_zddCoverPathToString 43 | Cudd_zddFirstPath 44 | Cudd_zddNextPath 45 | 46 | ADD functions: 47 | 48 | Cudd_addApply 49 | Cudd_addGeneralVectorCompose 50 | Cudd_addLog 51 | Cudd_addMonadicApply 52 | Cudd_addOuterSum 53 | 54 | WILL NOT BE IMPLEMENTED UNLESS THE NEED ARISES 55 | ---------------------------------------------- 56 | 57 | No intention of wrapping the following (comments given alongside): 58 | 59 | Cudd_PrintTwoLiteralClauses -- Might as well iterate over two-literal and print 'em 60 | Cudd_addHarwell -- specific benchmark reading routine. Will wrap if ever needed 61 | Cudd_bddRead -- Don't see a need for these 4 functions. 62 | Cudd_addRead If you would like them wrapped/have wrapped them, 63 | Cudd_SubsetWithMaskVars please get in touch with me at: aravind at engr dot ucsb dot edu 64 | Cudd_SolveEqn 65 | Cudd_PrioritySelect -- funky function to pointer ... need to think about it 66 | 67 | -------------------------------------------------------------------------------- /bymc/test/extract-tests.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | 6 | filename = sys.argv[1] 7 | prefix, _ = os.path.splitext(os.path.basename(filename)) 8 | 9 | test_no = 1 10 | f = open(filename, "r") 11 | out = None 12 | eva = None 13 | disabled = False 14 | try: 15 | for l in f: 16 | if l.find('BEGIN-TEST') != -1: 17 | name = l[l.rfind('BEGIN-TEST') + len('BEGIN-TEST') :].strip() 18 | out = open('%s-%04d-%s.test' % (prefix, test_no, name), 'w+') 19 | out.write('testsource=%s\n' % filename) 20 | eva = open('%s-%04d-%s.eval' % (prefix, test_no, name), 'w+') 21 | eva.write('set -e\n') 22 | elif l.find('SKIP-TEST') != -1: 23 | name = l[l.rfind('SKIP-TEST') + len('SKIP-TEST') :].strip() 24 | disabled = True 25 | out = open('%s-%04d-%s.test' % (prefix, test_no, name), 'w+') 26 | eva = open('%s-%04d-%s.eval' % (prefix, test_no, name), 'w+') 27 | eva.write("echo 'SKIP. Failed, in order to keep you warned.' && exit 101") 28 | elif l.find('TODO-TEST') != -1: 29 | name = l[l.rfind('TODO-TEST') + len('TODO-TEST') :].strip() 30 | disabled = True 31 | out = open('%s-%04d-%s.test' % (prefix, test_no, name), 'w+') 32 | eva = open('%s-%04d-%s.eval' % (prefix, test_no, name), 'w+') 33 | eva.write("echo 'TODO. Failed, in order to keep you warned.' && exit 102") 34 | elif l.find('END-TEST') != -1: 35 | out.close() 36 | eva.close() 37 | out = None 38 | eva = None 39 | test_no += 1 40 | disabled = False 41 | elif l.find('EXPECT') != -1: 42 | pos = l.find('EXPECT') 43 | if not disabled: 44 | eva.write(l[pos + len('EXPECT') :]) 45 | elif out != None: 46 | if not disabled: 47 | out.write(l) 48 | finally: 49 | f.close() 50 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/2and3.bdd: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 61 5 | .nvars 50 6 | .nsuppvars 16 7 | .suppvarnames DUMMY0 DUMMY1 DUMMY2 DUMMY3 DUMMY4 DUMMY10 DUMMY11 DUMMY12 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 8 | .orderedvarnames DUMMY0 DUMMY1 DUMMY2 DUMMY3 DUMMY4 DUMMY5 DUMMY6 DUMMY7 DUMMY8 DUMMY9 DUMMY10 DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 9 | .ids 0 1 2 3 4 10 11 12 15 16 17 18 19 20 21 22 10 | .permids 0 1 2 3 4 10 11 12 15 16 17 18 19 20 21 22 11 | .auxids 0 1 2 3 4 10 11 12 15 16 17 18 19 20 21 22 12 | .nroots 1 13 | .rootids -61 14 | .nodes 15 | 1 T 1 0 0 16 | 2 22 15 1 -1 17 | 3 21 14 1 2 18 | 4 20 13 3 -1 19 | 5 21 14 2 -1 20 | 6 20 13 5 -1 21 | 7 19 12 4 -6 22 | 8 21 14 2 1 23 | 9 20 13 8 1 24 | 10 19 12 1 9 25 | 11 18 11 7 10 26 | 12 17 10 1 11 27 | 13 16 9 12 1 28 | 14 19 12 4 1 29 | 15 18 11 14 1 30 | 16 17 10 1 15 31 | 17 16 9 16 1 32 | 18 15 8 13 17 33 | 19 18 11 7 1 34 | 20 17 10 1 19 35 | 21 16 9 20 1 36 | 22 15 8 21 17 37 | 23 12 7 18 22 38 | 24 11 6 18 23 39 | 25 11 6 23 22 40 | 26 10 5 24 25 41 | 27 4 4 1 26 42 | 28 3 3 1 27 43 | 29 2 2 1 28 44 | 30 3 3 27 1 45 | 31 2 2 1 30 46 | 32 1 1 29 31 47 | 33 19 12 6 -1 48 | 34 18 11 33 -1 49 | 35 17 10 1 -34 50 | 36 21 14 2 -2 51 | 37 20 13 36 1 52 | 38 19 12 37 6 53 | 39 18 11 38 -10 54 | 40 17 10 1 -39 55 | 41 16 9 40 35 56 | 42 19 12 37 -1 57 | 43 18 11 42 -1 58 | 44 17 10 1 -43 59 | 45 16 9 44 35 60 | 46 15 8 41 45 61 | 47 18 11 38 -1 62 | 48 17 10 1 -47 63 | 49 16 9 48 35 64 | 50 15 8 49 45 65 | 51 12 7 46 50 66 | 52 11 6 46 51 67 | 53 11 6 51 50 68 | 54 10 5 52 53 69 | 55 4 4 35 54 70 | 56 3 3 1 55 71 | 57 2 2 1 56 72 | 58 3 3 55 1 73 | 59 2 2 1 58 74 | 60 1 1 57 59 75 | 61 0 0 32 60 76 | .end 77 | -------------------------------------------------------------------------------- /bymc/src/spinParserState.ml: -------------------------------------------------------------------------------- 1 | (* 2 | The internal state of the spin parser -- use with care and as little as possible. 3 | As ocamlyacc exports nothing but the start non-terminals, we keep the global 4 | state in this module. See spinParserCtx.mli 5 | *) 6 | 7 | open SpinIr 8 | 9 | exception Not_implemented of string 10 | exception Parse_error of string 11 | exception State_error of string 12 | exception Promela_semantic_err of string 13 | 14 | type spin_parser_state_t = { 15 | err_cnt: int; global_scope: symb_tab; spec_scope: symb_tab; 16 | scope_stack: symb_tab list; type_tab: data_type_tab 17 | } 18 | 19 | let current_parser_state = ref None 20 | 21 | let get_state _ = 22 | match !current_parser_state with 23 | | Some s -> s 24 | | None -> raise (State_error "get_state is called before reset_state") 25 | 26 | let reset_state _ = 27 | let global = new symb_tab "" in 28 | let s = { 29 | err_cnt = 0; global_scope = global; spec_scope = new symb_tab "spec"; 30 | scope_stack = [global]; type_tab = new data_type_tab 31 | } in 32 | current_parser_state := Some s 33 | 34 | 35 | let err_cnt _ = 36 | (get_state ()).err_cnt 37 | 38 | let inc_err_cnt _ = 39 | let s = get_state () in 40 | current_parser_state := Some { s with err_cnt = s.err_cnt + 1 } 41 | 42 | let global_scope _ = (get_state ()).global_scope 43 | let spec_scope _ = (get_state ()).spec_scope 44 | 45 | let top_scope _ = List.hd ((get_state ())).scope_stack 46 | 47 | let push_scope scope = 48 | let s = get_state () in 49 | scope#set_parent (List.hd s.scope_stack); 50 | current_parser_state := Some { s with scope_stack = scope :: s.scope_stack } 51 | 52 | let pop_scope _ = 53 | let s = get_state () in 54 | if (List.length s.scope_stack) > 1 55 | then current_parser_state := 56 | Some { s with scope_stack = List.tl s.scope_stack } 57 | else raise (State_error "Trying to pop the global scope") 58 | 59 | let type_tab _ = (get_state ()).type_tab 60 | 61 | -------------------------------------------------------------------------------- /bymc/test/test2-8.pml: -------------------------------------------------------------------------------- 1 | /** 2 | * A parameterized model of the broadcast distributed algorithm 3 | * in the symbolic extension of Promela. 4 | * 5 | * Igor Konnov, Josef Widder, 2012 6 | */ 7 | 8 | #define IT 0 /* the initial state */ 9 | #define SE 1 /* the echo message sent */ 10 | #define PC_SZ 4 11 | 12 | #define FALSE 0 13 | #define TRUE 1 14 | 15 | symbolic int N; /* the number of processes: correct + faulty */ 16 | symbolic int T; /* the threshold */ 17 | symbolic int F; /* the actual number of faulty processes */ 18 | 19 | int nsnt; 20 | 21 | assume(N > 3); 22 | assume(F >= 0); 23 | assume(T >= 1); 24 | assume(N > 3 * T); 25 | assume(F <= T); 26 | 27 | atomic prec_unforg = all(Proc:pc == IT); 28 | atomic prec_init = all(Proc@end); 29 | atomic ex_acc = some(Proc:pc == SE); 30 | atomic in_transit = some(Proc:nrcvd < nsnt); 31 | 32 | active[N - F] proctype Proc() { 33 | byte pc = 0, next_pc = 0; 34 | int nrcvd = 0, next_nrcvd = 0; 35 | 36 | /* INIT */ 37 | pc = IT; 38 | 39 | /* THE ALGORITHM */ 40 | end: /* at some point there will be nothing to do */ 41 | do 42 | :: atomic { 43 | if 44 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 45 | :: else -> next_nrcvd = nrcvd; 46 | fi; 47 | if 48 | :: pc == 0 -> next_pc = 1; 49 | :: pc == 1 -> next_pc = 2; 50 | :: pc == 2 -> next_pc = 3; 51 | :: pc == 3 -> next_pc = 4; 52 | :: pc == 4 -> next_pc = 5; 53 | :: pc == 5 -> next_pc = 6; 54 | :: pc == 6 -> next_pc = 7; 55 | :: pc == 7 -> next_pc = pc; 56 | fi; 57 | nsnt = next_nrcvd; 58 | pc = next_pc; 59 | nrcvd = next_nrcvd; 60 | next_pc = 0; 61 | next_nrcvd = 0; 62 | } 63 | od; 64 | } 65 | 66 | ltl fairness { []<>(!in_transit) } 67 | ltl unforg { []((prec_init && prec_unforg) -> []!ex_acc) } 68 | 69 | -------------------------------------------------------------------------------- /bymc/src/pSet.ml: -------------------------------------------------------------------------------- 1 | (* 2 | Set membership as division by prime numbers. 3 | This was a clever exercise. However, it is much easier 4 | (and probably more efficient) to use a bit vector instead of prime 5 | numbers. 6 | *) 7 | open Big_int 8 | 9 | type elt = big_int 10 | type t = big_int 11 | 12 | let before = ref (big_int_of_int 2) (* a number before the next prime *) 13 | 14 | (* this is supposed to work with very small prime numbers *) 15 | let new_thing () = 16 | let rec is_prime num n2 d = 17 | if ge_big_int d n2 18 | then true 19 | else if eq_big_int (mod_big_int num d) zero_big_int 20 | then false 21 | else is_prime num n2 (succ_big_int d) 22 | in 23 | let rec search num = 24 | let n2 = succ_big_int (div_big_int num (big_int_of_int 2)) in 25 | if is_prime num n2 (big_int_of_int 2) 26 | then num 27 | else search (succ_big_int num) 28 | in 29 | let new_prime = search (!before) in 30 | before := succ_big_int new_prime; 31 | new_prime 32 | 33 | let str = string_of_big_int 34 | 35 | let elem_str = string_of_big_int 36 | 37 | let elem_eq a b = eq_big_int a b 38 | 39 | let empty = unit_big_int (* it corresponds to an empty set *) 40 | 41 | let singleton e = e 42 | 43 | let is_empty s = (0 = (compare_big_int s empty)) 44 | 45 | let mem e set = 46 | eq_big_int (mod_big_int set e) zero_big_int 47 | 48 | let add e set = 49 | if mem e set 50 | then set 51 | else mult_big_int set e 52 | 53 | let remove e set = 54 | if mem e set 55 | then div_big_int set e 56 | else set 57 | 58 | let compare = compare_big_int 59 | 60 | let compare_elt = compare_big_int 61 | 62 | let inter s1 s2 = gcd_big_int s1 s2 63 | 64 | let union s1 s2 = mult_big_int s1 s2 65 | 66 | let diff s1 s2 = div_big_int s1 (gcd_big_int s1 s2) 67 | 68 | let equal s1 s2 = 69 | 0 = (compare_big_int s1 s2) 70 | 71 | let subseteq smaller larger = 72 | eq_big_int zero_big_int (mod_big_int larger smaller) 73 | 74 | -------------------------------------------------------------------------------- /bymc/script/ggetopt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # A simple and portable implementation of GNU getopt in python. 4 | # This is needed to run our scripts both in Linux and MacOSX. 5 | # 6 | # This script implements the POSIXLY_CORRECY version of getopt. 7 | # 8 | # Igor Konnov, 2018 9 | 10 | from getopt import getopt, GetoptError 11 | import sys 12 | 13 | def convert_longopt(long_opt): 14 | if long_opt.endswith(":"): 15 | return long_opt[:-1] + "=" 16 | else: 17 | return long_opt 18 | 19 | 20 | if __name__ == "__main__": 21 | opts = [] 22 | long_opts = [] 23 | name = sys.argv[0] 24 | args = sys.argv[1:] 25 | left = args 26 | while left != []: 27 | arg = left.pop(0) 28 | if arg in ["-o", "--options"]: 29 | # short options 30 | opts = left.pop(0) 31 | elif arg in ["-l", "--long", "--longoptions"]: 32 | # long options 33 | lopts = left.pop(0).split(",") 34 | long_opts = [convert_longopt(o) for o in lopts] 35 | elif arg in ["-n", "--name"]: 36 | # name to use 37 | name = left.pop(0) 38 | else: 39 | # POSIXLY_CORRECT: the first non-option argument stops the search 40 | left = [arg] + left if arg != "--" else left 41 | break 42 | 43 | if opts == [] and long_opts == []: 44 | print "%s: missing optstring argument" % name 45 | sys.exit(1) 46 | 47 | # whatever is left is the arguments to getopt 48 | try: 49 | opt_vals, trailing = getopt(left, opts, long_opts) 50 | for opt, val in opt_vals: 51 | sys.stdout.write(" %s" % opt) 52 | if val: 53 | sys.stdout.write(" '%s'" % val) 54 | 55 | sys.stdout.write(" --") 56 | for val in trailing: 57 | sys.stdout.write(" '%s'" % val) 58 | 59 | print "" 60 | except GetoptError as err: 61 | print >>sys.stderr, "%s: %s" % (name, err.msg) 62 | sys.exit(1) 63 | 64 | -------------------------------------------------------------------------------- /bymc/script/mod-verify-nusmv-bdd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Functions specific to nusmv using bdds 4 | # 5 | # Igor Konnov, 2013 6 | 7 | . $BYMC_HOME/script/mod-verify-nusmv-common.sh 8 | 9 | function mc_compile_first { 10 | common_mc_compile_first 11 | } 12 | 13 | function mc_verify_spec { 14 | if [ "$NO_JUSTICE" != "" -a "$NO_JUSTICE" != "0" ]; then 15 | perl -pi -e 's/JUSTICE /-- JUSTICE/g' main-ssa.smv 16 | fi 17 | 18 | SCRIPT="script.nusmv" 19 | echo "set on_failure_script_quits" >$SCRIPT 20 | if [ "$SOURCE" != "" ]; then 21 | cat <"$SOURCE" >>$SCRIPT 22 | fi 23 | 24 | echo "go" >>$SCRIPT 25 | echo "time" >>$SCRIPT 26 | if grep -q "INVARSPEC NAME ${PROP}" "${SRC}"; then 27 | echo "check_invar -P ${PROP}" >>${SCRIPT} 28 | else 29 | echo "check_ltlspec -P ${PROP}" >>${SCRIPT} 30 | fi 31 | echo "time" >>$SCRIPT 32 | echo "show_traces -v -o ${CEX}" >>${SCRIPT} 33 | echo "quit" >>${SCRIPT} 34 | 35 | rm -f ${CEX} 36 | if [ "$REACH_REL" == "1" ]; then 37 | ARGS="" 38 | else 39 | ARGS="-df" 40 | fi 41 | if [ "$MONO" == "1" ]; then 42 | ARGS="$ARGS -mono" 43 | else 44 | ARGS="$ARGS" 45 | fi 46 | 47 | echo $TIME ${NUSMV} $ARGS -v $NUSMV_VERBOSE -source "${SCRIPT}" "${SRC}" 48 | tee_or_die "${MC_OUT}" "nusmv failed" \ 49 | $TIME ${NUSMV} $ARGS -v $NUSMV_VERBOSE -source "${SCRIPT}" "${SRC}" 50 | 51 | # the exit code of grep is the return code 52 | if grep -q "is true" ${MC_OUT}; then 53 | echo "" 54 | echo "Specification holds true." >>$MC_OUT 55 | echo "" 56 | true 57 | elif grep -q "is false" ${MC_OUT}; then 58 | echo "" 59 | echo "Specification is violated." >>$MC_OUT 60 | echo "" 61 | false 62 | else 63 | false 64 | fi 65 | } 66 | 67 | function mc_refine { 68 | common_mc_refine 69 | } 70 | 71 | function mc_collect_stat { 72 | res=$(common_mc_collect_stat) 73 | echo "$res|11:technique=nusmv-bdd" 74 | } 75 | 76 | -------------------------------------------------------------------------------- /bymc/analyse: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run analyses that do not perform verification, e.g., compute BMC bounds 4 | # 5 | # Igor Konnov, 2014 6 | 7 | # parse options 8 | TEMPOPTS=`POSIXLY_CORRECT=1 getopt -o h --long help,limit-time:,limit-mem: -n '$@' -- "$@"` 9 | if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi 10 | 11 | MEM_LIMIT="unlimited" 12 | TIME_LIMIT="unlimited" 13 | 14 | function help_and_quit() { 15 | echo "use $0 [switches] prog spec bymc_options" 16 | echo " where spec is one of those: bounds" 17 | echo " and the switches are" 18 | echo " --limit-time: limit (in seconds) cpu time of subprocesses (ulimit -t)" 19 | echo " --limit-mem: limit (in MB) virtual memory of subprocesses (ulimit -v)" 20 | echo " -h|--help: show this help message" 21 | exit 1 22 | } 23 | 24 | eval set -- "$TEMPOPTS" 25 | while true ; do 26 | case "$1" in 27 | -h|--help) help_and_quit ;; 28 | --limit-time) TIME_LIMIT=$2 ; shift 2 ;; 29 | --limit-mem) MEM_LIMIT=$((1024*$2)) ; shift 2 ;; 30 | --) shift ; break ;; 31 | *) echo "Internal error!" ; help_and_quit ;; 32 | esac 33 | done 34 | 35 | if [ "$#" -lt 2 ]; then 36 | help_and_quit 37 | fi 38 | 39 | PROG=$1 40 | SPEC=$2 41 | shift 2 42 | export BYMC_FLAGS="$@ $BYMC_FLAGS" 43 | 44 | echo ulimit -SHv $MEM_LIMIT 45 | ulimit -SHv $MEM_LIMIT 46 | echo ulimit -SHt $TIME_LIMIT 47 | ulimit -SHt $TIME_LIMIT 48 | 49 | echo " ********************* WARNING ************************" 50 | echo " * *" 51 | echo " * This module is DEPRECATED. Use ./verifypa-post, which *" 52 | echo " * has all the features of ./analyse, but works much *" 53 | echo " * faster. Run this script only if you want to reproduce *" 54 | echo " * CONCUR'14 results. *" 55 | echo " * *" 56 | echo " **********************************************************" 57 | 58 | 59 | # run the tool 60 | export TARGET_MC=analysis 61 | `dirname $0`/script/refinement-loop.sh $PROG $SPEC 62 | 63 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/mnemosyne/README: -------------------------------------------------------------------------------- 1 | 2 | This is a set of tools designed to help find memory leaks in 3 | programs, and to locate memory-hogging functions. It's implemented as 4 | a wrapper library that goes around malloc/free/etc, and an include file 5 | that "intercepts" calls to malloc/free/etc and makes them call the 6 | wrappers. Thus, you can get extensive memory profiling and leak 7 | detection by just adding one #include directive at the top of your 8 | file and recompiling/linking. 9 | 10 | Unlike some similar tools I've seen in the past, this makes 11 | sure that it keeps its on-disk data current, so that if the program 12 | is crashed or interrupted, the results still have some validity. The 13 | on-disk data is as compacted as I could make it, to give a chance of 14 | this being useable in debugging big memory pigs. It adds some cost 15 | in performance and memory size (since it keeps its own in-memory 16 | symbol tables) but since it's only a debugging tool, I think the 17 | cost is worth the benefit. This library can also be used to track 18 | only allocations in a single module, or set of modules, and doesn't 19 | interfere with calls to the "real" malloc() that are made in other 20 | library routines. 21 | 22 | Every effort has been made to ensure that the code is 23 | portable and won't interfere with running code - it should just 24 | plug in or out. The biggest hindrances are forward declarations of 25 | malloc() [which the preprocessor gleefully turns into syntax errors 26 | for you] and structure elements named "free". The code has been 27 | tested under Ultrix on DEC Risc and VAX systems, and under SunOS 28 | on a Motorola platform. Please send patches, suggestions, etc, 29 | to the author, who will probably not have time to do anything with 30 | them. 31 | 32 | Compiling and building: 33 | You may wish to edit the Makefile and glance at mnemconf.h, 34 | then simply type "make". "make mtest" will build a simple test program 35 | that will give you an idea of how things work. "make runmtest" will 36 | run the test and do analysis on it. 37 | 38 | Marcus J. Ranum 39 | mjr@decuac.dec.com 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ByMC: Byzantine Model Checker 2 | 3 | This is a toolset for parameterized model checking of threshold-guarded fault-tolerant distributed algorithms. 4 | 5 | ## Status 6 | 7 | The tool author [Igor Konnov](https://konnov.github.io/) is not developing it 8 | anymore. If you want to see new cool projects, check 9 | [Quint](https://github.com/informalsystems/quint/) and 10 | [Apalache](https://github.com/informalsystems/apalache/). 11 | 12 | ## Publications 13 | 14 | A recent survey of the techniques implemented in ByMC (and other tools) can 15 | be found in the [paper at LMCS'23](https://lmcs.episciences.org/10824): 16 | 17 | Igor Konnov ; Marijana Lazić ; Ilina Stoilkovska ; Josef Widder - 18 | Survey on Parameterized Verification with Threshold Automata and the 19 | Byzantine Model Checker. Logical Methods in Computer Science, January 18, 20 | 2023, Volume 19, Issue 1 21 | 22 | Follow the references in the survey to learn more about the older techniques. 23 | 24 | ## Installation 25 | 26 | **WARNING:** Since this tool is using libraries that go back to 2013, it is 27 | getting harder to compile it. The easiest way to run ByMC is by downloading a 28 | virtual machine and running the tool inside 29 | [VirtualBox](https://www.virtualbox.org/). The latest version is 30 | [ByMC 2.4.4](https://drive.google.com/file/d/1m1LNeCPbEdOE35KBsVSsICeXQi8FM8gq/view?usp=share_link) (at Google Drive). 31 | 32 | ## Next steps 33 | 34 | * To see the tool in action, read [the tutorial](./bymc/doc/tutorial.md). 35 | * For installation instructions, check [README](./bymc/README.md) in the source directory. 36 | * To see the accompanying publications, visit the [tool website](https://forsyte.at/software/bymc/). 37 | 38 | ## Structure 39 | 40 | The directory layout is as follows: 41 | 42 | * ```bymc``` -- the scripts and tool source code 43 | * ```plugins``` -- tool plugins 44 | 45 | * ```legacy-bddc``` -- set of auxiliary scripts for model checking with NuSMV, needed only to run legacy techniques 46 | * ```legacy-deps``` -- various dependencies required by the tools that are hard to install automatically, needed only to run legacy techniques 47 | -------------------------------------------------------------------------------- /bymc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile to build them all 2 | # 3 | # Igor Konnov, 2012-2018 4 | 5 | CFLAGS=-cflag -g -lflag -g -lflag -thread # the options at the end fix a bug 6 | 7 | target="./bymc.native" # use ./bymc.byte for debugging 8 | unittests=./unitTests.byte 9 | debug_target="./bymc.byte" 10 | ocamlver := $(shell ocaml -version | egrep -o '[0-9]+\.[0-9]+\.[0-9]+') 11 | ocaml_major := $(shell echo ${ocamlver} | perl -pe 's/([0-9]+)\.[0-9]+\.[0-9]+/\1/') 12 | ocaml_minor := $(shell echo ${ocamlver} | perl -pe 's/[0-9]+\.([0-9]+)\.[0-9]+/\1/') 13 | ocaml_rev := $(shell echo ${ocamlver} | perl -pe 's/[0-9]+\.[0-9]+\.([0-9]+)/\1/') 14 | dist_ver := $(shell date '+%Y%m%d') 15 | OCAMLBUILD := ocamlbuild -use-ocamlfind 16 | 17 | DIST_FILES=bymc.native verifyco-* verifypa-* syntpa-* script/ LICENSE 18 | 19 | all: ${target} 20 | 21 | compile: ${target} 22 | 23 | debug: ${debug_target} 24 | 25 | ${unittests}: src/*.ml src/*.mli src/*.mly test/*.ml 26 | ${OCAMLBUILD} ${CFLAGS} ./unitTests.byte 27 | 28 | # unit tests 29 | test: clean ${unittests} 30 | ${unittests} 31 | 32 | # functional tests 33 | integrate: clean 34 | ./test/func-test.sh 35 | 36 | # just a synonym for integrate 37 | fun: integrate 38 | 39 | dist: 40 | git archive --prefix=bymc-src-${ver}/ master \ 41 | | bzip2 > bymc-src-${ver}.tar.bz2 42 | 43 | dist-bin: compile 44 | tar jhcf bymc-bin-${dist_ver}.tar.bz2 ${DIST_FILES} 45 | 46 | release: 47 | git archive --prefix=bymc-src-${TAG}/ "${TAG}" \ 48 | | bzip2 > bymc-src-${TAG}.tar.bz2 49 | 50 | # ocaml doc 51 | doc: 52 | mkdir -p _build/doc 53 | ocamldoc -I _build/src -html -keep-code -colorize-code \ 54 | src/*.ml src/*.mli -d _build/doc 55 | 56 | tags: 57 | otags src/*.ml src/*.mli test/*.ml 58 | 59 | clean: 60 | $(info CLEANING) 61 | ${OCAMLBUILD} -clean 62 | 63 | ${target}: ocaml-up-to-date 64 | $(info COMPILING) 65 | ${OCAMLBUILD} ${CFLAGS} ${target} 66 | 67 | ${debug_target}: ocaml-up-to-date 68 | $(info COMPILING DEBUG VERSION) 69 | ${OCAMLBUILD} ${CFLAGS} ${debug_target} 70 | 71 | ocaml-up-to-date: 72 | $(info Testing, whether ocaml version is at least 4.05.0) 73 | test ${ocaml_major} -gt 4 -o ${ocaml_minor} -ge 5 74 | 75 | -------------------------------------------------------------------------------- /bymc/src/absBasics.ml: -------------------------------------------------------------------------------- 1 | (* 2 | General functions related to abstraction to keep specialized abstractions simpler. 3 | 4 | Igor Konnov, 2012 5 | *) 6 | 7 | open Printf;; 8 | 9 | open Spin;; 10 | open SpinIr;; 11 | open SpinIrImp;; 12 | 13 | exception Abstraction_error of string;; 14 | 15 | type abs_type = ExistAbs | UnivAbs;; 16 | 17 | (* each expression is characterized by its trait w.r.t. abstraction *) 18 | type expr_abs_trait = 19 | ConstExpr (* a constant expression, may be abstracted *) 20 | | ConcExpr (* an expression that has concrete variables *) 21 | | AbsExpr (* an expression that has abstracted variables *) 22 | | MixExpr (* an expression that has both concrete and abstracted variables *) 23 | | ShadowExpr (* do not touch this expression *) 24 | ;; 25 | 26 | let get_abs_trait 27 | (var_trait_fun: var -> expr_abs_trait) (ex: 't expr) : expr_abs_trait = 28 | let rec explore = function 29 | | IntConst _ -> ConstExpr 30 | | Var v -> var_trait_fun v 31 | | UnEx (tok, arg) -> explore arg 32 | | BinEx (PLUS, lhs, rhs) 33 | | BinEx (MINUS, lhs, rhs) 34 | | BinEx (MULT, lhs, rhs) 35 | | BinEx (DIV, lhs, rhs) as e -> 36 | let lt = (explore lhs) and rt = (explore rhs) in 37 | if lt <> rt && lt != ConstExpr && rt != ConstExpr 38 | then let m = sprintf "Concrete and abstracted variables are mixed in %s" 39 | (expr_s e) in 40 | raise (Abstraction_error m) 41 | else lt 42 | 43 | | BinEx (_, lhs, rhs) -> 44 | let lt = (explore lhs) and rt = (explore rhs) in 45 | begin 46 | match lt, rt with 47 | | _, ShadowExpr 48 | | ShadowExpr, _ -> ShadowExpr 49 | | ConstExpr, (_ as t) 50 | | (_ as t), ConstExpr -> t 51 | | ConcExpr, ConcExpr -> ConcExpr 52 | | AbsExpr, AbsExpr -> AbsExpr 53 | | ConcExpr, AbsExpr 54 | | AbsExpr, ConcExpr 55 | | _, MixExpr 56 | | MixExpr, _ -> MixExpr 57 | end 58 | 59 | | _ -> ShadowExpr 60 | in 61 | explore ex 62 | ;; 63 | -------------------------------------------------------------------------------- /bymc/test/schemaSmtTest.ml: -------------------------------------------------------------------------------- 1 | open Batteries 2 | 3 | open OUnit 4 | open Printf 5 | 6 | open Accums 7 | open SchemaSmt 8 | 9 | let save_cex _ = 10 | let cex = { 11 | C.f_form_name = "corr"; 12 | C.f_loop_index = 0; 13 | C.f_init_state = StrMap.add "y" 2 (StrMap.singleton "x" 1); 14 | C.f_moves = [ 15 | { C.f_rule_no = 0; f_accel = 22 }; 16 | { C.f_rule_no = 1; f_accel = 33 }; 17 | ]; 18 | C.f_iorder = [1; 2; 3]; 19 | C.f_po_struc = [ 20 | C.PO_init_struc; C.PO_guard_struc; C.PO_loop_start_struc; C.PO_tl_struc 21 | ] 22 | } 23 | in 24 | let expected = 25 | "((spec corr) (loop 0) (init ((x 1) (y 2))) (moves ((0 22) (1 33)))\n" 26 | ^ " (iorder (1 2 3)) (linord PO_init PO_guard PO_loop_start PO_tl))\n" 27 | in 28 | C.save_cex "cex.scm" cex; 29 | let input = BatFile.open_in "cex.scm" in 30 | let result = BatIO.read_all input in 31 | BatIO.close_in input; 32 | assert_equal expected result 33 | ~msg:(sprintf "Expected '%s', found '%s'" expected result) 34 | 35 | 36 | let load_cex _ = 37 | let text = 38 | "((spec corr) (loop 0) (init ((x 1) (y 2))) (moves ((0 22) (1 33)))\n" 39 | ^ " (iorder (1 2 3)) (linord PO_init PO_guard PO_loop_start PO_tl))\n" 40 | in 41 | let output = BatFile.open_out ~mode:[`create; `trunc] "cex.scm" in 42 | fprintf output "%s\n" text; 43 | BatIO.close_out output; 44 | let result = C.load_cex "cex.scm" in 45 | let expected = { 46 | C.f_form_name = "corr"; 47 | C.f_loop_index = 0; 48 | C.f_init_state = StrMap.add "y" 2 (StrMap.singleton "x" 1); 49 | C.f_moves = [ 50 | { C.f_rule_no = 0; f_accel = 22 }; 51 | { C.f_rule_no = 1; f_accel = 33 }; 52 | ]; 53 | C.f_iorder = [1; 2; 3]; 54 | C.f_po_struc = [ 55 | C.PO_init_struc; C.PO_guard_struc; C.PO_loop_start_struc; C.PO_tl_struc 56 | ] 57 | } 58 | in 59 | assert_equal expected result ~msg:("Unexpected counterexample") 60 | 61 | 62 | 63 | let suite = "schemaSmt-suite" >::: 64 | [ 65 | "save_cex" >::save_cex; 66 | "load_cex" >::load_cex; 67 | ] 68 | 69 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4.bdd.bis1: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 35 5 | .nvars 150 6 | .nsuppvars 15 7 | .suppvarnames V3 V8 V23 V24 V37 V39 DUMMY21 DUMMY22 DUMMY23 DUMMY36 DUMMY37 DUMMY38 DUMMY47 DUMMY48 DUMMY49 8 | .orderedvarnames V2 V3 V8 V9 V10 V12 V22 V23 V24 V37 V38 V39 V48 V49 V50 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 DUMMY50 DUMMY51 DUMMY52 DUMMY53 DUMMY54 DUMMY55 DUMMY56 DUMMY57 DUMMY58 DUMMY59 DUMMY60 DUMMY61 DUMMY62 DUMMY63 DUMMY64 DUMMY65 DUMMY66 DUMMY67 DUMMY68 DUMMY69 DUMMY70 DUMMY71 DUMMY72 DUMMY73 DUMMY74 DUMMY75 DUMMY76 DUMMY77 DUMMY78 DUMMY79 DUMMY80 DUMMY81 DUMMY82 DUMMY83 DUMMY84 DUMMY85 DUMMY86 DUMMY87 DUMMY88 DUMMY89 DUMMY90 DUMMY91 DUMMY92 DUMMY93 DUMMY94 DUMMY95 DUMMY96 DUMMY97 DUMMY98 DUMMY99 DUMMY100 DUMMY101 DUMMY102 DUMMY103 DUMMY104 DUMMY105 DUMMY106 DUMMY107 DUMMY108 DUMMY109 DUMMY110 DUMMY111 DUMMY112 DUMMY113 DUMMY114 DUMMY115 DUMMY116 DUMMY117 DUMMY118 DUMMY119 DUMMY120 DUMMY121 DUMMY122 DUMMY123 DUMMY124 DUMMY125 DUMMY126 DUMMY127 DUMMY128 DUMMY129 DUMMY130 DUMMY131 DUMMY132 DUMMY133 DUMMY134 DUMMY135 DUMMY136 DUMMY137 DUMMY138 DUMMY139 DUMMY140 DUMMY141 DUMMY142 DUMMY143 DUMMY144 DUMMY145 DUMMY146 DUMMY147 DUMMY148 DUMMY149 9 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 10 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 11 | .auxids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 12 | .nroots 1 13 | .rootids -35 14 | .nodes 15 | 1 T 1 0 0 16 | 2 49 14 1 -1 17 | 3 48 13 1 2 18 | 4 47 12 3 1 19 | 5 47 12 1 -1 20 | 6 47 12 2 1 21 | 7 38 11 5 -6 22 | 8 48 13 1 -1 23 | 9 47 12 8 1 24 | 10 38 11 9 4 25 | 11 37 10 7 -10 26 | 12 36 9 1 -11 27 | 13 37 10 5 -9 28 | 14 36 9 1 -13 29 | 15 23 8 12 14 30 | 16 36 9 1 -7 31 | 17 36 9 1 -5 32 | 18 23 8 16 17 33 | 19 22 7 15 18 34 | 20 21 6 19 1 35 | 21 22 7 14 17 36 | 22 21 6 21 1 37 | 23 11 5 20 22 38 | 24 9 4 23 1 39 | 25 21 6 18 1 40 | 26 11 5 20 25 41 | 27 9 4 26 1 42 | 28 8 3 24 27 43 | 29 11 5 20 1 44 | 30 9 4 29 1 45 | 31 9 4 20 1 46 | 32 8 3 30 31 47 | 33 7 2 28 32 48 | 34 2 1 4 33 49 | 35 1 0 1 34 50 | .end 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4.bdd.bis2: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 35 5 | .nvars 150 6 | .nsuppvars 15 7 | .suppvarnames V3 V8 V23 V24 V37 V39 DUMMY21 DUMMY22 DUMMY23 DUMMY36 DUMMY37 DUMMY38 DUMMY47 DUMMY48 DUMMY49 8 | .orderedvarnames V2 V3 V8 V9 V10 V12 V22 V23 V24 V37 V38 V39 V48 V49 V50 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 DUMMY50 DUMMY51 DUMMY52 DUMMY53 DUMMY54 DUMMY55 DUMMY56 DUMMY57 DUMMY58 DUMMY59 DUMMY60 DUMMY61 DUMMY62 DUMMY63 DUMMY64 DUMMY65 DUMMY66 DUMMY67 DUMMY68 DUMMY69 DUMMY70 DUMMY71 DUMMY72 DUMMY73 DUMMY74 DUMMY75 DUMMY76 DUMMY77 DUMMY78 DUMMY79 DUMMY80 DUMMY81 DUMMY82 DUMMY83 DUMMY84 DUMMY85 DUMMY86 DUMMY87 DUMMY88 DUMMY89 DUMMY90 DUMMY91 DUMMY92 DUMMY93 DUMMY94 DUMMY95 DUMMY96 DUMMY97 DUMMY98 DUMMY99 DUMMY100 DUMMY101 DUMMY102 DUMMY103 DUMMY104 DUMMY105 DUMMY106 DUMMY107 DUMMY108 DUMMY109 DUMMY110 DUMMY111 DUMMY112 DUMMY113 DUMMY114 DUMMY115 DUMMY116 DUMMY117 DUMMY118 DUMMY119 DUMMY120 DUMMY121 DUMMY122 DUMMY123 DUMMY124 DUMMY125 DUMMY126 DUMMY127 DUMMY128 DUMMY129 DUMMY130 DUMMY131 DUMMY132 DUMMY133 DUMMY134 DUMMY135 DUMMY136 DUMMY137 DUMMY138 DUMMY139 DUMMY140 DUMMY141 DUMMY142 DUMMY143 DUMMY144 DUMMY145 DUMMY146 DUMMY147 DUMMY148 DUMMY149 9 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 10 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 11 | .auxids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 12 | .nroots 1 13 | .rootids -35 14 | .nodes 15 | 1 T 1 0 0 16 | 2 49 14 1 -1 17 | 3 48 13 1 2 18 | 4 47 12 3 1 19 | 5 47 12 1 -1 20 | 6 47 12 2 1 21 | 7 38 11 5 -6 22 | 8 48 13 1 -1 23 | 9 47 12 8 1 24 | 10 38 11 9 4 25 | 11 37 10 7 -10 26 | 12 36 9 1 -11 27 | 13 37 10 5 -9 28 | 14 36 9 1 -13 29 | 15 23 8 12 14 30 | 16 36 9 1 -7 31 | 17 36 9 1 -5 32 | 18 23 8 16 17 33 | 19 22 7 15 18 34 | 20 21 6 19 1 35 | 21 22 7 14 17 36 | 22 21 6 21 1 37 | 23 11 5 20 22 38 | 24 9 4 23 1 39 | 25 21 6 18 1 40 | 26 11 5 20 25 41 | 27 9 4 26 1 42 | 28 8 3 24 27 43 | 29 11 5 20 1 44 | 30 9 4 29 1 45 | 31 9 4 20 1 46 | 32 8 3 30 31 47 | 33 7 2 28 32 48 | 34 2 1 4 33 49 | 35 1 0 1 34 50 | .end 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4.bdd.bis3: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 35 5 | .nvars 150 6 | .nsuppvars 15 7 | .suppvarnames V3 V8 V23 V24 V37 V39 DUMMY21 DUMMY22 DUMMY23 DUMMY36 DUMMY37 DUMMY38 DUMMY47 DUMMY48 DUMMY49 8 | .orderedvarnames V2 V3 V8 V9 V10 V12 V22 V23 V24 V37 V38 V39 V48 V49 V50 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 DUMMY50 DUMMY51 DUMMY52 DUMMY53 DUMMY54 DUMMY55 DUMMY56 DUMMY57 DUMMY58 DUMMY59 DUMMY60 DUMMY61 DUMMY62 DUMMY63 DUMMY64 DUMMY65 DUMMY66 DUMMY67 DUMMY68 DUMMY69 DUMMY70 DUMMY71 DUMMY72 DUMMY73 DUMMY74 DUMMY75 DUMMY76 DUMMY77 DUMMY78 DUMMY79 DUMMY80 DUMMY81 DUMMY82 DUMMY83 DUMMY84 DUMMY85 DUMMY86 DUMMY87 DUMMY88 DUMMY89 DUMMY90 DUMMY91 DUMMY92 DUMMY93 DUMMY94 DUMMY95 DUMMY96 DUMMY97 DUMMY98 DUMMY99 DUMMY100 DUMMY101 DUMMY102 DUMMY103 DUMMY104 DUMMY105 DUMMY106 DUMMY107 DUMMY108 DUMMY109 DUMMY110 DUMMY111 DUMMY112 DUMMY113 DUMMY114 DUMMY115 DUMMY116 DUMMY117 DUMMY118 DUMMY119 DUMMY120 DUMMY121 DUMMY122 DUMMY123 DUMMY124 DUMMY125 DUMMY126 DUMMY127 DUMMY128 DUMMY129 DUMMY130 DUMMY131 DUMMY132 DUMMY133 DUMMY134 DUMMY135 DUMMY136 DUMMY137 DUMMY138 DUMMY139 DUMMY140 DUMMY141 DUMMY142 DUMMY143 DUMMY144 DUMMY145 DUMMY146 DUMMY147 DUMMY148 DUMMY149 9 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 10 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 11 | .auxids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 12 | .nroots 1 13 | .rootids -35 14 | .nodes 15 | 1 T 1 0 0 16 | 2 49 14 1 -1 17 | 3 48 13 1 2 18 | 4 47 12 3 1 19 | 5 47 12 1 -1 20 | 6 47 12 2 1 21 | 7 38 11 5 -6 22 | 8 48 13 1 -1 23 | 9 47 12 8 1 24 | 10 38 11 9 4 25 | 11 37 10 7 -10 26 | 12 36 9 1 -11 27 | 13 37 10 5 -9 28 | 14 36 9 1 -13 29 | 15 23 8 12 14 30 | 16 36 9 1 -7 31 | 17 36 9 1 -5 32 | 18 23 8 16 17 33 | 19 22 7 15 18 34 | 20 21 6 19 1 35 | 21 22 7 14 17 36 | 22 21 6 21 1 37 | 23 11 5 20 22 38 | 24 9 4 23 1 39 | 25 21 6 18 1 40 | 26 11 5 20 25 41 | 27 9 4 26 1 42 | 28 8 3 24 27 43 | 29 11 5 20 1 44 | 30 9 4 29 1 45 | 31 9 4 20 1 46 | 32 8 3 30 31 47 | 33 7 2 28 32 48 | 34 2 1 4 33 49 | 35 1 0 1 34 50 | .end 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/exp/4.bdd.bis4: -------------------------------------------------------------------------------- 1 | .ver DDDMP-2.0 2 | .mode A 3 | .varinfo 0 4 | .nnodes 35 5 | .nvars 150 6 | .nsuppvars 15 7 | .suppvarnames V3 V8 V23 V24 V37 V39 DUMMY21 DUMMY22 DUMMY23 DUMMY36 DUMMY37 DUMMY38 DUMMY47 DUMMY48 DUMMY49 8 | .orderedvarnames V2 V3 V8 V9 V10 V12 V22 V23 V24 V37 V38 V39 V48 V49 V50 DUMMY15 DUMMY16 DUMMY17 DUMMY18 DUMMY19 DUMMY20 DUMMY21 DUMMY22 DUMMY23 DUMMY24 DUMMY25 DUMMY26 DUMMY27 DUMMY28 DUMMY29 DUMMY30 DUMMY31 DUMMY32 DUMMY33 DUMMY34 DUMMY35 DUMMY36 DUMMY37 DUMMY38 DUMMY39 DUMMY40 DUMMY41 DUMMY42 DUMMY43 DUMMY44 DUMMY45 DUMMY46 DUMMY47 DUMMY48 DUMMY49 DUMMY50 DUMMY51 DUMMY52 DUMMY53 DUMMY54 DUMMY55 DUMMY56 DUMMY57 DUMMY58 DUMMY59 DUMMY60 DUMMY61 DUMMY62 DUMMY63 DUMMY64 DUMMY65 DUMMY66 DUMMY67 DUMMY68 DUMMY69 DUMMY70 DUMMY71 DUMMY72 DUMMY73 DUMMY74 DUMMY75 DUMMY76 DUMMY77 DUMMY78 DUMMY79 DUMMY80 DUMMY81 DUMMY82 DUMMY83 DUMMY84 DUMMY85 DUMMY86 DUMMY87 DUMMY88 DUMMY89 DUMMY90 DUMMY91 DUMMY92 DUMMY93 DUMMY94 DUMMY95 DUMMY96 DUMMY97 DUMMY98 DUMMY99 DUMMY100 DUMMY101 DUMMY102 DUMMY103 DUMMY104 DUMMY105 DUMMY106 DUMMY107 DUMMY108 DUMMY109 DUMMY110 DUMMY111 DUMMY112 DUMMY113 DUMMY114 DUMMY115 DUMMY116 DUMMY117 DUMMY118 DUMMY119 DUMMY120 DUMMY121 DUMMY122 DUMMY123 DUMMY124 DUMMY125 DUMMY126 DUMMY127 DUMMY128 DUMMY129 DUMMY130 DUMMY131 DUMMY132 DUMMY133 DUMMY134 DUMMY135 DUMMY136 DUMMY137 DUMMY138 DUMMY139 DUMMY140 DUMMY141 DUMMY142 DUMMY143 DUMMY144 DUMMY145 DUMMY146 DUMMY147 DUMMY148 DUMMY149 9 | .ids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 10 | .permids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 11 | .auxids 1 2 7 8 9 11 21 22 23 36 37 38 47 48 49 12 | .nroots 1 13 | .rootids -35 14 | .nodes 15 | 1 T 1 0 0 16 | 2 49 14 1 -1 17 | 3 48 13 1 2 18 | 4 47 12 3 1 19 | 5 47 12 1 -1 20 | 6 47 12 2 1 21 | 7 38 11 5 -6 22 | 8 48 13 1 -1 23 | 9 47 12 8 1 24 | 10 38 11 9 4 25 | 11 37 10 7 -10 26 | 12 36 9 1 -11 27 | 13 37 10 5 -9 28 | 14 36 9 1 -13 29 | 15 23 8 12 14 30 | 16 36 9 1 -7 31 | 17 36 9 1 -5 32 | 18 23 8 16 17 33 | 19 22 7 15 18 34 | 20 21 6 19 1 35 | 21 22 7 14 17 36 | 22 21 6 21 1 37 | 23 11 5 20 22 38 | 24 9 4 23 1 39 | 25 21 6 18 1 40 | 26 11 5 20 25 41 | 27 9 4 26 1 42 | 28 8 3 24 27 43 | 29 11 5 20 1 44 | 30 9 4 29 1 45 | 31 9 4 20 1 46 | 32 8 3 30 31 47 | 33 7 2 28 32 48 | 34 2 1 4 33 49 | 35 1 0 1 34 50 | .end 51 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/mtr/Makefile.sis: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Cudd - DD package 4 | #--------------------------- 5 | .SUFFIXES: .o .c .u 6 | 7 | RANLIB = ranlib 8 | 9 | CAD = /projects/octtools/octtools/$(MACHINE) 10 | SIS = .. 11 | LINTCREATEFLAG = -C 12 | 13 | # files for the package 14 | P = mtr 15 | PSRC = mtrBasic.c mtrGroup.c 16 | PHDR = mtr.h 17 | POBJ = $(PSRC:.c=.o) 18 | 19 | # files for the test program 20 | TARGET = test$(P) 21 | SRC = test$(P).c 22 | OBJ = $(SRC:.c=.o) 23 | HDR = 24 | 25 | LIBS = ../util/libutil.a 26 | LINTLIBS= ../util/llib-lutil.ln 27 | INCLUDE = -I$(CAD)/include -I$(SIS)/include 28 | 29 | CFLAGS = -g $(INCLUDE) 30 | LDFLAGS = -g 31 | LINTFLAGS = $(INCLUDE) ${LINTEXTRAS} 32 | 33 | #------------------------------------------------------ 34 | 35 | $(TARGET): $(PHDR) $(OBJ) $(POBJ) $(LIBS) 36 | $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ) $(POBJ) $(LIBS) 37 | 38 | lint: $(PSRC) $(PHDR) $(SRC) $(HDR) 39 | lint $(LINTFLAGS) $(SRC) $(PSRC) $(LINTLIBS) 40 | 41 | install: lib$(P).a llib-l$(P).ln 42 | 43 | lib$(P).a: $(POBJ) 44 | ar cr $@ $? 45 | $(RANLIB) $@ 46 | 47 | unpack: lib$(P).a 48 | @for i in $(POBJ); do \ 49 | ln -s $(SIS)/$(P)/$$i $(SIS)/unpack; \ 50 | done 51 | 52 | llib-l$(P).ln: $(PSRC) $(PHDR) 53 | lint $(LINTFLAGS) ${LINTCREATEFLAG}$(P) -n $(PSRC) 54 | 55 | clean: 56 | rm -f $(TARGET) *.a *.ln *.o \ 57 | [Tt]ags [Mm]ake.out lint malloc.out gmon.out __.SYMDEF 58 | 59 | tags: _force 60 | @for i in $(PSRC) $(PHDR); do \ 61 | cwd=`pwd`; ctags -a $$cwd/$$i; 62 | done; 63 | 64 | strip_depend: 65 | sed '/^#--DO NOT CHANGE ANYTHING AFTER THIS LINE/,$$d' Makefile >mktemp 66 | mv mktemp Makefile 67 | 68 | depend: 69 | sed '/^#--DO NOT CHANGE ANYTHING AFTER THIS LINE/,$$d' Makefile >mktemp 70 | echo '#--DO NOT CHANGE ANYTHING AFTER THIS LINE' >>mktemp 71 | $(CAD)/bin/cc-M $(CFLAGS) $(PSRC) | \ 72 | sed 's|$(CAD)|$$(CAD)|g' | \ 73 | grep -v '/usr/include' >>mktemp 74 | mv mktemp Makefile 75 | 76 | #-------------------------- IBM 3090 support ----------------- 77 | IBMHOST = opua 78 | IBMDIST = /users2/sis 79 | ibmdist: $(PSRC) $(PHDR) 80 | rdist -Richw $(PSRC) $(PHDR) $(IBMHOST):$(IBMDIST) 81 | #------------------------------------------------------------- 82 | _force: 83 | 84 | -------------------------------------------------------------------------------- /bymc/test/refinement1.pml: -------------------------------------------------------------------------------- 1 | /** 2 | A simple test, two PCs, three intervals for received, 3 | no actual use of nsnt. 4 | */ 5 | 6 | #define IT 0 /* the initial state */ 7 | #define PC_SZ 4 8 | 9 | #define FALSE 0 10 | #define TRUE 1 11 | 12 | symbolic int N; /* the number of processes: correct + faulty */ 13 | symbolic int T; /* the threshold */ 14 | symbolic int F; /* the actual number of faulty processes */ 15 | 16 | int nsnt; 17 | 18 | assume(N > 3); 19 | assume(F >= 0); 20 | assume(T >= 1); 21 | assume(N > 3 * T); 22 | assume(F <= T); 23 | 24 | atomic prec_unforg = all(Proc:pc == 0); 25 | atomic prec_init = all(Proc@end); 26 | atomic ex1 = some(Proc:pc == 1); 27 | atomic all1 = all(Proc:pc == 1); 28 | atomic in_transit = some(Proc:nrcvd < T); 29 | 30 | active[N - F] proctype Proc() { 31 | byte pc = 0, next_pc = 0; 32 | int nrcvd = 0, next_nrcvd = 0; 33 | 34 | /* INIT */ 35 | if 36 | :: pc = 0; 37 | fi; 38 | 39 | /* THE ALGORITHM */ 40 | end: /* at some point there will be nothing to do */ 41 | do 42 | :: atomic { 43 | /* this step is always infeasible in the counter 44 | abstraction, as it requires refinement on the level 45 | of the data abstraction. */ 46 | if 47 | :: next_nrcvd = nrcvd + 1; 48 | fi; 49 | if 50 | :: next_nrcvd >= T + 1 -> next_pc = 1; 51 | :: else -> next_pc = 0; 52 | fi; 53 | if 54 | :: nrcvd < 1 -> nsnt++; 55 | :: else; 56 | fi; 57 | pc = next_pc; 58 | nrcvd = next_nrcvd; 59 | next_pc = 0; 60 | next_nrcvd = 0; 61 | } 62 | od; 63 | } 64 | 65 | ltl fairness { []<>(!in_transit) } 66 | ltl unforg { [](in_transit -> !all1) } 67 | ltl progall { [](prec_init -> <>all1) } 68 | ltl progex { [](prec_init -> <>ex1) } 69 | 70 | /* 71 | #BEGIN-TEST unforg 72 | $bymc_dir/verifypa-spin ${testsource} unforg -O smt.log=1 73 | #EXPECT grep "verified in 0 refinement" ${testlog} 74 | #END-TEST 75 | 76 | #BEGIN-TEST progall 77 | $bymc_dir/verifypa-spin ${testsource} progall -O smt.log=1 78 | #EXPECT grep "no-refinement" ${testlog} 79 | #END-TEST 80 | */ 81 | 82 | -------------------------------------------------------------------------------- /bymc/test/test5.pml: -------------------------------------------------------------------------------- 1 | /** 2 | Testing support for multiple process types 3 | */ 4 | 5 | #define IT 0 /* the initial state */ 6 | #define PC_SZ 4 7 | 8 | #define FALSE 0 9 | #define TRUE 1 10 | 11 | symbolic int N; /* the number of processes: correct + faulty */ 12 | symbolic int T; /* the threshold */ 13 | symbolic int F; /* the actual number of faulty processes */ 14 | 15 | int nsnt; 16 | 17 | assume(N > 3); 18 | assume(F >= 0); 19 | assume(T >= 1); 20 | assume(N > 3 * T); 21 | assume(F <= T); 22 | 23 | atomic procAprop = some(AProc:pc == 1); 24 | atomic in_transit = some(AProc:nrcvd < nsnt); 25 | 26 | active[N - F] proctype AProc() { 27 | byte pc = 0, next_pc = 0; 28 | int nrcvd = 0, next_nrcvd = 0; 29 | 30 | /* INIT */ 31 | if 32 | :: pc = 0; 33 | fi; 34 | 35 | /* THE ALGORITHM */ 36 | end: /* at some point there will be nothing to do */ 37 | do 38 | :: atomic { 39 | if 40 | :: nrcvd < 1 -> next_nrcvd = nrcvd + 1; 41 | :: else -> next_nrcvd = nrcvd; 42 | fi; 43 | if 44 | :: pc == 1 -> next_pc = 1; 45 | :: next_pc = pc; /* pc never changes */ 46 | fi; 47 | nsnt++; 48 | pc = next_pc; 49 | nrcvd = next_nrcvd; 50 | next_pc = 0; 51 | next_nrcvd = 0; 52 | } 53 | od; 54 | } 55 | 56 | active[N - F] proctype BProc() { 57 | byte pc = 0, next_pc = 0; 58 | int nrcvd = 0, next_nrcvd = 0; 59 | 60 | /* INIT */ 61 | if 62 | :: pc = 0; 63 | fi; 64 | 65 | /* THE ALGORITHM */ 66 | end: /* at some point there will be nothing to do */ 67 | do 68 | :: atomic { 69 | if 70 | :: nrcvd != 0 -> next_nrcvd = nrcvd + 1; /* never occurs */ 71 | :: else -> next_nrcvd = nrcvd; 72 | fi; 73 | if 74 | :: pc == 0 -> next_pc = 1; 75 | :: next_pc = pc; /* pc never changes */ 76 | fi; 77 | nsnt++; 78 | pc = next_pc; 79 | nrcvd = next_nrcvd; 80 | next_pc = 0; 81 | next_nrcvd = 0; 82 | } 83 | od; 84 | } 85 | 86 | ltl fairness { []<>(!in_transit) } 87 | ltl no_spurious1 { [](!procAprop) } 88 | 89 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/nanotrav/README: -------------------------------------------------------------------------------- 1 | $Id: README,v 1.8 1997/01/23 07:33:22 fabio Exp fabio $ 2 | 3 | WHAT IS NANOTRAV 4 | ================ 5 | 6 | This directory contains nanotrav, a simple reachability analysis program 7 | based on the CUDD package. Nanotrav uses a very naive approach and is 8 | only included to provide a sanity check for the installation of the 9 | CUDD package. 10 | 11 | Nanotrav reads a circuit written in a small subset of blif. This 12 | format is described in the comments in bnet.c. Nanotrav then creates 13 | BDDs for the primary outputs and the next state functions (if any) of 14 | the circuit. 15 | 16 | If, passed the -trav option, nanotrav builds a BDD for the 17 | characteristic function of the transition relation of the graph. It then 18 | builds a BDD for the initial state(s), and performs reachability 19 | analysis. Reachability analysys is performed with either the method 20 | known as "monolithic transition relation method," whose main virtue is 21 | simplicity, or with a unsophisticated partitioned transition relation 22 | method. 23 | 24 | Once it has completed reachability analysis, nanotrav prints results and 25 | exits. The amount of information printed, as well as several other 26 | features are controlled by the options. For a complete list of the 27 | options, consult the man page. Here, we only mention that the options allow 28 | the user of nanotrav to select among different reordering options. 29 | 30 | TEST CIRCUITS 31 | ============= 32 | 33 | Five test circuits are contained in this directory: C17.blif, 34 | C880.blif, s27.blif, mult32a.blif, and rcn25.blif. The first two are 35 | combinational, while the last three are sequential. The results or 36 | running 37 | 38 | nanotrav -p 1 -cover C17.blif > C17.out 39 | nanotrav -p 1 -ordering dfs -autodyn -automethod sifting -reordering sifting -drop C880.blif > C880.out 40 | nanotrav -p 1 -trav s27.blif > s27.out 41 | nanotrav -p 1 -autodyn -reordering sifting -trav mult32a.blif > mult32a.out 42 | nanotrav -p 1 -envelope rcn25.blif > rcn25.out 43 | 44 | are also included. They have been obtained on a 200 MHz P6-based 45 | machine with 128MB of memory. These tests can be run with the shell 46 | script tst.sh. Notice that rcn25 requires approximately 500 sec. All 47 | other tests run in a few seconds. 48 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/util/pathsearch.c: -------------------------------------------------------------------------------- 1 | /* LINTLIBRARY */ 2 | 3 | #include 4 | #include "util.h" 5 | 6 | static int check_file (char const *, char const *); 7 | 8 | char * 9 | util_path_search(char const *prog) 10 | { 11 | #ifdef UNIX 12 | return util_file_search(prog, getenv("PATH"), (char *) "x"); 13 | #else 14 | return util_file_search(prog, NIL(char), (char *) "x"); 15 | #endif 16 | } 17 | 18 | 19 | char * 20 | util_file_search( 21 | char const *file, /* file we're looking for */ 22 | char *path, /* search path, colon separated */ 23 | char const *mode /* "r", "w", or "x" */) 24 | { 25 | int quit; 26 | char *buffer, *filename, *save_path, *cp; 27 | 28 | if (path == 0 || strcmp(path, "") == 0) { 29 | path = (char *) "."; /* just look in the current directory */ 30 | } 31 | 32 | save_path = path = strsav(path); 33 | quit = 0; 34 | do { 35 | cp = strchr(path, ':'); 36 | if (cp != 0) { 37 | *cp = '\0'; 38 | } else { 39 | quit = 1; 40 | } 41 | 42 | /* cons up the filename out of the path and file name */ 43 | if (strcmp(path, ".") == 0) { 44 | buffer = strsav(file); 45 | } else { 46 | buffer = ALLOC(char, strlen(path) + strlen(file) + 4); 47 | (void) sprintf(buffer, "%s/%s", path, file); 48 | } 49 | filename = util_tilde_expand(buffer); 50 | FREE(buffer); 51 | 52 | /* see if we can access it */ 53 | if (check_file(filename, mode)) { 54 | FREE(save_path); 55 | return filename; 56 | } 57 | FREE(filename); 58 | path = ++cp; 59 | } while (! quit); 60 | 61 | FREE(save_path); 62 | return 0; 63 | } 64 | 65 | 66 | static int 67 | check_file(char const *filename, char const *mode) 68 | { 69 | #ifdef UNIX 70 | int access_mode = /*F_OK*/ 0; 71 | 72 | if (strcmp(mode, "r") == 0) { 73 | access_mode = /*R_OK*/ 4; 74 | } else if (strcmp(mode, "w") == 0) { 75 | access_mode = /*W_OK*/ 2; 76 | } else if (strcmp(mode, "x") == 0) { 77 | access_mode = /*X_OK*/ 1; 78 | } 79 | return access(filename, access_mode) == 0; 80 | #else 81 | FILE *fp; 82 | int got_file; 83 | 84 | if (strcmp(mode, "x") == 0) { 85 | mode = "r"; 86 | } 87 | fp = fopen(filename, mode); 88 | got_file = (fp != 0); 89 | if (fp != 0) { 90 | (void) fclose(fp); 91 | } 92 | return got_file; 93 | #endif 94 | } 95 | -------------------------------------------------------------------------------- /legacy-deps/ltl2ba-1.1/Makefile: -------------------------------------------------------------------------------- 1 | # LTL2BA - Version 1.0 - October 2001 2 | 3 | # Written by Denis Oddoux, LIAFA, France 4 | # Copyright (c) 2001 Denis Oddoux 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | # Based on the translation algorithm by Gastin and Oddoux, 21 | # presented at the CAV Conference, held in 2001, Paris, France 2001. 22 | # Send bug-reports and/or questions to: Denis.Oddoux@liafa.jussieu.fr 23 | # or to Denis Oddoux 24 | # LIAFA, UMR 7089, case 7014 25 | # Universite Paris 7 26 | # 2, place Jussieu 27 | # F-75251 Paris Cedex 05 28 | # FRANCE 29 | 30 | CC=gcc 31 | CFLAGS= -O3 -ansi -DNXT 32 | 33 | LTL2BA= parse.o lex.o main.o trans.o buchi.o set.o \ 34 | mem.o rewrt.o cache.o alternating.o generalized.o 35 | 36 | ltl2ba: $(LTL2BA) 37 | $(CC) $(CFLAGS) -o ltl2ba $(LTL2BA) 38 | 39 | $(LTL2BA): ltl2ba.h 40 | 41 | clean: 42 | rm -f ltl2ba *.o core 43 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/cudd/doc/footnode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | Footnotes 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
... application.1
33 |
The 34 | global statistical counters are used locally; hence they are 35 | compatible with the use of multiple managers. 36 | 37 |
.
 38 | .
 39 | .
 40 | .
 41 | .
 42 | .
 43 | .
 44 | .
 45 | .
 46 | .
 47 | .
 48 | .
 49 | .
 50 | .
 51 | .
 52 | .
 53 | .
 54 | .
 55 | .
 56 | .
 57 | .
 58 | .
 59 | .
 60 | .
 61 | .
 62 | .
 63 | .
 64 | .
 65 | .
 66 | .
 67 | 
68 |
69 |
... 70 | node.2
72 |
When the variables in a group are reordered, the 73 | association between the low field and the index of the first 74 | variable in the group is lost. The package updates the tree to keep 75 | track of the changes. However, the application cannot rely on 76 | low to determine the position of variables. 77 | 78 |
.
 79 | .
 80 | .
 81 | .
 82 | .
 83 | .
 84 | .
 85 | .
 86 | .
 87 | .
 88 | .
 89 | .
 90 | .
 91 | .
 92 | .
 93 | .
 94 | .
 95 | .
 96 | .
 97 | .
 98 | .
 99 | .
100 | .
101 | .
102 | .
103 | .
104 | .
105 | .
106 | .
107 | .
108 | 
109 |
110 |
111 | 112 | 113 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/pycudd/example2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -i 2 | # This example shows the 3 different ways to iterate over a DdNode 3 | 4 | # Import the module, create the manager 5 | import pycudd 6 | m = pycudd.DdManager() 7 | m.SetDefault() 8 | 9 | # 10 | # Create a random function as an example 11 | # Note that you don't need to create the variable individually to use them -- 12 | # you can directly use IthVar() to provide the variable 13 | # 14 | a = m.IthVar(0) 15 | b = m.IthVar(1) 16 | c = m.IthVar(2) 17 | 18 | rel = (~a & ~b & ((~c & ~m.IthVar(3)) | (c & m.IthVar(3)))) | (a & b & ((~c & m.IthVar(3)) | (c & ~m.IthVar(3)))) 19 | rel |= (~a & b) 20 | rel |= (a & ~b) 21 | 22 | print "Going to iterate over the following function" 23 | rel.PrintMinterm() 24 | 25 | # 26 | # The 3 iteration methods produce cubes, nodes and primes respectively 27 | # Note that since the package uses complement edges, the nodes may not be what 28 | # you expected!! Refer pyiter.i and ddnode.i for details on how this is done. 29 | # 30 | print "Testing iteration methods ..." 31 | # Over cubes 32 | print "Over cubes ..." 33 | pycudd.set_iter_meth(0) 34 | for cube in rel: 35 | print pycudd.cube_tuple_to_str(cube) 36 | 37 | # Over nodes 38 | print "Over nodes ..." 39 | pycudd.set_iter_meth(1) 40 | for node in rel: 41 | print "***" 42 | node.PrintMinterm() 43 | 44 | # Over primes 45 | print "Over primes ..." 46 | pycudd.set_iter_meth(2) 47 | for prime in rel: 48 | print pycudd.cube_tuple_to_str(prime) 49 | 50 | # 51 | # One/two literal clause enumeration 52 | # 53 | 54 | # 55 | # Simple POS expression (a + b)(!c + d)(!e + !f)(g + !h)i 56 | # 57 | h = (a | b) & (~c | m.IthVar(3)) & (~m.IthVar(4) | ~m.IthVar(5)) & (m.IthVar(6) | ~m.IthVar(7)) & m.IthVar(8) 58 | # 59 | # Create the DdTlcInfo object by calling 60 | # 61 | tlc = h.FindTwoLiteralClauses() 62 | # 63 | # Read the clauses by calling ReadIthClause on the TlcInfo struct 64 | # This returns the clauses as 3-tuples -- the first member is 1 if a valid clause is returned, 65 | # and 0 if the index passed to the func was too large. The next 2 members are tuples encoding (variable,phase) 66 | # phase = 0 is uncomplemented, phase = 1 is complemented. For one literal clauses, the second variable is set to -1 67 | # 68 | i=0 69 | cl = tlc.ReadIthClause(i) 70 | while cl[0] != 0: 71 | print cl[1:] 72 | i += 1 73 | cl = tlc.ReadIthClause(i) 74 | -------------------------------------------------------------------------------- /bymc/test/bcast-byz-ta-synt-rc.ta: -------------------------------------------------------------------------------- 1 | /* a template for the ST reliable broadcast */ 2 | 3 | skel Proc { 4 | /* the control locations are as follows: 5 | 0 is the initial state with value 0, 6 | 1 is the initial state with value 1, 7 | 2 is the sent state, 8 | 3 is the accepting state 9 | */ 10 | local pc; 11 | /* the number of messages sent by the correct processes */ 12 | shared nsnt; 13 | parameters N, T, F; 14 | unknowns a1, b1; /* the constants to be found by synthesis */ 15 | 16 | 17 | assumptions (1) { 18 | a1 * N > b1 * T; 19 | T >= F; 20 | T >= 1; 21 | } 22 | 23 | locations (7) { 24 | loc0: [0]; 25 | loc1: [1]; 26 | loc2: [2]; 27 | loc3: [3]; 28 | } 29 | 30 | inits (8) { 31 | (loc0 + loc1) == N - F; 32 | loc2 == 0; 33 | loc3 == 0; 34 | nsnt == 0; 35 | } 36 | 37 | rules (8) { 38 | /* send a message when having value 1 */ 39 | 0: loc1 -> loc2 40 | when (nsnt >= 0) 41 | do { nsnt' == nsnt + 1; }; 42 | /* accept directly */ 43 | 1: loc0 -> loc3 44 | when (nsnt >= (N - T - F)) 45 | do { nsnt' == nsnt + 1; }; 46 | 2: loc1 -> loc3 47 | when (nsnt >= N - T - F) 48 | do { nsnt' == nsnt + 1; }; 49 | /* send a message */ 50 | 3: loc0 -> loc2 51 | when (nsnt >= T + 1 - F) 52 | do { nsnt' == nsnt + 1; }; 53 | /* accept */ 54 | 4: loc2 -> loc3 55 | when (nsnt >= N - T - F) 56 | do { nsnt' == nsnt; }; 57 | /* self-loops in all the locations but loc1, from which processes must progress */ 58 | 5: loc0 -> loc0 59 | when (nsnt >= 0) 60 | do { nsnt' == nsnt; }; 61 | 6: loc2 -> loc2 62 | when (nsnt >= 0) 63 | do { nsnt' == nsnt; }; 64 | 7: loc3 -> loc3 65 | when (nsnt >= 0) 66 | do { nsnt' == nsnt; }; 67 | } 68 | specifications (3) { 69 | /* safety */ 70 | unforg: (loc1 == 0) -> [](loc3 == 0); 71 | corr: <>[]((nsnt < T + 1 || loc0 == 0) 72 | && (nsnt < N - T || loc0 == 0) 73 | && ((nsnt < N - T) || loc2 == 0) 74 | && (loc1 == 0)) 75 | -> ((loc0 == 0) -> <>(loc3 != 0)); 76 | relay: <>[]((nsnt < T + 1 || loc0 == 0) 77 | && (nsnt < N - T || loc0 == 0) 78 | && ((nsnt < N - T) || loc2 == 0) 79 | && (loc1 == 0)) 80 | -> []((loc3 != 0) -> <>((loc0 == 0) && (loc1 == 0))); 81 | } 82 | } /* Proc */ 83 | 84 | 85 | -------------------------------------------------------------------------------- /legacy-deps/pycudd2.0.2/cudd-2.4.2/dddmp/RELEASE_NOTES: -------------------------------------------------------------------------------- 1 | RELEASE NOTES FOR DDDMP 2 | Revision: Version 2.0.2 3 | Turin, Italy, February 01, 2004 4 | 5 | dddmp-2.0.2 is now available at 6 | WEB page: http://staff.polito.it/{gianpiero.cabodi,stefano.quer} 7 | dddmp-2.0.2 has a few bug fixes with respect to dddmp-2.0 8 | 9 | Release 2.0.2 of DDDMP improves DDDMP-1.2 in the following areas: 10 | 11 | 1. Support to store and load ADD has been inserted in the dddmp tool 12 | 13 | 2. Support to store BDDs as CNF formulas has been inserted in the 14 | dddmp tool. 15 | As far as the storing process is concerned three possible formats 16 | are available: 17 | 18 | DDDMP_CNF_MODE_NODE 19 | store a BDD by introducing an auxiliary variable for each BDD node 20 | 21 | DDDMP_CNF_MODE_MAXTERM 22 | store a BDD by following the maxterm of the represented function 23 | 24 | DDDMP_CNF_MODE_BEST 25 | trade-of between the two previous solution, trying to optimize 26 | the number of literals stored. 27 | 28 | As far as the loading process is concerned three possible formats 29 | are available: 30 | 31 | DDDMP_CNF_MODE_NO_CONJ 32 | Return the Clauses without Conjunction 33 | 34 | DDDMP_CNF_MODE_NO_QUANT 35 | Return the sets of BDDs without Quantification 36 | 37 | DDDMP_CNF_MODE_CONJ_QUANT 38 | Return the sets of BDDs AFTER Existential Quantification 39 | 40 | 3. Functions to load the header of a BDD/ADD/CNF file, so collecting 41 | information regarding variables, variable ordering, etc. 42 | This can be seen as a pre-processing step prior a possible BDD/ADD/CNF 43 | load of the entire structure. 44 | Moreover it can be used in a manager initialization phase. 45 | 46 | 4. More precise information are stored in each BDD/ADD header during 47 | the storing phase. 48 | In particular this information may be used to make up the exact 49 | variable ordering present in the manager used during the storing 50 | phase. 51 | Full compatibility with previously versions of the files (from 52 | dddmp-1.0 on) is guaranteed. 53 | 54 | 5. Miscellaneous 55 | Debugging has been performed on different hardware architectures 56 | 57 | 6. The test program, testdddmp has been improved. 58 | Now it allows to perform more operations and to better debug the 59 | different options. 60 | 61 | --------------------------------------------------------------------------------