Skip to content

Commit

Permalink
Started definition of the logic -- module stub and data structures.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanks committed Feb 2, 2012
1 parent 9f9c8ef commit 33f0d19
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions CpiLogic.hs
@@ -0,0 +1,48 @@
-- (C) Copyright Chris Banks 2011-2012

-- This file is part of The Continuous Pi-calculus Workbench (CPiWB).

-- CPiWB is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

-- CPiWB is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with CPiWB. If not, see <http://www.gnu.org/licenses/>.

module CpiLogic where

import CpiLib

-------------------------
-- Data Structures:
-------------------------

data Formula = T -- True
| F -- False
| ValGT Val Val -- x > y
| ValGE Val Val -- x >= y
| ValLT Val Val -- x < y
| ValLE Val Val -- x <= y
| Conj Formula Formula -- a AND b
| Disj Formula Formula -- a OR b
| Neg Formula -- NOT a
| Until Formula Formula -- a U b
| Necc Formula -- G a
| Poss Formula -- F a
| Gtee Process Formula -- Pi |> a
deriving Show

data Val = R Double -- Real
| Conc Species -- Concentration of Species
| Deriv Species -- Derivative of concentration
| Plus Val Val -- x+y
| Minus Val Val -- x-y
| Times Val Val -- x*y
| Quot Val Val -- x/y
deriving Show

0 comments on commit 33f0d19

Please sign in to comment.