Mescal
Loading...
Searching...
No Matches
printing.h
1#ifndef PRINTING_H
2#define PRINTING_H
3
4#include <stdbool.h>
5#include <stdio.h>
6#include <stdlib.h>
7#include "tools.h"
8#include "monoid.h"
9#include "type_dequeue.h"
10#include "nfa.h"
11#include "alloc.h"
12#include "type_basic.h"
13#include "nfa_patterns.h"
14
15
16
17/********************************/
18/*+ Computation of multi-edges +*/
19/********************************/
30typedef struct {
31 uint in;
32 bool eps;
35 uint out;
37
45dequeue_gen* nfa_to_multi_edges(nfa*
46);
47
48
56dequeue_gen* dgraph_to_multi_edges(dgraph*
57);
58
59/***********************/
60/* Graphviz generation */
61/***********************/
62
63void named_lgedges_print(dequeue_gen* theedges, nfa* A, FILE* out);
64
65void named_dfaedges_print(dequeue_gen* theedges, dfa* A, FILE* out);
66
67void named_dedges_print(dequeue_gen* theedges, morphism* M, FILE* out);
68
69void dgraphedges_print(dequeue_gen* theedges, FILE* out);
70
71void nfa_print(nfa* A, FILE* out);
72
73void dfa_print(dfa* A, FILE* out);
74
75void dgraph_print(dgraph* g, FILE* out);
76
77void cayley_print(morphism* mor, FILE* out);
78
79void cayley_left_print(morphism* mor, FILE* out);
80
81/****************/
82/* Shell output */
83/****************/
84
85
86void view_nfa(nfa* nfa);
87
88void view_dfa(dfa* dfa);
89
90void view_dgraph(dgraph* g);
91
92void view_cayley(morphism* mor);
93
94void view_left_cayley(morphism* mor);
95
96void view_image(const char* filename);
97
98/********************/
99/* Latex generation */
100/********************/
101
102void latex_init(void);
103
104void latex_print_nfa(nfa* A, FILE* out);
105
106void latex_print_dfa(dfa* A, FILE* out);
107
108void latex_print_cayley(morphism* M, FILE* out);
109
110void latex_print_lcayley(morphism* M, FILE* out);
111
112
113
114#endif
Macros and functions to help memory allocation.
Implementation of morphisms into finite monoids.
Implementation of NFAs.
Patterns equations for DFAs.
Type used to represent a generic dequeue.
Definition type_dequeue_gen.h:32
Type used to represent a dequeue of unsigned integers.
Definition type_dequeue.h:26
Type used to represent a complete DFA.
Definition nfa.h:61
Type used to represent a complete deterministic directed labeled graph.
Definition graphs.h:73
The type used to represent a morphism into a finite monoid.
Definition monoid.h:91
Type used to represent a multi-edge in a graph.
Definition printing.h:30
bool eps
Epsilon transition.
Definition printing.h:32
dequeue * lab
Sorted list of labels.
Definition printing.h:33
dequeue * lab_i
Sorted list of inverse labels.
Definition printing.h:34
uint in
Initial state of the edge.
Definition printing.h:31
uint out
Final state of the edge.
Definition printing.h:35
Type used to represent a NFA.
Definition nfa.h:43
Basic types.
Implementation of dequeues of unsigned integers.