Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
86 changes: 45 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,55 @@ A module may be defined as...

This simple specification defines two basic tests in canonical form (all details defined at the leaves of the specification).

Test a implies b:
Program: |
b :- a.
a.
:- not b.
Expect: SAT

Test b not implies a:
Program: |
b :- a.
b.
:- not a.
Expect: UNSAT
```yaml
Test a implies b:
Program: |
b :- a.
a.
:- not b.
Expect: SAT

Test b not implies a:
Program: |
b :- a.
b.
:- not a.
Expect: UNSAT
```

This complex specification defines four test cases (three of which are grouped into a common suite). A `Definitions` section defines several modules with complex indirect references that are to be used later. In the second test (suite) several variations on a common test setup are defined concisely by means of inheriting details defined in the enclosing suite. Now shown, it is also possible to define all details including `Modules`, `Arguments`, and even `Program` at the top level for use by inheritance.

```yaml
Definitions:
foo: {filename: foo.lp}
bar: {filename: bar.lp}
both: {group: [instance, encoding]}
instance: {reference: bar}
inline: |
#const width = 3.
dim(1..width).
{ p(X) } :- dim(X).


Test twisted references:
Definitions:
foo: {filename: foo.lp}
bar: {filename: bar.lp}
both: {group: [instance, encoding]}
instance: {reference: bar}
inline: |
#const width = 3.
dim(1..width).
{ p(X) } :- dim(X).


Test twisted references:
Definitions:
encoding: {reference: foo}
Modules: both
Expect: SAT

Test inline various:
Modules: inline
Expect: SAT

Test small:
Arguments: -c width=1

Test medium:
Arguments: -c width=3

Test large:
Arguments: -c width=5
encoding: {reference: foo}
Modules: both
Expect: SAT

Test inline various:
Modules: inline
Expect: SAT

Test small:
Arguments: -c width=1

Test medium:
Arguments: -c width=3

Test large:
Arguments: -c width=5
```

## Command line arguments
Run `ansunit --help` for more information.
Expand Down