P systems with active membranes are among the central ones in membrane computing, and they were shown to be both computationally universal (able to simulate Turing machines) and computationally efficient (able to solve hard problems in polynomial time). However, in all cases, these results were obtained by making use of several powerful features, such as membrane polarization, label changing, division of non-elementary membranes, priorities, or cooperative rules. This paper contributes to the research effort of introducing a class of P systems with active membranes having none of the features mentioned above, but still preserving the power and the efficiency. The additional feature we consider instead are the operations of endocytosis and exocytosis: moving a membrane inside a neighboring membrane, or outside the membrane where it is placed. We investigate the power and the efficiency of these systems (also using membrane division) by first proving that they can simulate (with a linear slowdown and without introducing non-determinism) rewriting P systems with 2-replication, for which the universality and the possibility of solving NP-complete problems in polynomial time are known. In this way, the universality and efficiency are also obtained for our systems. We also give a direct and simple proof for the universality result – without using division rules (the proof uses nine membranes, but we do not know whether this number can be decreased). 相似文献
The development of a compiler for a dialect of ALGOL 60 is described. The emphasis is on the strategies used in the detection and smooth recovery from errors in the input text. These strategies are independent of both the language implemented and the implementation language. The user's view is such that he sees an ALGOL machine: the user is addressed in a language he is familiar with, using notions from the programming language and his particular program only. 相似文献
In any major software project, a large volume of project-related information must be maintained and manipulated throughout the software life-cycle. Often this information is scattered, in different media ranging from scraps of papers to program listings, poorly cross-referenced, and inaccessible. TRIAD, an adaptable, integrated software development environment, has been designed to integrate and manage all this information in an organized and structured manner.
The TRIAD tool-box environment supports different methodologies to guide the users during development and maintenance of project related information. The environment can be customized by selecting a set of forms which enforce a particular methodology. These forms help develop, integrate, and maintain project information. Forms for a methodology can be tuned to reflect a project-team's experience. When customized by the tuned methodology, TRIAD can provide better project oriented support.
TRIAD uses grammar forms as its organizational model. This paper will discuss the advantages of using grammar forms in the modeling and implementation of an adaptable software information editor, within the TRIAD tool-box environment. 相似文献
In this paper, we describe our experience in grammar engineering to construct multiple parsers and front ends for the Python language. We present a metrics-based study of the evolution of the Python grammars through the multiple versions of the language in an effort to distinguish and measure grammar evolution and to provide a basis of comparison with related research in grammar engineering. To conduct this research, we have built a toolkit, pygrat , which builds on tools developed in other research. We use pygrat to build a system that automates much of the process needed to translate the Python grammars from EBNF to a formalism acceptable to the bison parser generator. We exploit the suite of Python test cases, used by the Python developers, to validate our parser generation. Finally, we describe our use of the menhir parser generator to facilitate the parser and front-end construction, eliminating some of the transformations and providing practical support for grammar modularisation. 相似文献
It is a challenge for shape grammars to incorporate spatial hierarchy and interior connectivity of buildings in early design stages. To resolve this difficulty, we developed a bi‐directional procedural model: the forward process constructs the derivation tree with production rules, while the backward process realizes the tree with shapes in a stepwise manner (from leaves to the root). Each inverse‐derivation step involves essential geometric‐topological reasoning. With this bi‐directional framework, design constraints and objectives are encoded in the grammar‐shape translation. We conducted two applications. The first employs geometric primitives as terminals and the other uses previous designs as terminals. Both approaches lead to consistent interior connectivity and a rich spatial hierarchy. The results imply that bespoke geometric‐topological processing helps shape grammar to create plausible, novel compositions. Our model is more productive than hand‐coded shape grammars, while it is less computation‐intensive than evolutionary treatment of shape grammars. 相似文献