Apla Generic Constraint Matching Detection and Verification

2019 
The core of object-oriented programming (OOP) is the object, while the core of generic programming (GP) is the type requirement. Generic programming can improve the reusability, security and development efficiency of programs. Generic constraints can prevent run-time crashes of generic programs. Generics constraints and their matching mechanism in the mainstream programming languages are studied. The abstract degree of the current mainstream languages is not high enough to describe the complex dynamic semantic requirements. Abstract generic programming language Apla is used as the host language to propose a generic constraint method based on the type requirements of complete GP, including static syntax generic constraint and dynamic semantic generic constraint. A general generic constraint description language is given, a matching detection algorithm is designed to determine whether the static syntax generic constraints meet the requirements, and a matching verification mechanism is designed for dynamic semantic generic constraint verification. Finally, the whole process of matching detection and verification is demonstrated by taking Kleene algorithm as an example. The generic constraint mechanism can improve the security of the program. It further implements the GP concept with the type requirement as the core in the full sense.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    8
    References
    0
    Citations
    NaN
    KQI
    []