1
0
mirror of https://github.com/ellmau/adf-obdd.git synced 2025-12-20 09:39:38 +01:00

Compare commits

..

No commits in common. "b90f68ac258985c7601ca3653155c5fcc4042284" and "eade6ef4153c6edfdfaf58ddfdc5ef987dcd998c" have entirely different histories.

7 changed files with 24 additions and 140 deletions

View File

@ -6,13 +6,11 @@ import {
AlertColor, AlertColor,
Alert, Alert,
AppBar, AppBar,
Box,
Button, Button,
Dialog, Dialog,
DialogActions, DialogActions,
DialogContent, DialogContent,
DialogTitle, DialogTitle,
Link,
TextField, TextField,
Toolbar, Toolbar,
} from '@mui/material'; } from '@mui/material';
@ -202,29 +200,24 @@ function Footer() {
<> <>
<AppBar position="fixed" sx={{ top: 'auto', bottom: 0 }}> <AppBar position="fixed" sx={{ top: 'auto', bottom: 0 }}>
<Toolbar sx={{ justifyContent: 'center' }}> <Toolbar sx={{ justifyContent: 'center' }}>
<Box sx={{ flexGrow: 1 }}> {username ? (
{username ? ( <>
<> <span>
<span> Logged in as:
Logged in as: {' '}
{' '} {username}
{username} {' '}
{' '} {tempUser ? '(Temporary User. Edit to set a password!)' : undefined}
{tempUser ? '(Temporary User. Edit to set a password!)' : undefined} </span>
</span> <Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Update)}>Edit</Button>
<Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Update)}>Edit</Button> {!tempUser && <Button color="inherit" onClick={() => logout()}>Logout</Button>}
{!tempUser && <Button color="inherit" onClick={() => logout()}>Logout</Button>} </>
</> ) : (
) : ( <>
<> <Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Login)}>Login</Button>
<Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Login)}>Login</Button> <Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Register)}>Register</Button>
<Button color="inherit" onClick={() => setDialogTypeOpen(UserFormType.Register)}>Register</Button> </>
</> )}
)}
</Box>
<Link href="/legal.html" target="_blank" sx={{ fontSize: '0.8rem' }}>
Legal Information (Impressum and Data Protection Regulation)
</Link>
</Toolbar> </Toolbar>
</AppBar> </AppBar>
<Dialog open={!!dialogTypeOpen} onClose={() => setDialogTypeOpen(null)}> <Dialog open={!!dialogTypeOpen} onClose={() => setDialogTypeOpen(null)}>

View File

@ -182,14 +182,18 @@ function GraphG6(props: Props) {
if (!graphRef.current) { if (!graphRef.current) {
graphRef.current = new Graph({ graphRef.current = new Graph({
container: ref.current!, container: ref.current!,
height: 800, width: 1200,
height: 400,
fitView: true, fitView: true,
modes: { modes: {
default: ['drag-canvas', 'zoom-canvas', 'drag-node'], default: ['drag-canvas', 'zoom-canvas', 'drag-node'],
}, },
layout: { layout: {
type: 'dagre', type: 'dagre',
rankdir: 'BT', rankdir: 'TB',
align: 'DR',
nodesep: 100,
ranksep: 100,
}, },
// defaultNode: { // defaultNode: {
// anchorPoints: [[0.5, 0], [0, 0.5], [1, 0.5], [0.5, 1]], // anchorPoints: [[0.5, 0], [0, 0.5], [1, 0.5], [0.5, 1]],

View File

@ -7,11 +7,6 @@
<script type="module" src="app.tsx"></script> <script type="module" src="app.tsx"></script>
</head> </head>
<body> <body>
<noscript>
<h1>ADF-BDD.DEV</h1>
<p>Turn on Javascript in your browser to use our ADF tool!</p>
<a href="./legal.html" target="_blank">Legal Information (Impressum and Data Protection Regulation)</a>
</noscript>
<div id="app"></div> <div id="app"></div>
</body> </body>
</html> </html>

View File

@ -1,99 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>ADF-BDD.dev - Legal Notice</title>
<meta name="description" content="Impressum and Data Protection Regulation for adf-bdd.dev">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Helvetica;
}
h1 {
text-align: center;
}
section {
max-width: 1000px;
margin: 0 auto 32px;
padding: 16px;
box-shadow: 0 0 10px 0px rgba(0,0,0,0.4);
}
section > :first-child {
margin-top: 0;
}
section > :last-child {
margin-bottom: 0;
}
</style>
</head>
<body>
<header>
<h1>ADF-BDD.DEV Legal Notice</h1>
</header>
<section>
<h2>Impressum</h2>
The <a href="https://tu-dresden.de/impressum?set_language=en" target="_blank" rel="noreferrer noopener">Impressum of TU Dresden</a> applies with the following amendments:
<h3>Responsibilities - Content and Technical Implementation</h3>
<p>
Dipl.-Inf. Lukas Gerlach<br>
Technische Universität Dresden<br>
Fakultät Informatik<br>
Institut für Theoretische Informatik<br>
Professur für Wissensbasierte Systeme<br>
01062 Dresden<br>
GERMANY
</p>
<p>
Email: lukas.gerlach@tu-dresden.de<br>
Phone: (+49) 351 / 463 43503
</p>
</section>
<section>
<h2>Data Protection Regulation</h2>
<p>
We process your personal data only in form of metadata that is send to us when you access the website.
This is done to pursue our legitimate interest of providing and improving this publicly available website (https://adf-bdd.dev).
To this aim, this metadata is also written to server log files.
The data may contain the following of your personal information: public IP address, time of access, internet browser (e.g. user agent, version), operating system, referrer url, hostname of requesting machine.
We only set cookies that are necessary for the provision of our service, i.e. to check if a user is logged in.
We do not set any so-called tracking cookies and we do not use any third party analytics tools on this website.
</p>
<h3>Legal basis</h3>
<p>
The legal basis for the data processing is <a href="https://gdpr.eu/article-6-how-to-process-personal-data-legally/" target="_blank" rel="noreferrer noopener">Section §6 para.1 lit. f GDPR</a>.
</p>
<h3>Rights of data subjects</h3>
<ul>
<li>You have the right to obtain information from TU Dresden about the data stored about your person and/or to have incorrectly stored data corrected.</li>
<li>You have the right to erasure or restriction of the processing and/or a right to object to the processing.</li>
<li>You can contact TU Dresden's Data Protection Officer at any time.
<p>
Tel.: +49 351 / 463 32839<br>
Fax: +49 351 / 463 39718<br>
Email: informationssicherheit@tu-dresden.de<br>
<a href="https://tu-dresden.de/informationssicherheit" target="_blank" rel="noreferrer noopener">https://tu-dresden.de/informationssicherheit</a>
</p>
</li>
<li>
You also have the right to complain to a supervisory authority if you are concerned that the processing of your personal data is an infringement of the law. The competent supervisory authority for data protection is:
<p>
Saxon Data Protection Commissioner<br>
Ms. Dr. Juliane Hundert<br>
Devrientstraße 5<br>
01067 Dresden<br>
Email: saechsdsb@slt.sachsen.de<br>
Phone: + 49 351 / 85471 101<br>
<a href="http://www.datenschutz.sachsen.de" target="_blank" rel="noreferrer noopener">www.datenschutz.sachsen.de</a>
</p>
</li>
</ul>
</section>
</body>
</html>

View File

@ -32,11 +32,8 @@ use self::heuristics::Heuristic;
/// ///
/// Please note that due to the nature of the underlying reduced and ordered Bdd the concept of a [`Term`][crate::datatypes::Term] represents one (sub) formula as well as truth-values. /// Please note that due to the nature of the underlying reduced and ordered Bdd the concept of a [`Term`][crate::datatypes::Term] represents one (sub) formula as well as truth-values.
pub struct Adf { pub struct Adf {
/// The ordering or the variables in the ADF including a dictionary for the statements
pub ordering: VarContainer, pub ordering: VarContainer,
/// The underlying binary decision diagram that respresents the ADF
pub bdd: Bdd, pub bdd: Bdd,
/// Acceptance Conditions for the ADF
pub ac: Vec<Term>, pub ac: Vec<Term>,
#[serde(skip, default = "Adf::default_rng")] #[serde(skip, default = "Adf::default_rng")]
rng: RefCell<StdRng>, rng: RefCell<StdRng>,
@ -66,7 +63,6 @@ impl Default for Adf {
} }
impl Adf { impl Adf {
/// Instntiates an ADF based on the publically available data
pub fn from_ord_nodes_and_ac( pub fn from_ord_nodes_and_ac(
ordering: VarContainer, ordering: VarContainer,
bdd_nodes: Vec<BddNode>, bdd_nodes: Vec<BddNode>,

View File

@ -26,7 +26,6 @@ impl Default for VarContainer {
} }
impl VarContainer { impl VarContainer {
/// Create [VarContainer] from its components
pub fn from_parser( pub fn from_parser(
names: Arc<RwLock<Vec<String>>>, names: Arc<RwLock<Vec<String>>>,
mapping: Arc<RwLock<HashMap<String, usize>>>, mapping: Arc<RwLock<HashMap<String, usize>>>,
@ -52,12 +51,10 @@ impl VarContainer {
.and_then(|name| name.get(var.value()).cloned()) .and_then(|name| name.get(var.value()).cloned())
} }
/// Return ordered names from [VarContainer]
pub fn names(&self) -> Arc<RwLock<Vec<String>>> { pub fn names(&self) -> Arc<RwLock<Vec<String>>> {
Arc::clone(&self.names) Arc::clone(&self.names)
} }
/// Return map from names to indices in [VarContainer]
pub fn mappings(&self) -> Arc<RwLock<HashMap<String, usize>>> { pub fn mappings(&self) -> Arc<RwLock<HashMap<String, usize>>> {
Arc::clone(&self.mapping) Arc::clone(&self.mapping)
} }

View File

@ -13,7 +13,6 @@ use std::{cell::RefCell, cmp::min, collections::HashMap, fmt::Display};
/// Each roBDD is identified by its corresponding [`Term`], which implicitly identifies the root node of a roBDD. /// Each roBDD is identified by its corresponding [`Term`], which implicitly identifies the root node of a roBDD.
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct Bdd { pub struct Bdd {
/// The nodes of the [Bdd] with their edges
pub nodes: Vec<BddNode>, pub nodes: Vec<BddNode>,
#[cfg(feature = "variablelist")] #[cfg(feature = "variablelist")]
#[serde(skip)] #[serde(skip)]
@ -101,7 +100,6 @@ impl Bdd {
RefCell::new(HashMap::new()) RefCell::new(HashMap::new())
} }
/// Construct [Bdd] from a list of nodes by adding one after the other
pub fn from_nodes(nodes: Vec<BddNode>) -> Self { pub fn from_nodes(nodes: Vec<BddNode>) -> Self {
let mut bdd = Self::new(); let mut bdd = Self::new();