File:Combination of abstract domains.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 301 × 248 pixels, file size: 46 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Shows the analysis of a simple piece of C code (black) by abstract interpretation.
    • Red: set of values x can take in program executions. (Such sets cannot be represented in a computer due to the ellipses ("...") notation.)
    • Green: its abstraction by an interval.
    • Cyan: its abstraction by congruence classes mod 2.
    Using in particular the latter abstraction, the possibility of a zero division can be excluded, since x is known to be non-even.
    Date
    Source Own work, created with converted to SVG via pdf2svg.
    Author Jochen Burghardt
    TeX source
    \documentclass[12pt]{article}
    \usepackage[pdftex]{color}
    \usepackage[paperwidth=85mm,paperheight=70mm]{geometry}
    \setlength{\topmargin}{-36mm}
    \setlength{\textwidth}{30cm}
    \setlength{\textheight}{26cm}
    \setlength{\evensidemargin}{-2.7cm}
    \setlength{\oddsidemargin}{-2.5cm}
    \setlength{\parindent}{0cm}
    
    \newcommand{\prog}{\tt}
    \newcommand{\set}[1]{\{#1\}}
    \newcommand{\Z}{Z\!\!\!\!Z}
    
    \pagestyle{empty}
    
    \begin{document}
    
    \definecolor{ABST}{rgb}{0.00, 0.99, 0.99}
    \definecolor{conc}{rgb}{0.99, 0.50, 0.50}
    \definecolor{abst}{rgb}{0.00, 0.99, 0.00}
    
    \newcommand{\co}[1]{\textcolor{conc}{#1}}
    \newcommand{\ab}[1]{\textcolor{abst}{#1}}
    \newcommand{\AB}[1]{\textcolor{ABST}{#1}}
    
    $\begin{array}[t]{r@{}c@{} c @{}c@{}l r@{}c@{} c @{}c@{}l}
    %
            &
            & \co{\Z}
            &
            &
            \\
    %
            &
            & \ab{[-\infty,\infty]} , \AB{\set{0,1}}
            &
            &
            &
            \\
    %
            &
            & \mbox{\prog if(x>0)}
            &
            &
            \\
    %
            & {\scriptstyle\swarrow}
            &
            & {\scriptstyle\searrow}
            &
            \\
    \co{\set{1,2,3,...}}
            &
            &
            &
            & \co{\set{...,\mbox-2,\mbox-1,0}}
            \\
    \ab{[1,\infty]} , \AB{\set{0,1}}
            &
            &
            &
            & \ab{[-\infty,0]} , \AB{\set{0,1}}
            \\
    \mbox{\prog x=2*x+1;}
            &
            & \mbox{\prog else}
            &
            & \mbox{\prog x=1-4*x;}
            \\
    \co{\set{3,5,7,...}}
            &
            &
            &
            & \co{\set{1,3,5,...}}
            \\
    \ab{[3,\infty]} , \AB{\set{1}}
            &
            &
            &
            & \ab{[1,\infty]} , \AB{\set{1}}
            \\
    %
            & {\scriptstyle\searrow}
            &
            & {\scriptstyle\swarrow}
            &
            \\
    %
            &
            & \co{\set{1,3,5,...}}
            &
            &
            &
            \\
    %
            &
            & \ab{[1,\infty]} , \AB{\set{1}}
            &
            &
            \\
    %
            &
            & \mbox{\prog x=8/(x\%2);}
            &
            &
            \\
    \end{array}$
    \end{document}
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    30 December 2013

    image/svg+xml

    a2f0f434b9a8bf20ac12d5ef0641d30e4c1f50a3

    47,441 byte

    248 pixel

    301 pixel

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current14:51, 30 December 2013Thumbnail for version as of 14:51, 30 December 2013301 × 248 (46 KB)wikimediacommons>Jochen BurghardtUser created page with UploadWizard

    There are no pages that use this file.