Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
88a045a
Gitignore
ivanperez-keera Feb 2, 2025
fcfd2e4
Initial prototype.
ivanperez-keera Feb 2, 2025
1fb2048
WIP: Create an aeson struct.
ivanperez-keera Feb 14, 2025
ec28a28
WIP: Prints the trigger args but not the trigger. Use template.
ivanperez-keera Feb 14, 2025
c06b57c
Remove old code from template
ivanperez-keera Feb 14, 2025
f05f477
Comment out debug message.
ivanperez-keera Feb 17, 2025
830f6b9
Fix detection of floats.
ivanperez-keera Feb 17, 2025
2ccbefd
Add visualization to HTML.
ivanperez-keera Feb 17, 2025
3d92f8d
Use T and F instead of true and false in latex
ivanperez-keera Feb 17, 2025
05db537
Remove debugging
ivanperez-keera Feb 17, 2025
e502615
Restore trigger names
ivanperez-keera Feb 17, 2025
e4df254
Cleaning
ivanperez-keera Feb 17, 2025
3e157d9
Cleaning
ivanperez-keera Feb 17, 2025
5817a3c
Cleaning
ivanperez-keera Feb 17, 2025
a151fe2
Remove duplicated isBoolean/isFloat
ivanperez-keera Feb 17, 2025
ee3d7ee
Cleaning
ivanperez-keera Feb 17, 2025
bf8e76c
Cleaning
ivanperez-keera Feb 17, 2025
0fcb73c
Cleaning
ivanperez-keera Feb 18, 2025
1b6eecd
Remove unused css.
ivanperez-keera Feb 18, 2025
85f36ee
Detect mouse events on timeline.
ivanperez-keera Feb 18, 2025
a1ea431
HTML interactive
ivanperez-keera Feb 24, 2025
04c1a75
Add a stream dynamically. It only works for Stream Float atm.
ivanperez-keera Mar 15, 2025
c3abfa1
Modify backend to insert any stream of any type.
ivanperez-keera Mar 15, 2025
5139a3d
Add streams dynamically. Streams must be independent (cannot use othe…
ivanperez-keera Mar 15, 2025
6628888
Import Prelude qualified.
ivanperez-keera Mar 15, 2025
006ed90
Alignment
ivanperez-keera Mar 15, 2025
ccfce62
Add tODO note
ivanperez-keera Mar 15, 2025
1e16571
Remove commented code
ivanperez-keera Mar 15, 2025
f87cd1c
Implement ability to extract a trace from a spec, and restore a trace…
ivanperez-keera Mar 16, 2025
01543be
Implement spec dependences in where clause so that it's easier to tur…
ivanperez-keera Mar 16, 2025
4fa720e
Add streams dynamically that refer to existing streams
ivanperez-keera Mar 16, 2025
556127d
Distinguish colors in reduced color conditions
kaBeech Mar 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*
copilot-profiling
.DS_Store
.log
Empty file added CHANGELOG
Empty file.
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
2009
BSD3 License terms

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

Neither the name of the developers nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[![Build Status](https://travis-ci.com/Copilot-Language/copilot.svg?branch=master)](https://app.travis-ci.com/github/Copilot-Language/copilot)

# Copilot: a stream DSL

The visualizer, which draws Copilot specifications using different graphical
formats.

Copilot is a runtime verification framework written in Haskell. It allows the
user to write programs in a simple but powerful way using a stream-based
approach.

Programs can be interpreted for testing (with the library copilot-interpreter),
or translated C99 code to be incorporated in a project, or as a standalone
application. The C99 backend ensures us that the output is constant in memory
and time, making it suitable for systems with hard realtime requirements.

## Installation

Copilot-visualizer can be found on
[Hackage](https://hackage.haskell.org/package/copilot-interpreter). It is
typically only installed as part of the complete Copilot distribution. For
installation instructions, please refer to the [Copilot
website](https://copilot-language.github.io).

## Further information

For further information, install instructions and documentation, please visit
the Copilot website:
[https://copilot-language.github.io](https://copilot-language.github.io)

## License

Copilot is distributed under the BSD-3-Clause license, which can be found
[here](https://raw.githubusercontent.com/Copilot-Language/copilot/master/copilot-interpreter/LICENSE).
2 changes: 2 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
92 changes: 92 additions & 0 deletions copilot-visualizer.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
cabal-version: >=1.10
name: copilot-visualizer
version: 4.2
synopsis: Visualizer for Copilot.
description:
Visualizer for Copilot.
.
Copilot is a stream (i.e., infinite lists) domain-specific language (DSL) in
Haskell that compiles into embedded C. Copilot contains an interpreter,
multiple back-end compilers, and other verification tools.
.
A tutorial, examples, and other information are available at
<https://copilot-language.github.io>.

author: Ivan Perez, Frank Dedden
license: BSD3
license-file: LICENSE
maintainer: Ivan Perez <ivan.perezdominguez@nasa.gov>
homepage: https://copilot-language.github.io
bug-reports: https://github.com/Copilot-Language/copilot/issues
stability: Experimental
category: Language, Embedded
build-type: Simple
extra-source-files: README.md, CHANGELOG
data-files: data/tikz.latex
data/timeline.html

x-curation: uncurated

source-repository head
type: git
location: https://github.com/Copilot-Language/copilot.git
subdir: copilot-visualizer

executable copilot-live-backend
default-language: Haskell2010

main-is: Copilot/Live.hs

hs-source-dirs: src

ghc-options:
-Wall

build-depends:
base >= 4.9 && < 5,
aeson,
directory,
filepath,
hint,
pretty >= 1.0 && < 1.2,
ogma-extra >= 1.6.0 && < 1.7,

copilot-core >= 4.2 && < 4.3,
copilot-interpreter >= 4.2 && < 4.3,
copilot-visualizer >= 4.2 && < 4.3,
copilot-language,
copilot,
text,
websockets >= 0.12.7

other-modules:

Paths_copilot_visualizer

library

default-language: Haskell2010

hs-source-dirs: src

ghc-options:
-Wall

build-depends:
base >= 4.9 && < 5,
aeson,
directory,
filepath,
pretty >= 1.0 && < 1.2,
ogma-extra >= 1.6.0 && < 1.7,

copilot-core >= 4.2 && < 4.3,
copilot-interpreter >= 4.2 && < 4.3

exposed-modules:

Copilot.Visualize

other-modules:

Paths_copilot_visualizer
37 changes: 37 additions & 0 deletions data/tikz.latex
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{=<% %>=}}
\documentclass{standalone}
\usepackage{tikz}
\usepackage{tikz-timing}
\usepackage{xcolor}
\definecolor{false}{HTML}{ECD9ED}
\definecolor{true}{HTML}{D9ECED}
\begin{document}
\newcommand{\true}{T}
\newcommand{\false}{F}
\tikzset{
every picture/.style={
execute at end picture={
\path (current bounding box.south west) +(-1,-1) (current bounding box.north east) +(1,1);
}
}
}

\tikzset{
timing/.style={x=5ex,y=2ex},
timing/rowdist=4ex,
timing/dslope=0.1,
x=5ex,
timing/coldist=1ex,
timing/name/.style={font=\sffamily\scriptsize},
timing/d/text/.style={font=\sffamily\tiny},
}
\begin{tikztimingtable}
<%#adTraceElems%>
<%teName%> & g<%#teValues%><%#tvIsEmpty%>S<%/tvIsEmpty%><%^tvIsEmpty%><%#teIsBoolean%>[fill=<%tvValue%>]D{\<%tvValue%>}<%/teIsBoolean%><%^teIsBoolean%>D{<%tvValue%>}<%/teIsBoolean%><%/tvIsEmpty%><%/teValues%>\\
<%/adTraceElems%>
\extracode
\begin{background}[shift={(0.05,0)},help lines]
\vertlines[help lines,opacity=0.3]{-0.3ex,...,<%adLastSample%>}
\end{background}
\end{tikztimingtable}
\end{document}
Loading