Back to home page

OSCL-LXR

 
 

    


0001 #!/usr/bin/env python3
0002 # SPDX-License-Identifier: GPL-2.0-only
0003 #
0004 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
0005 #
0006 # dot2c: parse an automata in dot file digraph format into a C
0007 #
0008 # This program was written in the development of this paper:
0009 #  de Oliveira, D. B. and Cucinotta, T. and de Oliveira, R. S.
0010 #  "Efficient Formal Verification for the Linux Kernel." International
0011 #  Conference on Software Engineering and Formal Methods. Springer, Cham, 2019.
0012 #
0013 # For further information, see:
0014 #   Documentation/trace/rv/deterministic_automata.rst
0015 
0016 if __name__ == '__main__':
0017     from dot2 import dot2c
0018     import argparse
0019     import sys
0020 
0021     parser = argparse.ArgumentParser(description='dot2c: converts a .dot file into a C structure')
0022     parser.add_argument('dot_file',  help='The dot file to be converted')
0023 
0024     args = parser.parse_args()
0025     d = dot2c.Dot2c(args.dot_file)
0026     d.print_model_classic()