Context-Free Language (CFL) is a language which is generated by a context-free grammar or Type 2 grammar(according to Chomsky classification) and gets accepted by a Pushdown Automata.
Some very much important properties of a context-free language is:
Regularity- context-free languages are Non-Regular PDA language.
Closure properties :
The context-free languages are closed under some specific operation, closed means after doing that operation on a context-free language the resultant language will also be a context-free language.Some such operation are:
- Union Operation
- Kleene closure
- Reversal operation
- Inverse Homomorphism
- init or prefix operation
- Quotient with regular language
- Cycle operation
- Union with regular language
- Intersection with regular language
- Difference with regular language
Context free language is not closed under some specific operation, not-closed means after doing that operation on a context-free language the resultant language not remains be a context-free language anymore.
Some such operation are:
- Infinite Union
- Difference, Symmetric difference (xor, Nand, nor or any other operation which get reduced to intersection and complement
- Test for Membership: Decidable.
- Test for Emptiness: Decidable
- Test for finiteness: Decidable
Rest the decision properties are undecidable in context-free language.
Deterministic property :
The context-free language can be:
- DCFL-Deterministic (which can be recognized by deterministic pushdown automata) context-free language
- NDCFL-Non-deterministic (can’t be rcognized by DPDA but NPDA) context free language.