-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename the new format to implicant table and add documentation page
- Loading branch information
1 parent
cb1b605
commit 9e20f45
Showing
9 changed files
with
103 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# config: set source doc and output | ||
DOC="doc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<page xmlns="http://projectmallard.org/1.0/" | ||
type="topic" | ||
id="format-implicant-tables"> | ||
<info> | ||
<link type="guide" xref="index#formats"/> | ||
<link type="guide" xref="formats#list"/> | ||
<revision status="draft" date="2018-11-28"/> | ||
<desc>Import/Export logical models as lists of implicant tables</desc> | ||
</info> | ||
|
||
<title>Implicant tables format</title> | ||
|
||
<p>The implicant tables format supports importing and exporting models a list of implicants | ||
(truth table entries with jokers). Each component of the model is described as a separate | ||
table depending on its own regulators. It is similar to the CNET format but supports | ||
multi-valued models and components identifiers are part of the format. | ||
</p> | ||
|
||
<p> | ||
Each implicant table starts with a line listing the regulators and ending with the ID of the target component. | ||
Similarly, each line of the table gives the value of each regulator (or '-' to match any value) and | ||
ends with the target value. Lines with a target value of '0' can be skipped. | ||
The '#' characters denote line-comments: everything following it on the same line is ignored. | ||
Spacing characters are ignored and each value uses a single character (i.e. values higher than 9 are not supported). | ||
</p> | ||
|
||
<p>Sample file defining a Boolean model with three components:</p> | ||
|
||
<code> | ||
# Sample model defined as a list of implicant tables | ||
# [A, B, D] | ||
|
||
A : A | ||
1:1 | ||
|
||
A : B | ||
0:1 | ||
|
||
A B : D | ||
11:1 | ||
</code> | ||
|
||
</page> | ||
|
2 changes: 1 addition & 1 deletion
2
...ntlr4/org/colomoto/biolqm/io/antlr/LTT.g4 → ...lr4/org/colomoto/biolqm/io/antlr/ITNET.g4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
grammar LTT; | ||
grammar ITNET; | ||
|
||
model: NEWLINE* table+; | ||
table: var* SEP curvar ('[' max ']')? NEWLINE+ line*; | ||
|
20 changes: 8 additions & 12 deletions
20
...o/truthtable/LogicalTruthTableExport.java → ...implicanttables/ImplicantTableExport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/org/colomoto/biolqm/io/implicanttables/ImplicantTableFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.colomoto.biolqm.io.implicanttables; | ||
|
||
import org.colomoto.biolqm.LogicalModel; | ||
import org.colomoto.biolqm.io.AbstractFormat; | ||
import org.colomoto.biolqm.io.LogicalModelFormat; | ||
import org.colomoto.biolqm.service.MultivaluedSupport; | ||
import org.kohsuke.MetaInfServices; | ||
|
||
@MetaInfServices(LogicalModelFormat.class) | ||
public class ImplicantTableFormat extends AbstractFormat { | ||
|
||
public static final String ID = "itnet"; | ||
|
||
public ImplicantTableFormat() { | ||
super(ID, "Implicant Table format", MultivaluedSupport.MULTIVALUED); | ||
} | ||
|
||
@Override | ||
public ImplicantTableExport getExporter(LogicalModel model) { | ||
return new ImplicantTableExport(model); | ||
} | ||
|
||
|
||
@Override | ||
public ImplicantTableImport getLoader() { | ||
return new ImplicantTableImport(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/org/colomoto/biolqm/io/implicanttables/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* Implicant table format. | ||
* This package contains import/export support for models defined as a list of implicant tables. | ||
*/ | ||
package org.colomoto.biolqm.io.implicanttables; |
28 changes: 0 additions & 28 deletions
28
src/main/java/org/colomoto/biolqm/io/truthtable/LogicalTruthTableFormat.java
This file was deleted.
Oops, something went wrong.