11 research outputs found
Semantic Deltas for Live DSL Environments
Domain-specific languages (DSLs) require IDE support, just like ordinary programming languages. This paper introduces semantic deltas as a foundation for building live DSL environments to bridge the "gulf of evaluation" between DSL code and the running application. Semantic deltas are distinguished from textual or structural deltas in two ways. First, they have meaning in the application domain captured by the DSL. Second, they can be interpreted at runtime so that the behavior of the running system adapts to the evolved DSL code. Semantic deltas have the potential to support back-in-time debugging, application state persistence, version control, retroactive updates and exploring what-if scenarios. I present early experiences in building a live DSL environment and identify areas for future research
Semantic Deltas for Live DSL Environments
Domain-specific languages (DSLs) require IDE support, just like ordinary programming languages. This paper introduces semantic deltas as a foundation for building live DSL environments to bridge the "gulf of evaluation" between DSL code and the running application. Semantic deltas are distinguished from textual or structural deltas in two ways. First, they have meaning in the application domain captured by the DSL. Second, they can be interpreted at runtime so that the behavior of the running system adapts to the evolved DSL code. Semantic deltas have the potential to support back-in-time debugging, application state persistence, version control, retroactive updates and exploring what-if scenarios. I present early experiences in building a live DSL environment and identify areas for future research
Transformation of structure-shy programs with application to XPath queries and strategic functions
Various programming languages allow the construction of structure-shy programs. Such programs are defined generically for many different datatypes and only specify specific behavior for a few relevant subtypes. Typical examples are XML query languages that allow selection of subdocuments without exhaustively specifying intermediate element tags. Other examples are languages and libraries for polytypic or strategic functional programming and for adaptive object-oriented programming.
In this paper, we present an algebraic approach to transformation of declarative structure-shy programs, in particular for strategic functions and XML queries. We formulate a rich set of algebraic laws, not just for transformation of structure-shy programs, but also for their conversion into structure-sensitive programs and vice versa. We show how subsets of these laws can be used to construct effective rewrite systems for specialization, generalization, and optimization of structure-shy programs. We present a type-safe encoding of these rewrite systems in Haskell which itself uses strategic functional programming techniques. We discuss the application of these rewrite systems for XPath query optimization and for query migration in the context of schema evolution
ΠΠ±ΠΎΠ±ΡΠ΅Π½Π½ΡΠ΅ ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΠ΅ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ Ρ Π½Π΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΠΌΠΈ Π·Π½Π°ΡΠ΅Π½ΠΈΡΠΌΠΈ Π² Π±Π°Π·Π°Ρ Π΄Π°Π½Π½ΡΡ
The paper discusses a new type of dependency in databases, which is a generalization of inclusion dependencies. Traditionally, such dependencies are used in practice to ensure referential integrity. In this case, the restriction is established only between a pair of relations, the first of which is called the main, the second is external. In practice, referential integrity often needs to be established for a larger number of relations, where several main and several external relations participate in the same constraint. Such a structure corresponds to an ultragraph. The paper provides a rationale for generalized inclusion dependencies that take into account the presence of null values in external relations. Based on the study of the properties of typed dependencies, a system of axioms is obtained, for which consistency (soundness) and completeness are proved.Π ΡΡΠ°ΡΡΠ΅ ΡΠ°ΡΡΠΌΠ°ΡΡΠΈΠ²Π°Π΅ΡΡΡ Π½ΠΎΠ²ΡΠΉ Π²ΠΈΠ΄ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π² Π±Π°Π·Π°Ρ
Π΄Π°Π½Π½ΡΡ
, ΡΠ²Π»ΡΡΡΠΈΠΉΡΡ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ΠΌ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ. Π’ΡΠ°Π΄ΠΈΡΠΈΠΎΠ½Π½ΠΎ ΡΠ°ΠΊΠΈΠ΅ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ Π½Π° ΠΏΡΠ°ΠΊΡΠΈΠΊΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡΡΡΡ Π΄Π»Ρ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΡ ΡΡΡΠ»ΠΎΡΠ½ΠΎΠΉ ΡΠ΅Π»ΠΎΡΡΠ½ΠΎΡΡΠΈ. ΠΡΠΈ ΡΡΠΎΠΌ, ΠΎΠ³ΡΠ°Π½ΠΈΡΠ΅Π½ΠΈΠ΅ ΡΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°Π΅ΡΡΡ ΡΠΎΠ»ΡΠΊΠΎ ΠΌΠ΅ΠΆΠ΄Ρ ΠΏΠ°ΡΠΎΠΉ ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠΉ, ΠΏΠ΅ΡΠ²ΠΎΠ΅ ΠΈΠ· ΠΊΠΎΡΠΎΡΡΡ
Π½Π°Π·ΡΠ²Π°Π΅ΡΡΡ Π³Π»Π°Π²Π½ΡΠΌ, Π²ΡΠΎΡΠΎΠ΅ β Π²Π½Π΅ΡΠ½ΠΈΠΌ. ΠΠ° ΠΏΡΠ°ΠΊΡΠΈΠΊΠ΅ ΡΡΡΠ»ΠΎΡΠ½ΡΡ ΡΠ΅Π»ΠΎΡΡΠ½ΠΎΡΡΡ ΡΠ°ΡΡΠΎ ΡΡΠ΅Π±ΡΠ΅ΡΡΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ Π΄Π»Ρ Π±ΠΎΠ»ΡΡΠ΅Π³ΠΎ ΡΠΈΡΠ»Π° ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠΉ, Π³Π΄Π΅ Π² ΠΎΠ΄Π½ΠΎΠΌ ΠΎΠ³ΡΠ°Π½ΠΈΡΠ΅Π½ΠΈΠΈ ΡΡΠ°ΡΡΠ²ΡΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ Π³Π»Π°Π²Π½ΡΡ
ΠΈ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΏΠΎΠ΄ΡΠΈΠ½Π΅Π½Π½ΡΡ
ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΠΉ. Π’Π°ΠΊΠ°Ρ ΡΡΡΡΠΊΡΡΡΠ° ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΠ΅Ρ ΡΠ»ΡΡΡΠ°Π³ΡΠ°ΡΡ. Π ΡΠ°Π±ΠΎΡΠ΅ ΠΏΡΠΈΠ²Π΅Π΄Π΅Π½ΠΎ ΠΎΠ±ΠΎΡΠ½ΠΎΠ²Π°Π½ΠΈΠ΅ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½Π½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ, ΡΡΠΈΡΡΠ²Π°ΡΡΠΈΡ
Π½Π°Π»ΠΈΡΠΈΠ΅ Π½Π΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΡ
Π·Π½Π°ΡΠ΅Π½ΠΈΠΉ Π²ΠΎ Π²Π½Π΅ΡΠ½ΠΈΡ
ΠΎΡΠ½ΠΎΡΠ΅Π½ΠΈΡΡ
. ΠΠ° ΠΎΡΠ½ΠΎΠ²Π΅ ΠΈΡΡΠ»Π΅Π΄ΠΎΠ²Π°Π½ΠΈΡ ΡΠ²ΠΎΠΉΡΡΠ² ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ ΠΏΠΎΠ»ΡΡΠ΅Π½Π° ΡΠΈΡΡΠ΅ΠΌΠ° Π°ΠΊΡΠΈΠΎΠΌ, Π΄Π»Ρ ΠΊΠΎΡΠΎΡΠΎΠΉ Π΄ΠΎΠΊΠ°Π·Π°Π½Π° Π½Π΅ΠΏΡΠΎΡΠΈΠ²ΠΎΡΠ΅ΡΠΈΠ²ΠΎΡΡΡ (Π½Π°Π΄Π΅ΠΆΠ½ΠΎΡΡΡ) ΠΈ ΠΏΠΎΠ»Π½ΠΎΡΠ°
ΠΠ½Π°Π»ΠΈΠ· ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΡ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ Ρ Π½Π΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΠΌΠΈ Π·Π½Π°ΡΠ΅Π½ΠΈΡΠΌΠΈ
Null values have become an urgent problem since the creation of the relational dataΒ model. The impact of the uncertainty aο¬ects all types of dependencies used in the design and operationΒ of the database. This fully applies to the inclusion dependencies, which are the theoretical basis forΒ referential integrity on the data. Attempts to solve this problem contain inaccuracy in the statementΒ of the problem and its solution. The errors in formulation of the problem can be associated with theΒ use in the deο¬nition of untyped inclusion dependencies, which leads to permutations of the attributes,Β although, the attributes in database technology are identiο¬ed by name and not by their place. In addition, linking with the use of the inclusion dependencies of heterogeneous attributes, even of the same type, is a sign of lost functional dependencies and leads to interaction of inclusion dependencies and non-trivial functional dependencies. Inaccuracies in the solution of the problem are contained in the statements of axioms and the proof of their properties, including completeness. In this paper we propose an original solution of this problem only for typed inclusion dependencies in the presence of Null values: a new axiom system is proposed, its completeness and soundness are proved. On the basis of inference rules we developed an algorithm for the construction of a not surplus set of typed inclusion dependencies. The correctness of the algorithm is proved.ΠΠ΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΠ΅ Π·Π½Π°ΡΠ΅Π½ΠΈΡ ΡΡΠ°Π»ΠΈ Π°ΠΊΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠΎΠΉ Ρ ΠΌΠΎΠΌΠ΅Π½ΡΠ° ΡΠΎΠ·Π΄Π°Π½ΠΈΡ ΡΠ΅Π»ΡΡΠΈΠΎΠ½Π½ΠΎΠΉ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π΄Π°Π½Π½ΡΡ
. ΠΠ»ΠΈΡΠ½ΠΈΠ΅ Π½Π΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΠΎΡΡΠ΅ΠΉ ΡΠΊΠ°Π·ΡΠ²Π°Π΅ΡΡΡ Π½Π° Π²ΡΠ΅Ρ
Π²ΠΈΠ΄Π°Ρ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ,Β ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΠΌΡΡ
ΠΏΡΠΈ ΠΏΡΠΎΠ΅ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠΈ ΠΈ ΡΠΊΡΠΏΠ»ΡΠ°ΡΠ°ΡΠΈΠΈ Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ
. Π ΠΏΠΎΠ»Π½ΠΎΠΉ ΠΌΠ΅ΡΠ΅ ΡΡΠΎ ΠΎΡΠ½ΠΎΡΠΈΡΡΡ ΠΈΒ ΠΊ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΡΠΌ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ, ΠΊΠΎΡΠΎΡΡΠ΅ ΡΠ²Π»ΡΡΡΡΡ ΡΠ΅ΠΎΡΠ΅ΡΠΈΡΠ΅ΡΠΊΠΎΠΉ ΠΎΡΠ½ΠΎΠ²ΠΎΠΉ ΡΡΡΠ»ΠΎΡΠ½ΠΎΠΉ ΡΠ΅Π»ΠΎΡΡΠ½ΠΎΡΡΠΈ Π½Π°Β Π΄Π°Π½Π½ΡΠ΅. ΠΠΎΠΏΡΡΠΊΠΈ ΡΠ΅ΡΠ΅Π½ΠΈΡ ΡΠΊΠ°Π·Π°Π½Π½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΡ ΡΠΎΠ΄Π΅ΡΠΆΠ°Ρ Π½Π΅ΡΠΎΡΠ½ΠΎΡΡΠΈ ΠΊΠ°ΠΊ Π² ΠΏΠΎΡΡΠ°Π½ΠΎΠ²ΠΊΠ΅ Π·Π°Π΄Π°ΡΠΈ,Β ΡΠ°ΠΊ ΠΈ Π² ΡΠ°ΠΌΠΎΠΌ Π΅Π΅ ΡΠ΅ΡΠ΅Π½ΠΈΠΈ. Π ΠΏΠΎΡΡΠ°Π½ΠΎΠ²ΠΎΡΠ½ΡΠΌ ΠΎΡΠΈΠ±ΠΊΠ°ΠΌ ΠΌΠΎΠΆΠ½ΠΎ ΠΎΡΠ½Π΅ΡΡΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ Π² ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΠΈ Π½Π΅ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ, ΡΡΠΎ ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊ ΠΏΠ΅ΡΠ΅ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°ΠΌ Π°ΡΡΠΈΠ±ΡΡΠΎΠ², Ρ
ΠΎΡΡ Π²Β ΡΠ΅Ρ
Π½ΠΎΠ»ΠΎΠ³ΠΈΡΡ
Π±Π°Π· Π΄Π°Π½Π½ΡΡ
Π°ΡΡΠΈΠ±ΡΡΡ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΡΠΈΡΡΡΡΡΡ ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ, Π° Π½Π΅ ΠΏΠΎ ΠΈΡ
ΠΏΠΎΠ·ΠΈΡΠΈΠΈ. ΠΡΠΎΠΌΠ΅ ΡΠΎΠ³ΠΎ,Β ΡΠ²ΡΠ·ΡΠ²Π°Π½ΠΈΠ΅ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΡΡ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΡΠ°Π·Π½ΠΎΡΠΎΠ΄Π½ΡΡ
, ΠΏΡΡΡΡ Π΄Π°ΠΆΠ΅ ΠΎΠ΄Π½ΠΎΡΠΈΠΏΠ½ΡΡ
, Π°ΡΡΠΈΠ±ΡΡΠΎΠ² ΡΠ²Π»ΡΠ΅ΡΡΡΒ ΠΏΡΠΈΠ·Π½Π°ΠΊΠΎΠΌ ΠΏΠΎΡΠ΅ΡΡΠ½Π½ΠΎΠΉ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΠΎΠΉ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΈ ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΡ Π½Π΅ΡΡΠΈΠ²ΠΈΠ°Π»ΡΠ½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΈ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ. ΠΠ°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ Π΄ΠΎΠ»ΠΆΠ½ΡΒ ΠΎΠΏΡΠ΅Π΄Π΅Π»ΡΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Π΅Π½Π½ΠΎΠ΅ ΡΠΎΠΎΡΠ½Π΅ΡΠ΅Π½ΠΈΠ΅ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² Π΄ΡΡΠ³ Ρ Π΄ΡΡΠ³ΠΎΠΌ, Π° Π½Π΅ Π·Π½Π°ΡΠ΅Π½ΠΈΠΉ Π°ΡΡΠΈΠ±ΡΡΠΎΠ². ΠΠ΅ΡΠΎΡΠ½ΠΎΡΡΠΈ Π² ΡΠ΅ΡΠ΅Π½ΠΈΠΈ ΡΠΊΠ°Π·Π°Π½Π½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΡ ΡΠΎΠ΄Π΅ΡΠΆΠ°ΡΡΡ Π² ΡΠΎΡΠΌΡΠ»ΠΈΡΠΎΠ²ΠΊΠ°Ρ
Π°ΠΊΡΠΈΠΎΠΌ ΠΈ Π΄ΠΎΠΊΠ°Π·Π°ΡΠ΅Π»ΡΡΡΠ²Π΅ ΠΈΡ
Β ΡΠ²ΠΎΠΉΡΡΠ², Π² ΡΠΎΠΌ ΡΠΈΡΠ»Π΅ ΠΏΠΎΠ»Π½ΠΎΡΡ. Π ΡΡΠΎΠΉ ΡΡΠ°ΡΡΠ΅ ΠΏΡΠ΅Π΄Π»Π°Π³Π°Π΅ΡΡΡ ΠΎΡΠΈΠ³ΠΈΠ½Π°Π»ΡΠ½ΠΎΠ΅ ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ ΡΡΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΡ ΡΠΎΠ»ΡΠΊΠΎ Π΄Π»Ρ ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΏΡΠΈ Π½Π°Π»ΠΈΡΠΈΠΈ Π½Π΅ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΡ
Π·Π½Π°ΡΠ΅Π½ΠΈΠΉ:Β ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½Π° ΡΠΈΡΡΠ΅ΠΌΠ° Π°ΠΊΡΠΈΠΎΠΌ, Π΄ΠΎΠΊΠ°Π·Π°Π½Π° Π΅Π΅ ΠΏΠΎΠ»Π½ΠΎΡΠ° ΠΈ Π½Π΅ΠΏΡΠΎΡΠΈΠ²ΠΎΡΠ΅ΡΠΈΠ²ΠΎΡΡΡ. ΠΠ° ΠΎΡΠ½ΠΎΠ²Π΅ ΠΏΡΠ°Π²ΠΈΠ» Π²ΡΠ²ΠΎΠ΄Π° ΡΠ°Π·ΡΠ°Π±ΠΎΡΠ°Π½ Π°Π»Π³ΠΎΡΠΈΡΠΌ ΠΏΠΎΡΡΡΠΎΠ΅Π½ΠΈΡ Π½Π΅ ΠΈΠ·Π±ΡΡΠΎΡΠ½ΠΎΠ³ΠΎ ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²Π° ΡΠΈΠΏΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉΒ Π²ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ. ΠΠΎΠΊΠ°Π·Π°Π½Π° ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎΡΡΡ ΡΡΠΎΠ³ΠΎ Π°Π»Π³ΠΎΡΠΈΡΠΌΠ°