9 resultados para C source
em Universidad Politécnica de Madrid
Resumo:
Ciao is a public domain, next generation multi-paradigm programming environment with a unique set of features: Ciao offers a complete Prolog system, supporting ISO-Prolog, but its novel modular design allows both restricting and extending the language. As a result, it allows working with fully declarative subsets of Prolog and also to extend these subsets (or ISO-Prolog) both syntactically and semantically. Most importantly, these restrictions and extensions can be activated separately on each program module so that several extensions can coexist in the same application for different modules. Ciao also supports (through such extensions) programming with functions, higher-order (with predicate abstractions), constraints, and objects, as well as feature terms (records), persistence, several control rules (breadth-first search, iterative deepening, ...), concurrency (threads/engines), a good base for distributed execution (agents), and parallel execution. Libraries also support WWW programming, sockets, external interfaces (C, Java, TclTk, relational databases, etc.), etc. Ciao offers support for programming in the large with a robust module/object system, module-based separate/incremental compilation (automatically -no need for makefiles), an assertion language for declaring (optional) program properties (including types and modes, but also determinacy, non-failure, cost, etc.), automatic static inference and static/dynamic checking of such assertions, etc. Ciao also offers support for programming in the small producing small executables (including only those builtins used by the program) and support for writing scripts in Prolog. The Ciao programming environment includes a classical top-level and a rich emacs interface with an embeddable source-level debugger and a number of execution visualization tools. The Ciao compiler (which can be run outside the top level shell) generates several forms of architecture-independent and stand-alone executables, which run with speed, efficiency and executable size which are very competive with other commercial and academic Prolog/CLP systems. Library modules can be compiled into compact bytecode or C source files, and linked statically, dynamically, or autoloaded. The novel modular design of Ciao enables, in addition to modular program development, effective global program analysis and static debugging and optimization via source to source program transformation. These tasks are performed by the Ciao preprocessor ( ciaopp, distributed separately). The Ciao programming environment also includes lpdoc, an automatic documentation generator for LP/CLP programs. It processes Prolog files adorned with (Ciao) assertions and machine-readable comments and generates manuals in many formats including postscript, pdf, texinfo, info, HTML, man, etc. , as well as on-line help, ascii README files, entries for indices of manuals (info, WWW, ...), and maintains WWW distribution sites.
Resumo:
Two experiments (Exp.) were conducted to determine the AME content of refined soybean oil (SO), recycled soybean oil (RSO), and acidulated soybean oil soapstocks (ASO) and the effects of inclusion of vitamin E and vitamin C in diets containing 3.5% of these soy oils on performance and egg quality of Hy-line hens from 44 to 56 wks of age.
Resumo:
Static analyses of object-oriented programs usually rely on intermediate representations that respect the original semantics while having a more uniform and basic syntax. Most of the work involving object-oriented languages and abstract interpretation usually omits the description of that language or just refers to the Control Flow Graph(CFG) it represents. However, this lack of formalization on one hand results in an absence of assurances regarding the correctness of the transformation and on the other it typically strongly couples the analysis to the source language. In this work we present a framework for analysis of object-oriented languages in which in a first phase we transform the input program into a representation based on Horn clauses. This allows on one hand proving the transformation correct attending to a simple condition and on the other being able to apply an existing analyzer for (constraint) logic programming to automatically derive a safe approximation of the semantics of the original program. The approach is flexible in the sense that the first phase decouples the analyzer from most languagedependent features, and correct because the set of Horn clauses returned by the transformation phase safely approximates the standard semantics of the input program. The resulting analysis is also reasonably scalable due to the use of mature, modular (C)LP-based analyzers. The overall approach allows us to report results for medium-sized programs.
Resumo:
We describe lpdoc, a tool which generates documentation manuals automatically from one or more logic program source files, written in Ciao, ISO-Prolog, and other (C)LP languages. It is particularly useful for documenting library modules, for which it automatically generates a rich description of the module interface. However, it can also be used quite successfully to document full applications. A fundamental advantage of using lpdoc is that it helps maintaining a true correspondence between the program and its documentation, and also identifying precisely to what versión of the program a given printed manual corresponds. The quality of the documentation generated can be greatly enhanced by including within the program text assertions (declarations with types, modes, etc. ...) for the predicates in the program, and machine-readable comments. One of the main novelties of lpdoc is that these assertions and comments are written using the Ciao system asseriion language, which is also the language of communication between the compiler and the user and between the components of the compiler. This allows a significant synergy among specification, debugging, documentation, optimization, etc. A simple compatibility library allows conventional (C)LP systems to ignore these assertions and comments and treat normally programs documented in this way. The documentation can be generated interactively from emacs or from the command line, in many formats including texinfo, dvi, ps, pdf, info, ascii, html/css, Unix nroff/man, Windows help, etc., and can include bibliographic citations and images, lpdoc can also genérate "man" pages (Unix man page format), nicely formatted plain ASCII "readme" files, installation scripts useful when the manuals are included in software distributions, brief descriptions in html/css or info formats suitable for inclusión in on-line Índices of manuals, and even complete WWW and info sites containing on-line catalogs of documents and software distributions. The lpdoc manual, all other Ciao system manuals, and parts of this paper are generated by lpdoc.
Resumo:
We describe lpdoc, a tool which generates documentation manuals automatically from one or more logic program source files, written in ISO-Prolog, Ciao, and other (C)LP languages. It is particularly useful for documenting library modules, for which it automatically generates a rich description of the module interface. However, it can also be used quite successfully to document full applications. A fundamental advantage of using lpdoc is that it helps maintaining a true correspondence between the program and its documentation, and also identifying precisely to what version of the program a given printed manual corresponds. The quality of the documentation generated can be greatly enhanced by including within the program text assertions (declarations with types, modes, etc.) for the predicates in the program, and machine-readable comments. One of the main novelties of lpdoc is that these assertions and comments are written using the Ciao system assertion language, which is also the language of communication between the compiler and the user and between the components of the compiler. This allows a significant synergy among specification, documentation, optimization, etc. A simple compatibility library allows conventional (C)LP systems to ignore these assertions and comments and treat normally programs documented in this way. The documentation can be generated in many formats including texinfo, dvi, ps, pdf, info, html/css, Unix nroff/man, Windows help, etc., and can include bibliographic citations and images. lpdoc can also generate “man” pages (Unix man page format), nicely formatted plain ascii “readme” files, installation scripts useful when the manuals are included in software distributions, brief descriptions in html/css or info formats suitable for inclusion in on-line indices of manuals, and even complete WWW and info sites containing on-line catalogs of documents and software distributions. The lpdoc manual, all other Ciao system manuals, and parts of this paper are generated by lpdoc.
Resumo:
CIAO is an advanced programming environment supporting Logic and Constraint programming. It offers a simple concurrent kernel on top of which declarative and non-declarative extensions are added via librarles. Librarles are available for supporting the ISOProlog standard, several constraint domains, functional and higher order programming, concurrent and distributed programming, internet programming, and others. The source language allows declaring properties of predicates via assertions, including types and modes. Such properties are checked at compile-time or at run-time. The compiler and system architecture are designed to natively support modular global analysis, with the two objectives of proving properties in assertions and performing program optimizations, including transparently exploiting parallelism in programs. The purpose of this paper is to report on recent progress made in the context of the CIAO system, with special emphasis on the capabilities of the compiler, the techniques used for supporting such capabilities, and the results in the áreas of program analysis and transformation already obtained with the system.
Resumo:
Lpdoc is an automatic program documentation generator for (C)LP systems. Lpdoc generates a reference manual automatically from one or more source files for a logic program (including ISO-Prolog, Ciao, many CLP systems, ...). It is particularly useful for documenting library modules, for which it automatically generates a description of the module interface. However, lpdoc can also be used quite successfully to document full applications and to generate nicely formatted plain ascii "readme" files. A fundamental advantage of using lpdoc to document programs is that it is much easier to maintain a true correspondence between the program and its documentation, and to identify precisely to what version of the program a given printed manual corresponds. The quality of the documentation generated can be greatly enhanced by including within the program text: • assertions (types, modes, etc. ...) for the predicates in the program, and • machine-readable comments (in the "literate programming" style). The assertions and comments included in the source file need to be written using the Ciao system assertion language. A simple compatibility library is available to make traditional (constraint) logic programming systems ignore these assertions and comments allowing normal treatment of programs documented in this way. The documentation is currently generated in HTML or texinf o format. From the texinf o output, printed and on-line manuals in several formats (dvi, ps, info, etc.) can be easily generated automatically, using publicly available tools, lpdoc can also generate 'man' pages (Unix man page format) as well as brief descriptions in html or emacs info formats suitable for inclusion in an on-line index of applications. In particular, lpdoc can create and maintain fully automatically WWW and info sites containing on-line versions of the documents it produces. The lpdoc manual (and the Ciao system manuals) are generated by lpdoc. Lpdoc is distributed under the GNU general public license. Note: lpdoc is fully supported on Linux, Mac OS X, and other Un*x-like systems. Due to the use of several Un*x-related utilities, some documentation back-ends may require Cygwin under Win32. This documentation corresponds to version 3.0 (2011/7/7, 16:33:15 CEST).
Resumo:
Background Gray scale images make the bulk of data in bio-medical image analysis, and hence, the main focus of many image processing tasks lies in the processing of these monochrome images. With ever improving acquisition devices, spatial and temporal image resolution increases, and data sets become very large. Various image processing frameworks exists that make the development of new algorithms easy by using high level programming languages or visual programming. These frameworks are also accessable to researchers that have no background or little in software development because they take care of otherwise complex tasks. Specifically, the management of working memory is taken care of automatically, usually at the price of requiring more it. As a result, processing large data sets with these tools becomes increasingly difficult on work station class computers. One alternative to using these high level processing tools is the development of new algorithms in a languages like C++, that gives the developer full control over how memory is handled, but the resulting workflow for the prototyping of new algorithms is rather time intensive, and also not appropriate for a researcher with little or no knowledge in software development. Another alternative is in using command line tools that run image processing tasks, use the hard disk to store intermediate results, and provide automation by using shell scripts. Although not as convenient as, e.g. visual programming, this approach is still accessable to researchers without a background in computer science. However, only few tools exist that provide this kind of processing interface, they are usually quite task specific, and don’t provide an clear approach when one wants to shape a new command line tool from a prototype shell script. Results The proposed framework, MIA, provides a combination of command line tools, plug-ins, and libraries that make it possible to run image processing tasks interactively in a command shell and to prototype by using the according shell scripting language. Since the hard disk becomes the temporal storage memory management is usually a non-issue in the prototyping phase. By using string-based descriptions for filters, optimizers, and the likes, the transition from shell scripts to full fledged programs implemented in C++ is also made easy. In addition, its design based on atomic plug-ins and single tasks command line tools makes it easy to extend MIA, usually without the requirement to touch or recompile existing code. Conclusion In this article, we describe the general design of MIA, a general purpouse framework for gray scale image processing. We demonstrated the applicability of the software with example applications from three different research scenarios, namely motion compensation in myocardial perfusion imaging, the processing of high resolution image data that arises in virtual anthropology, and retrospective analysis of treatment outcome in orthognathic surgery. With MIA prototyping algorithms by using shell scripts that combine small, single-task command line tools is a viable alternative to the use of high level languages, an approach that is especially useful when large data sets need to be processed.
Resumo:
La construcción en la actualidad de nuevas fuentes para el uso de haces de neutrones así como los programas de renovación en curso en algunas de las instalaciones experimentales existentes han evidenciado la necesidad urgente de desarrollar la tecnología empleada para la construcción de guías de neutrones con objeto de hacerlas mas eficientes y duraderas. Esto viene motivado por el hecho de que varias instalaciones de experimentación con haces de neutrones han reportado un número de incidentes mecánicos con tales guías, lo que hace urgente el progresar en nuestro conocimiento de los susbtratos vítreos sobre los cuales se depositan los espejos que permiten la reflexión total de los neutrones y como aquellos se degradan con la radiación. La presente tesis se inscribe en un acuerdo de colaboración establecido entre el Institut Max von Laue - Paul Langevin (ILL) de Grenoble y el Consorcio ESS-Bilbao con objeto de mejorar el rendimiento y sostenibilidad de los sistemas futuros de guiado de neutrones. El caso de la Fuente Europea de Espalación en construcción en Lund sirve como ejemplo ya que se contempla la instalación de guías de neutrones de más de 100 metros en algunos de los instrumentos. Por otro lado, instalaciones como el ILL prevén también dentro del programa Endurance de rejuvenecimiento la reconstrucción de varias líneas de transporte de haz. Para el presente estudio se seleccionaron cuatro tipos de vidrios borosilicatados que fueron el Borofloat, N-ZK7, N-BK7 y SBSL7. Los tres primeros son bien conocidos por los especialistas en instrumentación neutrónica ya que se han empleado en la construcción de varias instalaciones mientras que el último es un candidato potencial en la fabricación de substratos para espejos neutrónicos en un futuro. Los cuatro vidrios tiene un contenido en óxido de Boro muy similar, approximadamente un 10 mol.%. Tal hecho que obedece a las regulaciones para la fabricación de estos dispositivos hace que tales substratos operen como protección radiológica absorbiendo los neutrones transmitidos a través del espejo de neutrones. Como contrapartida a tal beneficio, la reacción de captura 10B(n,_)7Li puede degradar el substrato vítreo debido a los 2.5 MeV de energía cinética depositados por la partícula _ y los núcleos en retroceso y de hecho la fragilidad de tales vidrios bajo radiación ha sido atribuida desde hace ya tiempo a los efectos de esta reacción. La metodología empleada en esta tesis se ha centrado en el estudio de la estructura de estos vidrios borosilicatados y como esta se comporta bajo condiciones de radiación. Los materiales en cuestión presentan estructuras que dependen de su composición química y en particular del ratio entre formadores y modificadores de la red iono-covalente. Para ello se han empleado un conjunto de técnicas de caracterización tanto macro- como microscópicas tales como estudios de dureza, TEM, Raman, SANS etc. que se han empleado también para determinar el comportamiento de estos materiales bajo radiación. En particular, algunas propiedades macroscópicas relacionadas con la resistencia de estos vidrios como elementos estructurales de las guías de neutrones han sido estudiadas así como también los cambios en la estructura vítrea consecuencia de la radiación. Para este propósito se ha diseñado y fabricado por el ILL un aparato para irradiación de muestras con neutrones térmicos en el reactor del ILL que permite controlar la temperatura alcanzada por la muestra a menos de 100 °C. Tal equipo en comparación con otros ya existences permite en cuestión de dias acumular las dosis recibidas por una guía en operación a lo largo de varios años. El uso conjunto de varias técnicas de caracterización ha llevado a revelar que los vidrios aqui estudiados son significativamente diferentes en cuanto a su estructura y que tales diferencias afectan a sus propiedades macroscópicas asi como a su comportamiento bajo radiación. Tal resultado ha sido sorprendente ya que, como se ha mencionado antes, algunos de estos vidrios eran bien conocidos por los fabricantes de guías de neutrones y hasta el momento eran considerados prácticamente similares debido a su contenido comparable en óxido de Boro. Sin embargo, los materiales N-BK7 and S-BSL7 muetran gran homogeneidad a todas las escalas de longitud, y más específicamente, a escalas nanométricas las subredes de Sílice y óxido de Boro se mezclan dando logar a estructuras locales que recuerdan a la del cristal de Reedmergnerita. Por el contrario, N-ZK7 y Borofloat muestran dominios separados ricos en Sílice o Boro. Como era de esperar, las importantes diferencias arriba mencionadas se traducen en comportamientos dispares de estos materiales bajo un haz de neutrones térmicos. Los resultados muestran que el N-BK7 y el S-BSL7 son los más estables bajo radiación, lo que macroscópicamente hace que estos materiales muestren un comportamiento similar expandiéndose lentamente en función de la dosis recibida. Por el contario, los otros dos materiales muestran un comportamiento mucho más reactivo, que hace que inicialmente se compacten con la dosis recibida lo que hace que las redes de Silicio y Boro se mezclen resultando en un incremento en densidad hasta alcanzar un valor límite, seguido por un proceso de expansión lenta que resulta comparable al observado para N-BK7 y SBSL7. Estos resultados nos han permitido explicar el origen de las notorias diferencias observadas en cuanto a las dosis límite a partir de las cuales estos materiales desarrollan procesos de fragmentación en superficie. ABSTRACT The building of new experimental neutron beam facilities as well as the renewal programmes under development at some of the already existing installations have pinpointed the urgent need to develop the neutron guide technology in order to make such neutron transport devices more efficient and durable. In fact, a number of mechanical failures of neutron guides have been reported by several research centres. It is therefore important to understand the behaviour of the glass substrates on top of which the neutron optics mirrors are deposited and how these materials degrade under radiation conditions. The case of the European Spallation Source (ESS) at present under construction at Lund is a good example. It previews the deployment of neutron guides having more than 100 metres of length for most of the instruments. Also, the future renovation programme of the ILL, called Endurance, foresees the refurbishment of several beam lines. This Ph.D. thesis was the result of a collaboration agreement between the ILL and ESS-Bilbao aiming to improve the performance and sustainability of future neutron delivery systems. Four different industrially produced alkali-borosilicate glasses were selected for this study: Borofloat, N-ZK7, N-BK7 and SBSL7. The first three are well known within the neutron instrumentation community as they have already been used in several installations whereas the last one is at present considered as a candidate for making future mirror substrates. All four glasses have a comparable content of boron oxide of about 10 mol.%. The presence of such a strong neutron absorption element is in fact a mandatory component for the manufacturing of neutron guides because it provides a radiological shielding for the environment. This benefit is however somewhat counterbalanced since the resulting 10B(n,_)7Li reactions degrade the glass due to the deposited energy of 2.5 MeV by the _ particle and the recoil nuclei. In fact, the brittleness of some of these materials has been ascribed to this reaction. The methodology employed by this study consisted in understanding the general structure of borosilicates and how they behave under irradiation. Such materials have a microscopic structure strongly dependent upon their chemical content and particularly on the ratios between network formers and modifiers. The materials have been characterized by a suite of macroscopic and structural techniques such as hardness, TEM, Raman, SANS, etc. and their behaviour under irradiation was analysed. Some macroscopic properties related to their resistance when used as guide structural elements were monitored. Also, changes in the vitreous structure due to radiation were observed by means of several experimental tools. For such a purpose, an irradiation apparatus has been designed and manufactured to enable irradiation with thermal neutrons within the ILL reactor while keeping the samples below 100 °C. The main advantage of this equipment if compared to others previously available was that it allowed to reach in just some days an equivalent neutron dose to that accumulated by guides after several years of use. The concurrent use of complementary characterization techniques lead to the discovery that the studied glasses were deeply different in terms of their glass network. This had a strong impact on their macroscopic properties and their behaviour under irradiation. This result was a surprise since, as stated above, some of these materials were well known by the neutron guide manufacturers, and were considered to be almost equivalent because of their similar boron oxide content. The N-BK7 and S-BSL7 materials appear to be fairly homogeneous glasses at different length scales. More specifically, at nanometre scales, silicon and boron oxide units seem to mix and generate larger structures somewhat resembling crystalline Reedmergnerite. In contrast, N-ZK7 and Borofloat are characterized by either silicon or boron rich domains. As one could expect, these drastic differences lead to their behaviour under thermal neutron flux. The results show that N-BK7 and S-BSL7 are structurally the most stable under radiation. Macroscopically, such stability results in the fact that these two materials show very slow swelling as a function or radiation dose. In contrast, the two other glasses are much more reactive. The whole glass structure compacts upon radiation. Specifically, the silica network, and the boron units tend to blend leading to an increase in density up to some saturation, followed by a very slow expansion which comes to be of the same order than that shown by N-BK7 and S-BSL7. Such findings allowed us to explain the drastic differences in the radiation limits for macroscopic surface splintering for these materials when they are used in neutron guides.