166 research outputs found
FliPpr: A Prettier Invertible Printing System
When implementing a programming language, we often write
a parser and a pretty-printer. However, manually writing both programs
is not only tedious but also error-prone; it may happen that a pretty-printed
result is not correctly parsed. In this paper, we propose FliPpr,
which is a program transformation system that uses program inversion
to produce a CFG parser from a pretty-printer. This novel approach
has the advantages of fine-grained control over pretty-printing, and easy
reuse of existing efficient pretty-printer and parser implementations
Finite Automata for the Sub- and Superword Closure of CFLs: Descriptional and Computational Complexity
We answer two open questions by (Gruber, Holzer, Kutrib, 2009) on the
state-complexity of representing sub- or superword closures of context-free
grammars (CFGs): (1) We prove a (tight) upper bound of on
the size of nondeterministic finite automata (NFAs) representing the subword
closure of a CFG of size . (2) We present a family of CFGs for which the
minimal deterministic finite automata representing their subword closure
matches the upper-bound of following from (1).
Furthermore, we prove that the inequivalence problem for NFAs representing sub-
or superword-closed languages is only NP-complete as opposed to PSPACE-complete
for general NFAs. Finally, we extend our results into an approximation method
to attack inequivalence problems for CFGs
Multifocal: a strategic bidirectional transformation language for XML schemas
Lenses are one of the most popular approaches to define bidirectional transformations between data models. However, writing a lens transformation typically implies describing the concrete steps that convert values in a source schema to values in a target schema. In contrast, many XML-based languages allow writing structure-shy programs that manipulate only specific parts of XML documents without having to specify the behavior for the remaining structure. In this paper, we propose a structure-shy bidirectional two-level transformation language for XML Schemas, that describes generic type-level transformations over schema representations coupled with value-level bidirectional lenses for document migration. When applying these two-level programs to particular schemas, we employ an existing algebraic rewrite system to optimize the automatically-generated lens transformations, and compile them into Haskell bidirectional executables. We discuss particular examples involving the generic evolution of recursive XML Schemas, and compare their performance gains over non-optimized definitions.Fundação para a Ciência e a Tecnologi
Peritonitis secondary to traumatic duodenal laceration in the presence of a large pancreatic pseudocyst: a case report
<p>Abstract</p> <p>Introduction</p> <p>A pancreatic pseudocyst is a common sequela of severe acute pancreatitis. Commonly, it presents with abdominal pain and a mass in the epigastrium several weeks after the acute episode and can be managed conservatively, endoscopically or surgically. We report a patient with a pancreatic pseudocyst awaiting endoscopic therapy who developed a life-threatening complication following a rather innocuous trauma to the abdomen.</p> <p>Case presentation</p> <p>A 23-year-old Asian male student presented as an emergency with an acute abdomen a week after a minor trauma to his upper abdomen. The injury occurred when he was innocently punched in the abdomen by a friend. He experienced only moderate discomfort briefly at the time. His past medical history included coeliac disease and an admission four months previously with severe acute pancreatitis. He was hospitalized for 15 days; his pancreatitis was thought to be due to alcohol binge drinking on weekends. Ultrasound scanning showed no evidence of gallstone disease. Five days after the trauma, he became anorexic, lethargic and feverish and started vomiting bilious content. Seven days post-trauma, he presented to our emergency department with severe abdominal pain. An emergency laparotomy was performed where a transverse linear duodenal laceration was found at the junction of the first and second part of his duodenum, with generalized peritonitis. His stomach and duodenum were stretched over a large pancreatic pseudocyst posterior to his stomach. It was postulated that an incomplete duodenal injury (possibly a serosal tear) occurred following the initial minor trauma, which was followed by local tissue necrosis at the injury site resulting in a delayed presentation of generalized peritonitis.</p> <p>Conclusion</p> <p>This is the first reported case of a traumatic duodenal laceration following minor blunt trauma in the presence of a large pancreatic pseudocyst. Minor blunt abdominal trauma in a normal healthy adult would not be expected to result in a significant duodenal injury. In the presence of a large pseudocyst, however, the stretching of the duodenum over the pseudocyst had probably predisposed the duodenum to this injury. Patients awaiting therapeutic interventions for their pancreatic pseudocysts should be warned about this unusual but life-threatening risk following minor blunt abdominal trauma.</p
- âŚ