5 research outputs found

    CSS Minification via Constraint Solving

    Get PDF
    Minification is a widely-accepted technique which aims at reducing the size of the code transmitted over the web. We study the problem of minifying Cascading Style Sheets (CSS) --- the de facto language for styling web documents. Traditionally, CSS minifiers focus on simple syntactic transformations (e.g. shortening colour names). In this paper, we propose a new minification method based on merging similar rules in a CSS file. We consider safe transformations of CSS files, which preserve the semantics of the CSS file. The semantics of CSS files are sensitive to the ordering of rules in the file. To automatically identify a rule merging opportunity that best minimises file size, we reduce the rule-merging problem to a problem on CSS-graphs, i.e., node-weighted bipartite graphs with a dependency ordering on the edges, where weights capture the number of characters (e.g. in a selector or in a property declaration). Roughly speaking, the corresponding CSS-graph problem concerns minimising the total weight of a sequence of bicliques (complete bipartite subgraphs) that covers the CSS-graph and respects the edge order. We provide the first full formalisation of CSS3 selectors and reduce dependency detection to satisfiability of quantifier-free integer linear arithmetic, for which highly-optimised SMT-solvers are available. To solve the above NP-hard graph optimisation problem, we show how Max-SAT solvers can be effectively employed. We have implemented our algorithms using Max-SAT and SMT-solvers as backends, and tested against approximately 70 real-world examples (including the top 20 most popular websites). In our benchmarks, our tool yields larger savings than six well-known minifiers (which do not perform rule-merging, but support many other optimisations). Our experiments also suggest that better savings can be achieved in combination with one of these six minifiers

    Automata and linear temporal logic : translations with transition-based acceptance

    Get PDF
    Automata theory provides powerful tools for designing and implementing decision procedures for temporal logics and their applications to the automatic verification of systems against their logical specifications. Implementing these decision procedures by making use of automata built from the systems and their specifications with translation procedures is challenging in practice due to the tendency of the automata to grow easily unmanageably large as the size of the systems or the logical specifications increases. This thesis develops the theory of translating propositional linear time temporal logic (LTL) into nondeterministic automata via self-loop alternating automata. Unlike nondeterministic automata, self-loop alternating automata are expressively equivalent to LTL and allow a conceptually simple translation of LTL specifications into automata using a set of rules for building automata incrementally from smaller components. The use of generalized transition-based acceptance for automata throughout all constructions gives rise to new optimized translation rules and facilitates designing heuristics for the minimization of automata by making use of language containment tests combined with structural analysis of automata. The generalized definition also supports the translation of self-loop alternating automata into nondeterministic automata by essentially applying the standard subset construction; this construction can be further simplified and optimized when working with automata built from LTL formulas. The translation rules can also be used to identify a syntactic subclass of LTL for which the exponential increase caused by the subset construction in the number of states of the automaton can always be avoided; consequently, the satisfiability problem for this subclass, which is shown to extend related subclasses known from the literature, is NP-complete. Additionally, the emptiness of generalized nondeterministic automata is shown to be testable without giving up generalized transition-based acceptance by using a new variant of the well-known nested depth-first search algorithm with improved worst-case resource requirements.Automaattiteorian avulla voidaan suunnitella ja toteuttaa temporaalilogiikkojen ratkaisumenetelmiä sekä näiden menetelmien sovellutuksia logiikoilla järjestelmistä esitettyjen oikeellisuusvaatimusten tietokoneavusteiseen verifiointiin. Käytännössä näiden ratkaisumenetelmien toteuttaminen kääntämällä järjestelmät ja niiden oikeellisuusvaatimukset automaateiksi on kuitenkin haasteellista, sillä näistä automaateista tulee järjestelmien tai loogisten vaatimusten koon kasvaessa helposti niin suuria, ettei niitä enää voida käsitellä. Tässä väitöskirjassa kehitetään lineaarisen ajan temporaalilogiikan (LTL) epädeterministisiksi automaateiksi kääntämisen teoriaa käyttämällä käännöksen apuna vain yhden tilan silmukoita sisältäviä alternoivia automaatteja, joilla – toisin kuin epädeterministisillä automaateilla – on sama ilmaisuvoima kuin lineaarisen ajan temporaalilogiikalla. Tätä logiikkaa voidaan kääntää näiksi automaateiksi soveltaen yksinkertaisia sääntöjä automaattien yhdistämiseksi vaiheittain keskenään yhä suuremmiksi automaateiksi. Käyttämällä yleistettyä siirtymäpohjaista hyväksyvyyden määritelmää automaateille kaikissa käännöksen vaiheissa voidaan näin muodostettuja automaatteja sieventää uusin tavoin käyttäen apuna automaattien hyväksymien kielten välisiä sisältyvyyssuhteita sekä automaattien rakenteellisia ominaisuuksia. Yleistetyn määritelmän ansiosta vain yhden tilan silmukoita sisältävät alternoivat automaatit voidaan myös kääntää edelleen epädeterministisiksi automaateiksi soveltamalla yleisesti tunnettua osajoukkokonstruktiota lähes sellaisenaan. Tämä konstruktio voidaan edelleen tehdä yksinkertaisemmin ja tehokkaammin LTL-kaavoista muodostetuille automaateille. Automaattikäännöksessä käytettävien sääntöjen avulla voidaan myös erottaa lineaarisen ajan temporaalilogiikan syntaktinen osajoukko, jonka kaavat onmahdollista kääntää epädeterministisiksi automaateiksi ilman, että automaattien tilojen määrä kasvaa osajoukkokonstruktion tavoin eksponentiaalisesti. Tästä tuloksesta seuraa, että kyseisen LTL:n osajoukon toteutuvuusongelma on NP-täydellinen. Osajoukko on samankaltaisia kirjallisuudessa aiemmin esiteltyjä osajoukkoja aidosti laajempi. Väitöskirjassa esitetään myös, kuinka epädeterministisen automaatin hyväksymän kielen tyhjyys voidaan tarkastaa luopumatta yleistetystä siirtymäpohjaisesta hyväksyvyyden määritelmästä käyttäen algoritmia, joka on uusi, huonoimman tapauksen vaatimuksiltaan tehokkaampi muunnos tunnetusta sisäkkäisestä syvyyshakualgoritmista.reviewe

    Spécification, validation et satisfiabilité [i.e. satisfaisabilité] de contraintes hybrides par réduction à la logique temporelle

    Get PDF
    Depuis quelques années, de nombreux champs de l'informatique ont été transformés par l'introduction d'une nouvelle vision de la conception et de l'utilisation d'un système, appelée approche déclarative. Contrairement à l'approche dite impérative, qui consiste à décrire au moyen d'un langage formelles opérations à effectuer pour obtenir un résultat, l'approche déclarative suggère plutôt de décrire le résultat désiré, sans spécifier comment ce «but» doit être atteint. L'approche déclarative peut être vue comme le prolongement d'une tendance ayant cours depuis les débuts de l'informatique et visant à résoudre des problèmes en manipulant des concepts d'un niveau d'abstraction toujours plus élevé. Le passage à un paradigme déclaratif pose cependant certains problèmes: les outils actuels sont peu appropriés à une utilisation déclarative. On identifie trois questions fondamentales qui doivent être résolues pour souscrire à ce nouveau paradigme: l'expression de contraintes dans un langage formel, la validation de ces contraintes sur une structure, et enfin la construction d'une structure satisfaisant une contrainte donnée. Cette thèse étudie ces trois problèmes selon l'angle de la logique mathématique. On verra qu'en utilisant une logique comme fondement formel d'un langage de « buts », les questions de validation et de construction d'une structure se transposent en deux questions mathématiques, le model checking et la satisfiabilité, qui sont fondamentales et largement étudiées. En utilisant comme motivation deux contextes concrets, la gestion de réseaux et les architectures orientées services, le travail montrera qu'il est possible d'utiliser la logique mathématique pour décrire, vérifier et construire des configurations de réseaux ou des compositions de services web. L'aboutissement de la recherche consiste en le développement de la logique CTLFO+, permettant d'exprimer des contraintes sur les données, sur la séquences des opérations\ud d'un système, ainsi que des contraintes dites «hybrides». Une réduction de CTL-FO+ à la logique temporelle CTL permet de réutiliser de manière efficace des outils de vérification existants. ______________________________________________________________________________ MOTS-CLÉS DE L’AUTEUR : Méthodes formelles, Services web, Réseaux

    An NP-Complete Fragment of LTL

    No full text
    International audienc

    AN NP-COMPLETE FRAGMENT OF LTL

    No full text
    corecore