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

first round of basic test cases for L4 -> LE (just the test cases, without the testing glue code) #415

Merged
merged 8 commits into from
Aug 10, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
GIVEN,data breach,,IS A,Data Breach,,,,
,organization,,IS A,Organization,,,,
,individual,,IS A,Person,,,,
DECIDE,data breach,with,organization,results in harm to,individual,,,
IF,data breach,with,organization,exposed data from,individual,,,
AND,data breach,with,organization,related to the name of,individual,,,
,OR,data breach,with,organization,relates to an account,individual,had with,organization
,,AND,data breach,with,organization,relates to data required for access to the account of,individual,
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
a data breach with a organization results in harm to a individual
if data breach with organization exposed data from individual
and data breach with organization relates to the name of individual
or data breach with organization relates to an account individual had with organization
and data breach with organization relates to data required for access to the account of individual.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*a data breach* with *a organization* results in harm to *a individual*
*a data breach* with *a organization* exposed data from *an individual*
*a data breach* with *a organization* relates to the name of *a individual*
*a data breach* with *a organization* relates to an account *a individual* had with *a organization*
*a data breach* with *a organization* relates to data required for access to the account of *a individual*
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
the target language is: prolog.

the templates are:
*a data breach* with *a organization* results in harm to *a individual*,
*a data breach* with *a organization* exposed data from *an individual*,
*a data breach* with *a organization* relates to the name of *a individual*,
*a data breach* with *a organization* relates to an account *a individual* had with *a organization*,
*a data breach* with *a organization* relates to data required for access to the account of *a individual*.

the knowledge base includes:
a data breach with a organization results in harm to a individual
if data breach with organization exposed data from individual
and data breach with organization relates to the name of individual
or data breach with organization relates to an account individual had with organization
and data breach with organization relates to data required for access to the account of individual.

scenario alicesimple is:
the incident last night with acmecorp exposed data from alice.
the incident last night with acmecorp relates to the name of alice.


scenario aliceharder is:
the incident last night with acmecorp exposed data from alice.
the incident last night with acmecorp relates to an account alice had with acmecorp.
the incident last night with acmecorp relates to data required for access to the account of alice.

query q is:
0 < 1.

query qa is:
which breach with which org results in harm to alice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a x is the parent of a y
if y is the child of x.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*a x* is the parent of *a y*
*a y* is the child of *a x*
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:-module('parent_eg_no_libs-prolog', []).
source_lang(en).
local_dict([is_the_parent_of, A, B], [x-x, y-y], [A, is, the, parent, of, B]).
local_dict([is_the_child_of, A, B], [y-y, x-x], [A, is, the, child, of, B]).
local_meta_dict([],[],[]).
prolog_le(verified).
is_the_parent_of(A, B) :-
is_the_child_of(B, A).
example(null, []).
example(alice, [scenario([(is_the_child_of('Alice6', 'Bob'):-true)], true)]).
query(null, true).
query(q_ap, is_the_parent_of(_, 'Alice6')).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GIVEN,x,,IS A,Person
,y,,IS A,Person
DECIDE,x,is the parent of,y,
IF,y,is the child of,x.,
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GIVEN,x,,IS A,Person
,y,,IS A,Person
DECIDE,x,is the parent of,y,
IF,y,is the child of,x,
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
the target language is: prolog.

the templates are:
*a x* is the parent of *a y*,
*a y* is the child of *a x*.

the knowledge base encoding includes:
a x is the parent of a y
if y is the child of x.
Loading