Exemple #1
0
    def _save(self, path, fileformat):
        """Export options available only for closed systems.

        Provides: pml (Promela)

        See Also
        ========
        L{save}, L{plot}
        """
        if fileformat not in {'promela', 'Promela', 'pml'}:
            return False
        # closed ?
        if self.env_vars:
            return False
        from tulip.transys.export import graph2promela
        s = graph2promela.fts2promela(self, self.name)
        # dump to file
        f = open(path, 'w')
        f.write(s)
        f.close()
        return True
Exemple #2
0
    def _save(self, path, fileformat):
        """Export options available only for closed systems.

        Provides: pml (Promela)

        See Also
        ========
        L{save}, L{plot}
        """
        if fileformat not in {'promela', 'Promela', 'pml'}:
            return False
        # closed ?
        if self.env_vars:
            return False
        from tulip.transys.export import graph2promela
        s = graph2promela.fts2promela(self, self.name)
        # dump to file
        f = open(path, 'w')
        f.write(s)
        f.close()
        return True