Font Size: a A A

Generic Constraint Methods And Their Security Mechanisms

Posted on:2021-03-18Degree:MasterType:Thesis
Country:ChinaCandidate:Z H LiuFull Text:PDF
GTID:2428330620968773Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Object-oriented programming(OOP)is a programming paradigm centered on the objects in a program,while generic programming(GP)is a programming paradigm centered on type requirements.Generic programming(GP)and object-oriented programming(OOP)both remove the unstable parts of programming and construct programs with more generic and efficient parts.Although the two characteristics of universality and efficiency are considered to be opposed to each other,it is expected to achieve a balance between the two in most cases of program development,thus speeding up program development while ensuring type safety.This paper summarizes the similarities and differences about generic facilities in the mainstream programming languages with different design styles.For object-oriented programming languages,taking Java as an example,Java's parameterized types are tightly coupled with generic constraints.The generic requirements described are too narrow and can only be called narrow constraints;Programming language for dynamic types,like Python.Dynamically typed language naturally supports generics,and no strict type definition format.You can change parameter types at any time.The constraint mechanism of generics is almost non-existent;For functional programming languages,like Scala.The Implicits mechanism of Scala is based on the object-oriented programming style.Scala supports association types and generics conceptual features,but it still has implicit parameters.This paper studies the generic constraint methods and their security mechanisms in the mainstream programming languages.Due to the influence of other facilities in the mainstream languages,the language abstraction is not high enough to describe the complex semantic requirements,and the support for generic constraint in most mainstream languages is still at the grammar level.The lack of a normative constraint description language makes it difficult to directly write generic constraints that meet requirements.The highly abstract generic programming language Apla is used as the host language to propose a generic constraint method based on the requirement of complete GP type,which supports both syntactic and semantic level generic constraints.The Apla type system is presented.The basic data type constraint is described by using the form of first-order predicate logic formula.The custom abstract data type constraint is described based on the algebraic structure.The generic constraint description language is given.A security mechanism of Apla generic constraint is proposed to guarantee the security by means of constraint matching detection.A matching detection algorithm is designed to determine whether the generic constraint meets the requirements.Furthermore,the concept of GP with type requirements as the core in a complete sense is implemented.Finally,using the PAR method as the support,the function of the Apla generic constraint security mechanism was implemented in the PAR platform C++ generation system.Compared with the existing research,the concept of GP with type requirement as the core is further realized.
Keywords/Search Tags:Generic programming, Type requirements, Generic constraint method, Generic constraint security mechanism, Platform to realize
PDF Full Text Request
Related items