Skip to content
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
6c0fd01
fix issues
daniilsvc Jan 19, 2023
3b95c46
forgotten import and typos
daniilsvc Jan 19, 2023
023ee89
move import out of #ifdef HASKELINE
daniilsvc Jan 19, 2023
9cf4cdc
v1 of new algo, too small completion result
daniilsvc Feb 4, 2023
2bb89cc
revised algo
daniilsvc Feb 6, 2023
720be12
final working version
daniilsvc Feb 7, 2023
9ce84a3
correct weights and some minor changes
daniilsvc Feb 9, 2023
73f3fc6
change times_logic_in_branch
daniilsvc Feb 16, 2023
8888210
remove traces
daniilsvc Feb 16, 2023
4fbf88a
remove old findComorphismPaths function
daniilsvc Feb 16, 2023
4e1ed13
pdf of User guide is linked on web page
tillmo Feb 22, 2023
ed055fe
Change import for unsafeCoerce#
neilmayhew Mar 3, 2023
35fcbfb
Added requirements
b-gehrke Mar 15, 2023
ef980e3
Added edge and node styles
b-gehrke Jun 13, 2023
ab90daa
Added open file menu option
b-gehrke Jun 14, 2023
fe355de
Added menu and corrected edge colors
b-gehrke Jun 15, 2023
44f951b
Merge remote-tracking branch 'origin/master' into 2109_python_gui
b-gehrke Jun 15, 2023
6de3f51
Replaced `Reason` datatype for GoalStatus with a plain list of strings
b-gehrke Jul 6, 2023
c99ae49
Improved prove window
b-gehrke Jul 6, 2023
0a7d9f9
Refactoring to use Gtk Builder ui files for UI
b-gehrke Jul 12, 2023
c53921a
Add docker file for hets gui
b-gehrke Jul 14, 2023
d2b2800
Added options to specify Hetcats opts when loading a library
b-gehrke Jul 14, 2023
76713bf
Added automatic update sublogic
b-gehrke Jul 16, 2023
6e1bad8
Extracted prover and comorphism selector
b-gehrke Jul 16, 2023
40200c0
Added consistency checking
b-gehrke Jul 18, 2023
fe76e28
Added library settings
b-gehrke Jul 18, 2023
8d780bb
Changed proving and consistency checking to use global theory
b-gehrke Jul 18, 2023
7f1278d
Cached dot code to only call external graphviz tool when needed
b-gehrke Jul 18, 2023
d02ec37
Added checks that a library is loaded for all actions requiring a lib…
b-gehrke Jul 18, 2023
ad6163d
Removed debugging lines
b-gehrke Jul 18, 2023
f70f4dd
Added logging
b-gehrke Jul 18, 2023
6666671
Removed default actions for printing, searching, quiting and so on fr…
b-gehrke Jul 19, 2023
f9a6e74
Enhanced handling of right click in Graph Widget.
b-gehrke Jul 19, 2023
a4c5245
Made log argument optional
b-gehrke Jul 19, 2023
bcca592
Added implementation for view option "Show newly proven edges" and re…
b-gehrke Jul 19, 2023
849fa44
Performance optimizations
b-gehrke Jul 19, 2023
e735a1f
Added statusbar and smaller fixes
b-gehrke Jul 21, 2023
c5712ba
Updated dockerfiles
b-gehrke Jul 21, 2023
47866de
Updated structure for cleaner library build
b-gehrke Jul 21, 2023
ae6daa7
Fixing and annotating docker files
b-gehrke Jul 25, 2023
c67ad70
Added documentation code
b-gehrke Jul 25, 2023
e053fb0
Add action to publish python docs
b-gehrke Jul 25, 2023
4755c1a
Updated pages action
b-gehrke Jul 25, 2023
ba02f18
Updated pages action
b-gehrke Jul 25, 2023
8d849b7
Updated pages action
b-gehrke Jul 25, 2023
49473b9
Added output of consistency checker
b-gehrke Jul 27, 2023
b7d57e1
Added script to generate python stubs for haskell types automatically
b-gehrke Aug 1, 2023
d75f411
Added opening a referenced node in a seperate window
b-gehrke Aug 1, 2023
c1c4b6a
Preparations for conservativity of edges
b-gehrke Aug 4, 2023
b10b82f
Added conservativity checker
b-gehrke Sep 13, 2023
472a1a7
Corrected refactoring of check conservativity
b-gehrke Sep 20, 2023
e9f213f
Added conservativity check to python gui
b-gehrke Sep 20, 2023
36fd567
Changed docker builds to multistage builds for an easier creation of …
b-gehrke Sep 20, 2023
1a22aaf
Merge branch 'master' into 2109_python_gui
b-gehrke Sep 20, 2023
ab0f805
Added Library Graph
b-gehrke Sep 20, 2023
cfb6c57
Refactored library management
b-gehrke Sep 21, 2023
c9fe1d2
Clean up python api documentation
b-gehrke Sep 21, 2023
542b05b
Moved application wide actions to application and switched to auto lo…
b-gehrke Sep 27, 2023
edd360c
Changed AnySentence return type to G_theory s
b-gehrke Sep 27, 2023
936a0ad
Added refinement tree to api and gui
b-gehrke Sep 27, 2023
e4505fd
Corrected docker builds
b-gehrke Jul 11, 2024
26fe9c5
Work on refinement trees
b-gehrke Jul 11, 2024
62c3468
Merge branch 'master' into 2109_python_gui
b-gehrke Jul 11, 2024
9e31237
Added "Show theory" option
b-gehrke Jan 9, 2025
d697b73
Added translate and save theory menus
b-gehrke Jan 9, 2025
5ee7dc0
Move Prove button
b-gehrke Jan 15, 2025
9b40a97
Added prompt to apply automatic proof rules on load
b-gehrke Jan 23, 2025
0048436
Added comments and documentation for gui
b-gehrke Jan 23, 2025
e515425
Update version of github actions
b-gehrke Jan 23, 2025
63cb318
Added missing comment and link
b-gehrke Jan 29, 2025
8784eb1
Documentation
b-gehrke Jan 29, 2025
1bd6070
correct some imports
b-gehrke Oct 7, 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
18 changes: 18 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.github/**
.gitignore
.travis.yml
LIZENZ.txt
README*
_parameters
debian/**
doc/**
ideas
pretty/**
sample-ghci-script
todo*
**.tex
**.pdf
Docker/**
GMP/CoLoSS/data/GMP.tar.gz
GMP/papers/**
HolLight/OcamlTools/**
21 changes: 21 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Sphinx documentation to Pages

on:
push:
branches: [master] # branch to trigger deployment

jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
with:
documentation_path: ./python/api/docs
requirements_path: ./python/api/docs/requirements.txt
23 changes: 13 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ rev.txt
*.orig
.stack-work/
stack
doc/*.aux
doc/*.bbl
doc/*.blg
doc/*.fdb_latexmk
doc/*.fls
doc/*.log
doc/*.out
doc/UserGuide.pdf
doc/hs2isa.ps
docs/
/doc/*.aux
/doc/*.bbl
/doc/*.blg
/doc/*.fdb_latexmk
/doc/*.fls
/doc/*.log
/doc/*.out
/doc/UserGuide.pdf
/doc/hs2isa.ps
/docs/
__pycache__
.idea
programatica/
Expand Down Expand Up @@ -199,3 +199,6 @@ NeSyPatterns/AS.hs
NeSyPatterns/ATC_NeSyPatterns.der.hs
NeSyPatterns/ATC_NeSyPatterns.hs
OWL2/scripts/runTest
*.gresource
/python/api/docs/_build
/python/api/docs/code
3 changes: 2 additions & 1 deletion CMDL/Interface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import Comorphisms.LogicGraph (logicGraph)
import Logic.Grothendieck
#endif

import Proofs.AbstractState (getListOfConsCheckers, usableCC)
import Proofs.AbstractState (getAllConsCheckers, sublogicOfTheory, getCcName
, getListOfConsCheckers, usableCC)

import System.IO

Expand Down
11 changes: 5 additions & 6 deletions Common/Consistency.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Data.Data
required for extending imports (no confusion) in Maude -}
data Conservativity =
Inconsistent
| Unknown String
| Unknown { conservativityUnknownReason :: String}
| None
| PCons
| Cons
Expand All @@ -53,8 +53,7 @@ translated sentence of the source. -}
data ConservativityChecker sign sentence morphism = ConservativityChecker
{ checkerId :: String
, checkerUsable :: IO (Maybe String)
, checkConservativity
:: (sign, [Named sentence])
-> morphism
-> [Named sentence]
-> IO (Result (Conservativity, [sentence])) }
, checkConservativity :: (sign, [Named sentence]) -- source or initial signature and sentences
-> morphism -- morphism between specs
-> [Named sentence] -- target sentences of extended spec
-> IO (Result (Conservativity, [sentence])) } -- conservativity with obligations of the extensions
4 changes: 2 additions & 2 deletions Common/GtkGoal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ proofStatusToGStatus p = case goalStatus p of
Proved False -> GInconsistent
Proved True -> GProved
Disproved -> GDisproved
Open (Reason s) ->
if any (isInfixOf "timeout" . map toLower) s then GTimeout else GOpen
Open reason ->
if any (isInfixOf "timeout" . map toLower) reason then GTimeout else GOpen

-- | Converts a BasicProof into a GStatus
basicProofToGStatus :: BasicProof -> GStatus
Expand Down
139 changes: 91 additions & 48 deletions Docker/hetsapi.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,58 +1,101 @@
FROM hyphen:20.04
FROM spechub2/hyphen:22.04 as base

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get -y install locales && locale-gen en_US.UTF-8
ENV TZ Europe/Berlin
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV HETS_LIB /opt/Hets-lib

RUN apt-get install -y software-properties-common apt-utils make
RUN apt-add-repository -y ppa:hets/hets
RUN apt-get update
RUN apt-get install -y openjdk-8-jdk-headless ant cabal-install\
ksh perl-base tar xz-utils zip\
libmysqlclient-dev\
ghc-haddock libghc-missingh-dev\
ghc>=7.10.3 happy\
libghc-mutable-containers-dev\
libghc-haxml-dev libghc-tar-dev libghc-random-dev libghc-parsec3-dev\
libghc-fgl-dev libghc-xml-dev\
libghc-http-dev libghc-warp-dev libghc-wai-extra-dev\
libghc-split-dev libghc-file-embed-dev libghc-monad-logger-dev\
libghc-yaml-dev libghc-esqueleto-dev>=2.5.3\
libghc-persistent-dev>=2.7.0 libghc-persistent-template-dev>=2.5.2\
libghc-persistent-postgresql-dev>=2.6.1\
libghc-persistent-sqlite-dev>=2.6.2\
libghc-utf8-string-dev libghc-relation-dev\
libghc-persistent-mysql-dev\
libghc-hexpat-dev\
libghc-aterm-dev\
libghc-xeno-dev\
libghc-heap-dev


# RUN git clone https://github.com/spechub/Hets.git /hets
## OR
COPY ./ /hets

WORKDIR /hets
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update && apt-get -y install locales && locale-gen en_US.UTF-8 && \
apt-get install -y software-properties-common apt-utils make && \
# Install build and runtime dependencies
apt-add-repository -y ppa:hets/hets && \
apt-get update && \
apt-get install -y openjdk-8-jdk-headless ant cabal-install\
ksh perl-base tar xz-utils zip\
libmysqlclient-dev\
ghc-haddock libghc-missingh-dev\
ghc>=7.10.3 happy haskell-stack\
libghc-mutable-containers-dev\
libghc-haxml-dev libghc-tar-dev libghc-random-dev libghc-parsec3-dev\
libghc-fgl-dev libghc-xml-dev\
libghc-http-dev libghc-warp-dev libghc-wai-extra-dev\
libghc-split-dev libghc-file-embed-dev libghc-monad-logger-dev\
libghc-yaml-dev libghc-esqueleto-dev>=2.5.3\
libghc-persistent-dev>=2.7.0 libghc-persistent-template-dev>=2.5.2\
libghc-persistent-postgresql-dev>=2.6.1\
libghc-persistent-sqlite-dev>=2.6.2\
libghc-utf8-string-dev libghc-relation-dev\
libghc-persistent-mysql-dev\
libghc-hexpat-dev\
libghc-aterm-dev\
libghc-xeno-dev\
libghc-heap-dev

RUN make derived

FROM base as build-lib

RUN apt-get -y install git
# Get source
# RUN git clone --branch 2109_python_gui https://github.com/spechub/Hets.git /opt/hets
## Alternatively copy local files.
COPY ./ /opt/hets
WORKDIR /opt/hets/
# Build and install haskell library
RUN make derived
RUN runhaskell Setup.hs configure \
--ghc --prefix=/ \
--disable-executable-stripping \
--disable-benchmarks \
--libdir=/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5 \
--libsubdir=hets-api-0.100.0 \
--datadir=share \
--datasubdir=hets-api \
--haddockdir=/lib/ghc-doc/haddock/hets-api-0.100.0 \
--docdir=share/doc/hets-api-doc \
--package-db=/var/lib/ghc/package.conf.d \
--disable-profiling \
lib:Hets
--ghc --prefix=/ \
--disable-executable-stripping \
--disable-benchmarks \
--libdir=/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5 \
--dynlibdir=/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5 \
--libsubdir=hets-api-0.100.0 \
--datadir=share \
--datasubdir=hets-api \
--haddockdir=/lib/ghc-doc/haddock/hets-api-0.100.0 \
--docdir=share/doc/hets-api-doc \
--package-db=/var/lib/ghc/package.conf.d \
--disable-profiling \
lib:Hets
RUN runhaskell Setup.hs build -j$(nproc) lib:Hets
RUN runhaskell Setup.hs copy --destdir=/tmp/hets-pkg
RUN runhaskell Setup.hs register --gen-script
RUN mv register.sh /tmp/install-hets.sh
RUN tar -czf /tmp/hets.tar.gz -C /tmp/hets-pkg/ .

FROM build-lib AS debug
WORKDIR /opt/hets
RUN runhaskell Setup.hs install
RUN \
apt-get update && \
apt-get install -y cvc-47 darwin eprover fact++ maude minisat pellet spass vampire yices z3 zchaff && \
git clone https://github.com/spechub/Hets-lib.git ${HETS_LIB}

ENV PYTHONPATH=/opt/hets/python/api/src


FROM base
COPY --from=build-lib /tmp/hets.tar.gz /tmp/hets.tar.gz
COPY --from=build-lib /tmp/install-hets.sh /tmp/install-hets.sh
# RUN tar -tzf /tmp/hets.tar.gz && ls -l /bin /bin/sh && false
RUN tar -xzkpom -C / -f /tmp/hets.tar.gz
RUN /tmp/install-hets.sh

# Install provers and Hets-lib
RUN \
apt-get update && \
apt-get install -y cvc-47 darwin eprover fact++ maude minisat pellet spass vampire yices z3 zchaff && \
git clone https://github.com/spechub/Hets-lib.git ${HETS_LIB}
# Install python library

COPY --from=build-lib /opt/hets/python/api /opt/hets/python/api
RUN python3 -m pip install /opt/hets/python/api
# Add non-root user and cleanup
RUN \
useradd -ms /bin/bash -u 921 hets && \
rm -rf /opt/hets

WORKDIR /home/hets

USER hets
31 changes: 31 additions & 0 deletions Docker/hetsgui.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM spechub2/hets-api as base

USER root

COPY python/gui /opt/hetsgui

RUN apt-get update && apt-get upgrade -y && \
apt-get install -y libgtk-3-dev python3-gi python3-gi-cairo \
gir1.2-gtk-3.0 python3-pip graphviz \
libcanberra-gtk-module libcanberra-gtk3-module

FROM base as debug

ENV PYTHONPATH=${PYTHONPATH}:/opt/hetsgui/src

RUN python3 -m pip install xdot numpy graphviz

WORKDIR /root

FROM base

RUN cd /opt/hetsgui/src/hetsgui && \
glib-compile-resources hetsgui.gresource.xml && \
python3 -m pip install /opt/hetsgui && \
rm -rf /opt/hetsgui

WORKDIR /home/hets

USER hets

ENTRYPOINT /usr/local/bin/hets
6 changes: 4 additions & 2 deletions Docker/hyphen.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && \
apt-get upgrade -y && \
Expand All @@ -22,5 +22,7 @@ packages = [ "hyphen" ]\n\
[tool.setuptools.package-data]\n\
"*" = [ "hslowlevel.*" ]\n' > /hyphen/pyproject.toml

RUN pip3 install /hyphen
RUN python3 -m pip install --upgrade pip setuptools

RUN python3 -m pip install /hyphen

1 change: 1 addition & 0 deletions Hets.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ Library
HasCASL.TypeRel
HasCASL.Unify
HasCASL.VarDecl
HetsAPI.Refinement
HolLight.ATC_HolLight
HolLight.Helper
HolLight.HolLight2DG
Expand Down
2 changes: 1 addition & 1 deletion HetsAPI/Commands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module HetsAPI.Commands (
, HPC.getUsableConsistencyCheckers
, HPC.proveNode
, HPC.checkConsistency
, HPC.checkConservativityNode
, HPC.checkConservativityEdge

-- Hets.InfoCommands
, HIC.getGraphForLibrary
Expand Down
26 changes: 20 additions & 6 deletions HetsAPI/DataTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,40 @@ License : GPLv2 or higher, see LICENSE.txt
-}
module HetsAPI.DataTypes (
Sentence
, SentenceByName
, TheorySentence
, TheorySentenceByName
, SignatureJSON
, SymbolJSON
, GenericTransportType
, TheoryPointer) where
import qualified Common.OrderedMap as OMap
, TheoryPointer
, LinkPointer) where

import Data.ByteString.Lazy(ByteString)
import Data.Graph.Inductive.Graph (LNode, LEdge)

import Common.AS_Annotation(SenAttr(..))
import Common.LibName (LibName)
import Static.DevGraph (LibEnv, DGraph, DGNodeLab)
import qualified Common.OrderedMap as OMap

import Logic.Comorphism (AnyComorphism(..))
import Logic.Prover(ThmStatus(..))

import Static.DevGraph (LibEnv, DGraph, DGNodeLab, DGLinkLab)
import Static.GTheory (BasicProof(..))


import Data.Graph.Inductive.Graph (LNode)

-- | In the API if it is not possible to export the generic type, they are converted to JSON.
type GenericTransportType = ByteString


type Sentence = GenericTransportType
type SentenceByName = OMap.OMap String Sentence

type TheorySentence = SenAttr Sentence (ThmStatus (AnyComorphism, BasicProof))
type TheorySentenceByName = OMap.OMap String TheorySentence

type SignatureJSON = GenericTransportType
type SymbolJSON = GenericTransportType

type TheoryPointer = (LibName, LibEnv, DGraph, LNode DGNodeLab)
type LinkPointer = (LibName, LibEnv, LEdge DGLinkLab)
Loading