Abstrakte Grafik mit blauen und weißen Punkten

Symbolic Analysis of Grants

Our 2nd Tech Blog entry had a short description of Grants4Companies. Here we expand on what can be done as soon as legal texts are available in machine-interpretable (and not only machine-readable!) form!

If you haven't read about it yet, please take a short detour and read about Grants4Companies; this project now went live in the USP!

For the symbolic analysis of the grants we use the symbolic programming language Prolog, leveraging its inbuilt reasoning capabilities. Please note that this blog post is not a Prolog tour - we just show what we're working on!

For the Prolog Engine we decided to use Scryer Prolog, which

"aims to become to ISO Prolog what GHC is to Haskell: an open source industrial strength production environment that is also a testbed for bleeding edge research in logic and constraint programming, which is itself written in a high-level language."

Scryer processes get attached to our admin interface via a normal UNIX standard input/standard output pair; a customized toplevel script ensures feedback (or errors) for any query.

The first thing that the G4C admin interface does is to send facts to the Prolog Engine; these are some test companies and their associated data like corporate identifiers, locations, the legal form, classification of economic activity (ÖNACE), and so on.
Another list of facts is the interesting part: a translation of the grants into Prolog syntax.

Here's an excerpt:

[user].
company("Nö Test").
...
end_of_file.
[user].
rechtsform_in("Nö Test", "Gesellschaft-Mit-Beschränkter-Haftung").
...
end_of_file.
[user].
förderung("Förderung_zur_Wirtschaftsinitiative_Nachhaltigkeit_Steiermark", 
    förderkriterien(
        at( unternehmenssitz_in( [ "Land-Stmk" ] )) 
        or 
        at( betriebsstandort_in( [ "Land-Stmk" ] )))).
...
subrule("Ist_Juristische_Person", 
    förderkriterien( 
        at( rechtsform_in( 
              [ "Genossenschaft", "Verein", 
                "Privatstiftung", "Kapitalgesellschaft", 
                "Gesellschaft-Mit-Beschränkter-Haftung", ... ] )))).
subrule("Natürliche_oder_Juristische_Person",
    förderkriterien(
        at( rechtsform_in( [ "Einzelunternehmen" ] ))
        or 
        df( "Ist_Juristische_Person" )))).
end_of_file.

From these basic facts and a small library of helper functions a lot of interesting stuff can be asked - and answered.

For example, let's find out whether one grant F₁ non-trivially encompasses another grant F₂, ie. for all companies follows that if F₁ matches a company, F₂ will so, too: ∀C: F₁(C) →F₂(C).

In order to answer this question we perform a symbolic computation on the representations of the formal criteria for the two grants. This computation checks whether the criteria of the first grant logically imply the criteria of the second grant.

It is worth noting that this check can be implemented very succinctly in Prolog due to the symbolic representation of the grant criteria and by making use of Prolog’s inbuilt execution methods for performing the search for a logical derivation witnessing the implication. This is one of the reasons why we chose Prolog for the symbolic analysis of the grants, after all!

-? förderung(F1, förderkriterien(K1)),
   förderung(F2, förderkriterien(K2)),
   dif(K1, K2),
   provable_with_derivation(K1 -> K2, Tree).

F1= "Beratungskostenzuschuss_für_Gastronomie__Hotelleriebetriebe_in_der_Steiermark",
K1= ( df("Natürliche_oder_juristische_Person") 
      or
      at(rechtsform_in(["Offene-Gesellschaft", "Kommanditgesellschaft"]))
    )
    and
    at(önace_in(["55", "56"]))
    and
    ( at(unternehmenssitz_in(["Land-Stmk"]))
      or
      at(betriebsstandort_in(["Land-Stmk"]))),
F2= "Förderung_zur_Wirtschaftsinitiative_Nachhaltigkeit_Steiermark",
K2= at(unternehmenssitz_in(["Land-Stmk"])) 
    or
    at(betriebsstandort_in(["Land-Stmk"])),
Tree= der(...)

We can see that K₂ is one of the AND-combined criteria in K₁, ie. K₁ is stricter in choosing companies - K₁ chooses a subset of companies that match K₂.

Note that we also obtain an instantiation of the variable Tree with a term representing the logical derivation. This term provides an explicit explanation why resp. how the criteria of K₁ include the ones of K₂. In particular, it can be rendered in a human-readable form, thus witnessing explainability of the applied methods of symbolic AI.

Other queries we're about to ask:

  • How similar are grants? Can I get one from another by just switching one clause, or one constant? Eg. a grant in Lower Austria and one in Upper Austria are identical, apart from the location restriction; or, two grants that specify different limits for the number of employees.
  • Does one grant complement another, ie. is there a restriction that's opposed but uses the same limit? For example, one grant using "sales < 10M" and another "sales >= 10M" but otherwise having identical clauses.
  • Which classes of companies cannot profit from any grant? I.e., which classes of companies satisfy the negations of the criteria for all grants? We're not asking for specific companies here -- we want a symbolic description of such companies!

Do you have other cool ideas what can be done with such a symbolic representation?

Techblog #2

Short intro to "Grants4Companies"

Our project "Grants for Companies" won the first price in the competition "eGovernment Wettbewerb 2021". In this blogpost, we show you some details about the implementation.

more Short intro to "Grants4Companies"

Techblog #6

Live Hack: Controlling a Smartphone via Laser

In the USENIX Security Symposium 2020 "Laser-Based Audio Injection on Voice-Controllable Systems" was presented: making MEMS-microphones believe that audio input happens via amplitude-modulated light from far away. We reproduced these efforts, to show that such threats are legit and shouldn't be underestimated.

more Live Hack: Controlling a Smartphone via Laser