cfpq_data.grammars.generators.c_alias_grammar#
- c_alias_grammar(*, assigment_labels: Tuple[str, str] = ('a', 'a_r'), dereference_labels: Tuple[str, str] = ('d', 'd_r'), start_symbol: Variable = Variable(S)) CFG [source]#
Returns a C Alias grammar that generates a language for the flow-insensitive alias analysis of C programs [1].
- Parameters:
assigment_labels (Tuple[str, str]) -- Pair \((a, a_r)\) where label \(a\) represents the assignment operation and \(a_r\) is reverse to it.
dereference_labels (Tuple[str, str]) -- Pair \((d, d_r)\) where label \(d\) represents pointer dereference relation and \(d_r\) is reverse to it.
start_symbol (Variable) -- Start symbol of the grammar.
Examples
>>> from cfpq_data import * >>> cfg = c_alias_grammar() >>> cfg_to_text(cfg) 'S -> d_r V d\nV -> V1 V2 V3\nV1 -> \nV1 -> V2 a_r V1\nV2 -> \nV2 -> S\nV3 -> \nV3 -> a V2 V3'
- Returns:
cfg -- C Alias context-free grammar.
- Return type:
CFG
References