Search NASA⌕ Search

SEARCH · Search NASA

Results for “Scala”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

A SQL to C compiler in 500 lines of code

Abstract We present the design and implementation of a SQL query processor that outperforms existing database systems and is written in just about 500 lines of Scala code – a convincing case study that high-level functional programming can handily beat C for systems-level programming where the last drop of performance matters. The key enabler is a shift in perspective toward generative programming. The core of the query engine is an interpreter for relational-algebra operations, written in Scala. Using the open-source lightweight modular staging framework, we turn this interpreter into a query compiler with very low effort. To do so, we capitalize on an old and widely known result from partial evaluation: the first Futamura projection, which states that a process that can specialize an interpreter to any given input program is equivalent to a compiler. In this context, we discuss lightweight modular staging programming patterns such as mixed-stage data structures (e.g., data records with static schema and dynamic field components) and techniques to generate low-level C code, including specialized data structures and data loading primitives.

Computer Science↗

Verilator Testbench Environment (VTE) v0.1

VTE is a library that allows fast and simple generation of C++ testers for modules written in Chisel and build an efficient interface to existing C++ based simulators. It contains Scala-based interface and C++ testbench class. Scala interface interacts with Firtl Interpreter and generates a basic set of C++ testbench files. These files contain the list of the Device Under Test (DUT) input-output ports as well as their parameters. C++ testbench provides functionalities similar to the Chisel PeekPokeTester, such as poke, expect, step functions. As a backend it uses Verilator.

Fatollahi-Fard, Farzad↗

A Fine-grained Asynchronous Bulk Synchronous parallelism model for PGAS applications

The Partitioned Global Address Space (PGAS) model is well suited for executing irregular applications on cluster-based systems, due to its efficient support for short, one-sided messages. Separately, the actor model has been gaining popularity as a productive asynchronous message-passing approach for distributed objects in enterprise and cloud computing platforms, typically implemented in languages such as Erlang, Scala or Rust. To the best of our knowledge, there has been no past work on using the actor model to deliver both productivity and scalability to irregular PGAS applications with large number of small messages. In this paper, we introduce a new programming system for PGAS applications, in which point-to-point remote operations can be expressed as fine-grained asynchronous actor messages. In our approach, the programmer does not need to worry about programming complexities related to message aggregation and termination detection. Our approach can be viewed as extending the classical Bulk Synchronous Parallelism model with fine-grained asynchronous communications within a phase or superstep. Here, we believe that our approach offers a desirable point in the productivity-performance space for PGAS applications, with more scalable performance and higher productivity relative to past approaches. Specifically, for seven irregular mini-applications from the Bale Kernels and three graph kernels executed using 2048 cores in the NERSC Cori system, our approach shows geometric mean performance improvements of ≥ 20X relative to standard PGAS versions (UPC and OpenSHMEM) while maintaining comparable productivity to those versions.

97 MATHEMATICS AND COMPUTING↗

Waveguides for neurostimulation in the cochlea

Introduction Optical stimulation has been suggested for neural stimulation to improve cochlear implants. Light allows for more spatially selective activation of neuron populations than electrical current, offering more independent frequency bands along the spiral ganglion. These bands are available to encode acoustic information with anticipated better frequency resolution, improving cochlear implant user performance in noisy listening environments, tonal languages, and music perception. Methods Optical cochlear implants (oCIs) can deliver light either directly via small emitters within the cochlea or via waveguides from external optical sources. We investigated three waveguide designs made from OrmoComp ® , a polymer that cures through ultraviolet (UV) radiation. Waveguides were fabricated via injection molding and coated using dip-coating or thermal reflow, or through aspiration of OrmoComp ® into polyimide tubing that served as the cladding of the waveguide. The choice of fabrication technique directly determined the waveguides' total diameter: thermal reflow yielded ≈940 μm, dip-coating produced ≈306 μm, and aspiration resulted in ≈132 μm core diameter waveguides. Given the human cochlea's small size, we focused on analyzing the 306-μm and 132-μm waveguides, evaluating their optical performance (propagation and bending losses) and mechanical properties (bending stiffness and insertion forces). Furthermore, we evaluated some of these designs in in-vivo guinea pigs experiments. Results For the 100-μm core diameter waveguides, the propagation losses were 12.34 ± 1.26, 1.18 ± 0.88, 1.49 ± 0.58, and 3.43 ± 0.68 dB/cm at 534, 1,375, 1,460, and 1,550 nm, respectively. The respective bending losses at a 2 mm radius of curvature were 5.50 ± 1.32, 0.56 ± 0.26, 0.79 ± 0.18, and 0.64 ± 0.23 dB, and at 1 mm 8.54 ± 1.30, 2.05 ± 0.84, 2.11 ± 0.50, and 1.44 ± 0.37 dB. The bending stiffness of a 1 mm segment of the 100-μm-diameter waveguides was 18.9 ± 2.2 N/m. Insertion forces for the 100-μm-diameter waveguides into an acrylic human-size scala tympani model were < 25 mN. For the waveguides with 306 and 940 μm total diameter, the propagation losses ranged between 0.43 and 2.40 dB/cm at 534, 680, 1,375, and 1,550 nm, between 2.19 and 3.78 dB/cm at 450 and 1,460 nm. Bending losses for 360 degrees at 1,375 nm were 5.0, 2.4, and 0.46 for a bending radius of 2.5-, 3-, and 4-mm. Discussion Our study demonstrated that the polymer OrmoComp ® is suitable for fabricating waveguides to transmit near-infrared radiation. In-vivo experiments showed optically evoked auditory responses originating from optical stimulation in the guinea pigs' first cochlear turn while radiation was delivered. Incoming experiments will focus on evaluating long-term performance of these waveguides in guinea pigs and cats. This study will be designed to provide insights into the waveguides' performance and biocompatibility over extended periods, essential for their potential clinical application in future oCIs.

Kim, Matthew↗

Gut microbiota composition and butyrate production in children affected by non-IgE-mediated cow’s milk allergy

Cow’s milk allergy (CMA) is one of the earliest and most common food allergy and can be elicited by both IgE- or non-IgE-mediated mechanism. We previously described dysbiosis in children with IgEmediated CMA and the effect of dietary treatment with extensively hydrolyzed casein formula (EHCF) alone or in combination with the probiotic Lactobacillus rhamnosus GG (LGG). On the contrary, the gut microbiota in non-IgE-mediated CMA remains uncharacterized. In this study we evaluated gut microbiota composition and fecal butyrate levels in children affected by non-IgE-mediated CMA. We found a gut microbiota dysbiosis in non-IgE-mediated CMA, driven by an enrichment of Bacteroides and Alistipes. Comparing these results with those previously obtained in children with IgE-mediated CMA, we demonstrated overlapping signatures in the gut microbiota dysbiosis of non-IgE-mediated and IgE-mediated CMA children, characterized by a progressive increase in Bacteroides from healthy to IgEmediated CMA patients. EHCF containing LGG was more strongly associated with an effect on dysbiosis and on butyrate production if compared to what observed in children treated with EHCF alone. If longitudinal cohort studies in children with CMA will confirm these results, gut microbiota dysbiosis could be a relevant target for innovative therapeutic strategies in children with non-IgE-mediated CMA.

59 BASIC BIOLOGICAL SCIENCES↗

Synthesis and crystal structures of (2 E )-1,4-bis(4-chlorophenyl)but-2-ene-1,4-dione and (2 E )-1,4-bis(4-bromophenyl)but-2-ene-1,4-dione

The molecular structure of (2 E )-1,4-bis(4-chlorophenyl)but-2-ene-1,4-dione [C 16 H 10 Cl 2 O 2 , ( 1 )] is composed of two p -chlorophenyl rings, each bonded on opposite ends to a near planar 1,4- trans enedione moiety [–C(=O)—CH=CH—(C=O)–] [r.m.s. deviation = 0.003 (1) Å]. (2 E )-1,4-Bis(4-bromophenyl)but-2-ene-1,4-dione [C 16 H 10 Br 2 O 2 , ( 2 )] has a similar structure to ( 1 ), but with two p -bromophenyl rings and a less planar enedione group [r.m.s. deviation = 0.011 (1) Å]. Both molecules sit on a center of inversion, thus Z ′ = 0.5. The dihedral angles between the ring and the enedione group are 16.61 (8) and 15.58 (11)° for ( 1 ) and ( 2 ), respectively. In the crystal, molecules of ( 1 ) exhibit C—Cl...Cl type I interactions, whereas molecules of ( 2 ) present C—Br...Br type II interactions. van der Waals-type interactions contribute to the packing of both molecules, and the packing reveals face-to-face ring stacking with similar interplanar distances of approximately 3.53 Å.

Lastovickova, Dominika N.↗

Synthesis and crystal structures of 5,5'-(propane-2,2-diyl)bis(2-hydroxybenzaldehyde) and 5,5'-(propane-2,2-diyl)bis(2-hydroxyisophthalaldehyde)

The title compounds 5,5'-(propane-2,2-diyl)bis(2-hydroxybenzaldehyde), C 17 H 16 O 4 , ( 1 ), and 5,5'-(propane-2,2-diyl)bis(2-hydroxyisophthalaldehyde), C 19 H 16 O 6 , ( 2 ), crystallize with one molecule in the asymmetric unit. In molecule ( 1 ), a >C(CH 3 ) 2 group bridges two nearly planar salicylaldehyde groups [r.m.s deviations = 0.010 (1) and 0.025 (2) Å], each comprising a planar phenyl ring bonded with a hydroxyl and an aldehyde group. Similarly, compound ( 2 ) has the same bridging group, but it connects two nearly planar appendants [r.m.s deviations = 0.034 (1) and 0.035 (1) Å], each comprising a phenyl ring bonded with a hydroxyl and two aldehyde groups. Molecule ( 1 ) exhibits a bridge angle of 109.5 (2)° with the salicylaldehyde planes subtending a dihedral angle of 88.4 (1)°. In contrast, molecule ( 2 ) presents a bridge angle of 108.9 (2)° with its appendants subtending a dihedral angle of 79.6 (3)°. Both molecules exhibit two intramolecular O—H...O hydrogen bonds involving the phenolic H atoms and carboxyl O-atom acceptors. In the crystal of ( 2 ), O—H...O hydrogen bonds between one of the hydroxyl H atoms and a carboxyl O atom from a symmetry-related molecule form a chain along [10\overline{1}]. In addition, ( 2 ) exhibits a strong visible luminescence when excited with ultraviolet radiation.

Sausa, Rosario C.↗