
Oliveira, Nuno; Pereira, Maria João; Henriques, Pedro; Cruz, Daniela; Cramer, Bastian
The focus of this paper is on crafting a new visual language for attribute grammars (AGs), and on the development of the associated programming environment. We present a solution for rapid development of
VisualLISA editor using DEViL. DEViL uses traditional attribute grammars, to specify the language’s syntax and semantics, extended by visual representations to be associated with grammar symbols. From these
specifications a visual programming environment is automatically generated.
In our case, the environment allows us to edit a visual description of an AG that is automatically translated into textual notations, including an XMLbased representation for attribute grammars (XAGra), and is intended to...

Kosar, Tomaz; Oliveira, Nuno; Mernik, Marjan; Pereira, Maria João; Crepinsek, Matej; Cruz, Daniela; Henriques, Pedro
Many domainspecific languages, that try to bring feasible alternatives for existing solutions while simplifying programming work,
have come up in recent years. Although, these little languages seem to be easy to use, there is an open issue whether they bring advantages in comparison to the application libraries, which are the most commonly used implementation approach. In this work, we present an experiment, which was carried out to compare such a domainspecific language with a comparable application library. The experiment was conducted with 36 programmers, who have answered a questionnaire on both implementation approaches. The questionnaire is more than 100 pages long....

Gouveia, Paulo D.F.; Torres, Delfim F.M.
We study Smarandache sequences of numbers, and related problems, via a Computer Algebra System. Solutions are discovered, and some conjectures presented.

Gouveia, Paulo D.F.; Torres, Delfim F.M.
We present analytical computational tools that permit us to identify, in an automatic way, conservation laws in optimal control. The central result we use is the famous Noether's theorem, a classical theory developed by Emmy Noether in 1918, in the context of the calculus of variations and mathematical physics, which was extended recently to the more general context of optimal control. We show how a Computer Algebra System can be very helpful in ¯nding the symmetries and corresponding conservation laws in optimal control theory, thus making useful in practice the theoretical results recently obtained in the literature. A Maple implementation...

Gouveia, Paulo D.F.; Torres, Delfim F.M.
Os problemas de optimização dinâmica (em espaços de funções) tratados pelo cálculo das variações, são normalmente resolvidos por recurso às condições necessárias de EulerLagrange, que são equações diferenciais de segunda ordem (ou de ordem superior, quando os problemas variacionais envolvem derivadas de ordem superior a um). Estas equações são, em geral, não lineares e de difícil resolução. Uma forma de as simplificar consiste em obter leis de conservação: primeiros integrais das equações diferenciais de EulerLagrange. Se em áreas como a Física e a Economia a questão da existência de leis de conservação é resolvida de forma bastante natural, a própria...

Gouveia, Paulo D.F.; Torres, Delfim F.M.; Rocha, Eugénio A.M.
We use a computer algebra system to compute, in an efficient way, optimal control variational symmetries up to a gauge term. The symmetries are then used to obtain families of Noether’s first integrals, possibly in the presence of nonconservative external forces. As an application, we obtain eight independent first integrals for the subRiemannian nilpotent problem (2, 3, 5, 8).

Plakhov, Alexander; Gouveia, Paulo D.F.
A twodimensional body moves through a rarefied medium; the collisions of the medium particles with the body are absolutely elastic.The body performs both translational and slow rotational motion. It is required to select the body, from a given class of bodies, such that the average force of resistance of the medium to its motion is maximal.
There are presented numerical and analytical results concerning this problem. In particular, the maximum resistance in the class of bodies contained in a convex body K is proved to be 1.5 times resistance of K. The maximum is attained on a sequence of bodies with...

Gouveia, Paulo D.F.; Torres, Delfim F.M.
We give a new computational method to obtain symmetries of ordinary differential equations. The proposed approach appears as an extension of a recent algorithm to compute variational symmetries of optimal control problems [P.D.F. Gouveia, D.F.M. Torres, Automatic computation of conservation laws in the calculus of variations and optimal control, Comput. Methods Appl. Math. 5 (4) (2005) 387 409], and is based on the resolution of a first order linear PDE that arises as a necessary and sufficient condition of invariance for abnormal optimal control problems. A computer algebra procedure is developed, which permits one to obtain ODE symmetries by the...

Gouveia, Paulo D.F.; Plakhov, Alexander; Torres, Delfim F.M.
We investigate, by means of computer simulations, shapes of nonconvex bodies that maximize resistance to their motion through a rarefied medium, considering that the bodies are moving forward and at the same time slowly rotating. A twodimensional geometric shape that confers to the body a resistance very close to the theoretical supremum value is obtained, which improves previous results.

Gouveia, Paulo D.F.; Plakhov, Alexander; Torres, Delfim F.M.
A twodimensional body, exhibiting a slight rotational movement, moves in a rarefied medium of particles which collide with it in a perfectly elastic way. In previously realized investigations by the first two authors, [Alexander Yu. Plakhov, Paulo D.F. Gouveia, Problems of maximal mean resistance on the plane, Nonlinearity, 20 (2007), 2271–2287], shapes of nonconvex bodies were sought which would maximize the braking force of the medium on their movement. Giving continuity to this study, new investigations have been undertaken which culminate in an outcome which represents a large qualitative advance relative to that which was achieved earlier. This result, now...

Cruz, Daniela; Berón, Mario; Henriques, Pedro; Pereira, Maria João
The aim of this paper is to show the approaches involved in the implementation of two tools of PCVIA project that can be used for Program Comprehension. Both tools use known compiler techniques to inspect code in order to visualize and understand programs’
execution but one of them modifies the source code and the other not.
In the noninvasive approach, we convert the source program into an internal decorated (or attributed) abstract syntax tree and then
we visualize the structure traversing it, and applying visualization rules at each node according to a predefined rulebase. No changes are made in the source code, and...

Cruz, Daniela; Henriques, Pedro; Pereira, Maria João
To be a debugger is a good thing! Since the very beginning of the programming activity, debuggers are the most important and widely
used tools after editors and compilers; we completely recognize their importance for software development and testing. Debuggers work at machine level, after the compilation of the source program; they deal with assembly, or binarycode, and are mainly data structure inspectors.
Alma is a program animator based on its abstract representation. The main idea is to show the algorithm being implemented by the program, independently from the language used to implement it. To say that ALMA is a debugger, with...

Pereira, Maria João; Mernik, Marjan; Cruz, Daniela; Henriques, Pedro
In the past, we have been looking for program comprehension tools that are able to interconnect operational and behavioral views, aiming at aiding the software analyst to relate problem and program domains in order to reach a full understanding of software systems. In this paper we are concerned with Program Comprehension issues
applied to Domain Specific Languages (DSLs). We are now willing to understand how techniques and tools for the comprehension of
traditional programming languages fit in the understanding of DSLs.
Being the language tailored for the description of problems in a specific domain, we believe that specific visualizations (at a higher abstraction
level,...

Kosar, Tomaz; Mernik, Marjan; Zumer, Viljem; Henriques, Pedro; Pereira, Maria João
The paper presents a grammatical approach to problem solving. It supports formal
software specification using attribute grammars, from which a rapid prototype can be
generated, as well as the incremental software development. Domain concepts and relationships among them have to be identified from a problem statement and represented
as a contextfree grammar. The obtained contextfree grammar describes the syntax of a domainspecific language whose semantics is the same as the functionality of the system
under implementation. The semantics of this language is then described using attribute
grammars from which a compiler is automatically generated. The execution of a particular program written in that domainspecific language...

Cruz, Daniela; Henriques, Pedro; Pereira, Maria João
The aim of this paper is to discuss how our patternbased strategy for the visualization of data and control flow can effectively be used to animate the program and exhibit its behavior. That result allows us to propose its use for Program Comprehension. The animator uses well known compiler techniques to inspect the source code in order to extract the necessary information to visualize it and understand program execution. We convert the source program into an internal decorated (or attributed) abstract syntax tree and then we visualize the structure by traversing it, and applying visualization rules at each node according...

Henriques, Pedro; Pereira, Maria João; Mernik, Marjan; Lenic, Mitja; Advicausevic, Enis; Zumer, Viljem
Many tools can be automatically derived from formal language definitions, such as compilers/interpreters, editors, analyzers, visualizers/animators, etc. Some examples of languagebased tools generated automatically by the LISA system are described in the paper. In addition the specification of an algorithm animator and program visualizer, Alma, generated from an extended LISA inputgrammar is discussed; LISA principles and code are reused in Alma implementation.

Henriques, Pedro; Pereira, Maria João; Mernik, Marjan; Lenic, Mitja; Gray, Jeff; Wu, Hui
Many tools have been constructed using different formal methods to process various parts of a language specification (e.g. scanner generators, parser generators and compiler generators). The automatic generation of a complete compiler was the primary goal of such systems, but researchers recognised the possibility that many other languagebased tools could be generated from formal language specifications. Such tools can be generated automatically whenever they can be described by a generic fixed part that traverses the appropriate data structures generated by a specific variable part, which can be systematically derivable from the language specifications. The paper identifies generic and specific parts...