1 #!/usr/bin/env python3 1 #!/usr/bin/env python3 2 # SPDX-License-Identifier: GPL-2.0-only 2 # SPDX-License-Identifier: GPL-2.0-only 3 # 3 # 4 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel< 4 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org> 5 # 5 # 6 # dot2c: parse an automata in dot file digraph 6 # dot2c: parse an automata in dot file digraph format into a C 7 # 7 # 8 # This program was written in the development 8 # This program was written in the development of this paper: 9 # de Oliveira, D. B. and Cucinotta, T. and de 9 # de Oliveira, D. B. and Cucinotta, T. and de Oliveira, R. S. 10 # "Efficient Formal Verification for the Linu 10 # "Efficient Formal Verification for the Linux Kernel." International 11 # Conference on Software Engineering and Form 11 # Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. 12 # 12 # 13 # For further information, see: 13 # For further information, see: 14 # Documentation/trace/rv/deterministic_autom 14 # Documentation/trace/rv/deterministic_automata.rst 15 15 16 if __name__ == '__main__': 16 if __name__ == '__main__': 17 from dot2 import dot2c 17 from dot2 import dot2c 18 import argparse 18 import argparse 19 import sys 19 import sys 20 20 21 parser = argparse.ArgumentParser(descripti 21 parser = argparse.ArgumentParser(description='dot2c: converts a .dot file into a C structure') 22 parser.add_argument('dot_file', help='The 22 parser.add_argument('dot_file', help='The dot file to be converted') 23 23 24 args = parser.parse_args() 24 args = parser.parse_args() 25 d = dot2c.Dot2c(args.dot_file) 25 d = dot2c.Dot2c(args.dot_file) 26 d.print_model_classic() 26 d.print_model_classic()
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.