Pub Date : 2000-07-01DOI: 10.1016/S0096-0551(01)00004-2
Stefano Crespi Reghizzi , Matteo Pradella , Pierluigi San Pietro
Associative language descriptions (ALD) are a recent grammar model, theoretically less powerful than context free (CF) grammars, but adequate for describing the syntax of programming languages. ALD does not use nonterminal symbols, but rely on permissible contexts for specifying valid syntax trees. In order to assess ALD adequacy, we analyze the descriptional complexity of structurally equivalent CF and ALD grammars, finding comparable measures. The compression obtained using CF copy rules is matched by context inheritance in ALD. The family of hierarchical parentheses languages, an abstract paradigm of HTML, and of expressions with operator precedences is studied. A complete ALD grammar of Pascal testifies of the practicality of the ALD approach.
{"title":"Associative definition of programming languages","authors":"Stefano Crespi Reghizzi , Matteo Pradella , Pierluigi San Pietro","doi":"10.1016/S0096-0551(01)00004-2","DOIUrl":"10.1016/S0096-0551(01)00004-2","url":null,"abstract":"<div><p>Associative language descriptions (ALD) are a recent grammar model, theoretically less powerful than context free (CF) grammars, but adequate for describing the syntax of programming languages. ALD does not use nonterminal symbols, but rely on permissible contexts for specifying valid syntax trees. In order to assess ALD adequacy, we analyze the descriptional complexity of structurally equivalent CF and ALD grammars, finding comparable measures. The compression obtained using CF copy rules is matched by context inheritance in ALD. The family of hierarchical parentheses languages, an abstract paradigm of HTML, and of expressions with operator precedences is studied. A complete ALD grammar of Pascal testifies of the practicality of the ALD approach.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 2","pages":"Pages 105-123"},"PeriodicalIF":0.0,"publicationDate":"2000-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00004-2","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"82141745","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-07-01DOI: 10.1016/S0096-0551(01)00009-1
M. Mosconi , M. Porta
Many visual programming languages (VPLs) rely on the data-flow paradigm, probably because of its simple and intuitive functioning mechanism. However, there are cases where more powerful programming constructs are needed to deal with complex problems. For example, iteration is undoubtedly an important aspect of programming, and should allow repetitive behaviors to be specified in compact and easy ways. Most existing data-flow VPLs provide special constructs to implement iterations, therefore infringing the pure data-flow paradigm in favor of program simplicity. This paper has three main purposes: (1) To provide a survey of the mechanisms used by some representative data-flow VPLs to carry out iterations; (2) To investigate, given a pure data-flow VPL, what should be the minimum set of characteristics which, after being added to the VPL, allow iterations to be implemented; and (3) To show real data-flow iteration implementations which rely on the characteristics pertaining to such a minimum set.
{"title":"Iteration constructs in data-flow visual programming languages","authors":"M. Mosconi , M. Porta","doi":"10.1016/S0096-0551(01)00009-1","DOIUrl":"10.1016/S0096-0551(01)00009-1","url":null,"abstract":"<div><p>Many visual programming languages (VPLs) rely on the data-flow paradigm, probably because of its simple and intuitive functioning mechanism. However, there are cases where more powerful programming constructs are needed to deal with complex problems. For example, iteration is undoubtedly an important aspect of programming, and should allow repetitive behaviors to be specified in compact and easy ways. Most existing data-flow VPLs provide special constructs to implement iterations, therefore infringing the pure data-flow paradigm in favor of program simplicity. This paper has three main purposes: (1) To provide a survey of the mechanisms used by some representative data-flow VPLs to carry out iterations; (2) To investigate, given a pure data-flow VPL, what should be the minimum set of characteristics which, after being added to the VPL, allow iterations to be implemented; and (3) To show real data-flow iteration implementations which rely on the characteristics pertaining to such a minimum set.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 2","pages":"Pages 67-104"},"PeriodicalIF":0.0,"publicationDate":"2000-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00009-1","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"80615039","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-07-01DOI: 10.1016/S0096-0551(01)00010-8
Marco Cadoli , Giovambattista Ianni , Luigi Palopoli , Andrea Schaerf , Domenico Vasile
In this paper a logic-based specification language, called NP-SPEC, is presented. The language is obtained by extending DATALOG through allowing a limited use of some second-order predicates of predefined form. NP-SPEC programs specify solutions to problems in a very abstract and concise way, and are executable. In the present prototype they are compiled to PROLOG code, which is run to construct outputs. Second-order predicates of suitable form allow to limit the size of search spaces in order to obtain reasonably efficient construction of problem solutions. NP-SPEC expressive power is precisely characterized as to express exactly the problems in the class NP. The specification of several combinatorial problems in NP-SPEC is shown, and the efficiency of the generated programs is evaluated.
{"title":"NP-SPEC: an executable specification language for solving all problems in NP","authors":"Marco Cadoli , Giovambattista Ianni , Luigi Palopoli , Andrea Schaerf , Domenico Vasile","doi":"10.1016/S0096-0551(01)00010-8","DOIUrl":"10.1016/S0096-0551(01)00010-8","url":null,"abstract":"<div><p>In this paper a logic-based specification language, called <span>NP</span>-<span>SPEC</span>, is presented. The language is obtained by extending <span>DATALOG</span> through allowing a limited use of some second-order predicates of predefined form. <span>NP</span>-<span>SPEC</span> programs specify solutions to problems in a very abstract and concise way, and are executable. In the present prototype they are compiled to <span>PROLOG</span> code, which is run to construct outputs. Second-order predicates of suitable form allow to limit the size of search spaces in order to obtain reasonably efficient construction of problem solutions. <span>NP</span>-<span>SPEC</span> expressive power is precisely characterized as to express exactly the problems in the class NP. The specification of several combinatorial problems in <span>NP</span>-<span>SPEC</span> is shown, and the efficiency of the generated programs is evaluated.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 2","pages":"Pages 165-195"},"PeriodicalIF":0.0,"publicationDate":"2000-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00010-8","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"76056936","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-07-01DOI: 10.1016/S0096-0551(01)00008-X
Paolo Ciancarini , Daniela Fogli , Mauro Gaspari
We describe Gammalog, a logic language whose semantics is based on the chemical metaphor. The language combines the ability of describing coordination by transformation rules on a shared-dataspace, as in Gamma, with the execution model of logic programming. The main feature of Gammalog is that the declarative reading of programs is not restricted to the pure logic language but it also includes the coordination mechanisms. This feature makes Gammalog a promising alternative to other coordination models which can be embedded in logic programming. We present the language syntax, its formal semantics, and a prototype implementation based on Gödel, which inherits its strongly typed framework. As an example of the expressive power of the language we provide the specification of a simple operating system.
{"title":"A declarative coordination language","authors":"Paolo Ciancarini , Daniela Fogli , Mauro Gaspari","doi":"10.1016/S0096-0551(01)00008-X","DOIUrl":"10.1016/S0096-0551(01)00008-X","url":null,"abstract":"<div><p>We describe Gammalog, a logic language whose semantics is based on the chemical metaphor. The language combines the ability of describing coordination by transformation rules on a shared-dataspace, as in Gamma, with the execution model of logic programming. The main feature of Gammalog is that the declarative reading of programs is not restricted to the pure logic language but it also includes the coordination mechanisms. This feature makes Gammalog a promising alternative to other coordination models which can be embedded in logic programming. We present the language syntax, its formal semantics, and a prototype implementation based on Gödel, which inherits its strongly typed framework. As an example of the expressive power of the language we provide the specification of a simple operating system.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 2","pages":"Pages 125-163"},"PeriodicalIF":0.0,"publicationDate":"2000-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00008-X","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"89285794","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-04-01DOI: 10.1016/S0096-0551(01)00007-8
G. Tremblay , B. Malenfant
In a companion paper (Tremblay G. Lenient evaluation is neither strict nor lazy. Computer languages 2000; 26:43–66.), we showed that non-strict functional languages were not necessarily lazy. More precisely, non-strict functional languages can be divided into lenient and lazy languages, both types allowing program constructions not directly available in strict functional languages. In this paper, we present parallel models of three evaluation strategies (strict, lenient, and lazy), along with an examination of the impact of these evaluation strategies on the implicit parallelism that can be extracted from programs. These formal semantics, expressed using a parallel notation (π-calculus), make it possible to show why lenient evaluation can be seen as more naturally parallel.
{"title":"Lenient evaluation and parallelism","authors":"G. Tremblay , B. Malenfant","doi":"10.1016/S0096-0551(01)00007-8","DOIUrl":"10.1016/S0096-0551(01)00007-8","url":null,"abstract":"<div><p>In a companion paper (Tremblay G. Lenient evaluation is neither strict nor lazy. Computer languages 2000; 26:43–66.), we showed that non-strict functional languages were not necessarily lazy. More precisely, non-strict functional languages can be divided into lenient and lazy languages, both types allowing program constructions not directly available in strict functional languages. In this paper, we present <em>parallel</em> models of three evaluation strategies (strict, lenient, and lazy), along with an examination of the impact of these evaluation strategies on the implicit parallelism that can be extracted from programs. These formal semantics, expressed using a parallel notation (<em>π</em>-calculus), make it possible to show why lenient evaluation can be seen as more naturally parallel.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 1","pages":"Pages 27-41"},"PeriodicalIF":0.0,"publicationDate":"2000-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00007-8","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"83894061","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-04-01DOI: 10.1016/S0096-0551(01)00006-6
G. Tremblay
What is a non-strict functional language? Is a non-strict language necessarily lazy? What additional expressiveness brings non-strictness, with or without laziness? This paper tries to shed some light on these questions.
First, in order to characterize non-strictness, different evaluation strategies are introduced: strict, lazy, and lenient. Then, using program examples, how these evaluation strategies differ from each other is examined, showing that non-strictness, even without laziness, allows a more general use of recursive definitions. We also report on a small experiment that we performed to examine how, in practice, laziness was used in a number of lazy benchmark programs.
{"title":"Lenient evaluation is neither strict nor lazy","authors":"G. Tremblay","doi":"10.1016/S0096-0551(01)00006-6","DOIUrl":"10.1016/S0096-0551(01)00006-6","url":null,"abstract":"<div><p>What is a non-strict functional language? Is a non-strict language necessarily lazy? What additional expressiveness brings non-strictness, with or without laziness? This paper tries to shed some light on these questions.</p><p>First, in order to characterize non-strictness, different evaluation strategies are introduced: strict, lazy, and lenient. Then, using program examples, how these evaluation strategies differ from each other is examined, showing that non-strictness, even without laziness, allows a more general use of recursive definitions. We also report on a small experiment that we performed to examine how, in practice, laziness was used in a number of lazy benchmark programs.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 1","pages":"Pages 43-66"},"PeriodicalIF":0.0,"publicationDate":"2000-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00006-6","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81229502","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2000-04-01DOI: 10.1016/S0096-0551(01)00005-4
Annalisa Bossi , Sandro Etalle , Sabina Rossi
Recent logic programming languages employ dynamic scheduling of calls to improve efficiency of programs. Dynamic scheduling is realized by allowing some calls to be dynamically “delayed” until their arguments are sufficiently instantiated. To this end, logic languages are extended with constructs such as delay declarations. However, many declarative properties that hold for logic and pure Prolog programs do not apply any longer in this extended setting. In particular, the equivalence between the model–theoretic and operational semantics does not hold. In this paper, we study the class of input-consuming programs. Firstly, we argue that input-consuming logic programs are suitable for modeling programs employing delay declarations. Secondly, we show that—under some syntactic restrictions—the -semantics of a program is correct and fully abstract also for input-consuming programs. This allows us to conclude that for a large class of programs employing delay declarations there exists a model–theoretic semantics which is equivalent to the operational one. Thus, input-consuming programs are shown to be the right answer for conjugate efficiency and declarativeness.
{"title":"Semantics of well-moded input-consuming logic programs","authors":"Annalisa Bossi , Sandro Etalle , Sabina Rossi","doi":"10.1016/S0096-0551(01)00005-4","DOIUrl":"10.1016/S0096-0551(01)00005-4","url":null,"abstract":"<div><p>Recent logic programming languages employ dynamic scheduling of calls to improve efficiency of programs. Dynamic scheduling is realized by allowing some calls to be dynamically “delayed” until their arguments are sufficiently instantiated. To this end, logic languages are extended with constructs such as <em>delay declarations</em>. However, many declarative properties that hold for logic and pure Prolog programs do not apply any longer in this extended setting. In particular, the equivalence between the model–theoretic and operational semantics does not hold. In this paper, we study the class of <em>input-consuming</em> programs. Firstly, we argue that input-consuming logic programs are suitable for modeling programs employing delay declarations. Secondly, we show that—under some syntactic restrictions—the <span><math><mtext>S</mtext></math></span>-semantics of a program is correct and fully abstract also for input-consuming programs. This allows us to conclude that for a large class of programs employing delay declarations there exists a model–theoretic semantics which is equivalent to the operational one. Thus, input-consuming programs are shown to be the right answer for conjugate efficiency and declarativeness.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"26 1","pages":"Pages 1-25"},"PeriodicalIF":0.0,"publicationDate":"2000-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(01)00005-4","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"88772747","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 1999-12-01DOI: 10.1016/S0096-0551(00)00006-0
Antonio Brogi , Chiara Renso , Franco Turini
We present a logic-based programming language that features meta-level composition operations over programs. Object programs are parameterised named collections of definite clauses which may contain formulae of the form Ain Pexp, where A is a standard atomic formula and Pexp is a program expression obtained by applying composition operations over named object programs. The semantics of the language is presented in two different equivalent styles. An operational, top-down semantics is given by means of inference rules, while a denotational, bottom-up semantics is given via an immediate consequence operator associated with program expressions. A meta-programming implementation of the language is also presented by transforming the operational inference rules into meta-level axioms. Several programming examples are discussed to illustrate the expressive power of the language.
{"title":"Dynamic composition of parameterised logic modules","authors":"Antonio Brogi , Chiara Renso , Franco Turini","doi":"10.1016/S0096-0551(00)00006-0","DOIUrl":"10.1016/S0096-0551(00)00006-0","url":null,"abstract":"<div><p>We present a logic-based programming language that features meta-level composition operations over programs. Object programs are parameterised named collections of definite clauses which may contain formulae of the form <em>A</em> <em>in Pexp</em>, where <em>A</em> is a standard atomic formula and <em>Pexp</em> is a program expression obtained by applying composition operations over named object programs. The semantics of the language is presented in two different equivalent styles. An operational, top-down semantics is given by means of inference rules, while a denotational, bottom-up semantics is given via an immediate consequence operator associated with program expressions. A meta-programming implementation of the language is also presented by transforming the operational inference rules into meta-level axioms. Several programming examples are discussed to illustrate the expressive power of the language.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"25 4","pages":"Pages 211-242"},"PeriodicalIF":0.0,"publicationDate":"1999-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0096-0551(00)00006-0","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81214579","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}