Skip to content

Commit

Permalink
adding notes for demo run for fact generation, vector, etc still missing
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Aug 25, 2021
1 parent 8bffddc commit 93cf9d7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ easier to (eventually) switch up the base environment and libraries, etc.

Toward this goal, there are two demos available:

- [asp](asp): Which will generate facts and then run the solver clingo to show a result
- [asp](asp): Which will generate facts and then run the solver clingo to show a result (this demo is now deprecated)
- [db](db): Which will generate facts, add to an sqlite database, and then query them for the solver.

Of the two, the first is now considered deprecated as we've updated Smeagle, and are continue to update
the second (more robust) approach to maintaining a database.
31 changes: 31 additions & 0 deletions db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This demo will currently:

The whole thing looks like this:


```bash
$ docker run -it smeagle-db
==> Installing zlib-1.2.11-fz2bs562jhc2spgubs3fvq25g3qymz6x
Expand Down Expand Up @@ -151,4 +152,34 @@ $ docker build -t smeagle-db .
$ docker run -it --entrypoint bash -v $PWD:/db smeagle-db
```

And here is example output (and you can compare the original functions [here](https://github.com/buildsi/build-abi-test-tim/blob/main/foo.c))

```bash
./smeagle-db facts results/libfoo.so.json
INFO:smeagle-db:Retrieving record for libfoo.so.json

%============================================================================
% Library Facts
%============================================================================

%----------------------------------------------------------------------------
% Library: libfoo.so.json
%----------------------------------------------------------------------------
abi_typelocation("libfoo.so.json","func","e","Integer","%rdi","import","0").
abi_typelocation("libfoo.so.json","func","f","Integer","%rsi","import","0").
abi_typelocation("libfoo.so.json","func","s","Struct","%rdx","import","0").
abi_typelocation("libfoo.so.json","func","a","Scalar","%rdx","import","0").
abi_typelocation("libfoo.so.json","func","b","Scalar","%rdx","import","0").
abi_typelocation("libfoo.so.json","func","d","Scalar","%rdx","import","0").
abi_typelocation("libfoo.so.json","func","g","Integer","%rcx","import","0").
abi_typelocation("libfoo.so.json","func","h","Integer","%r8","import","0").
abi_typelocation("libfoo.so.json","func","ld","Float","framebase+8","import","0").
abi_typelocation("libfoo.so.json","func","m","Float","%xmm0","import","0").
abi_typelocation("libfoo.so.json","func","y","Array","%r9","import","0").
abi_typelocation("libfoo.so.json","func","n","Float","%xmm1","import","0").
abi_typelocation("libfoo.so.json","func","i","Integer","framebase+24","import","0").
abi_typelocation("libfoo.so.json","func","j","Integer","framebase+32","import","0").
abi_typelocation("libfoo.so.json","func","k","Integer","framebase+40","import","0").
```

Please [open an issue](https://github.com/buildsi/smeagle-demo) if you have any questions!

0 comments on commit 93cf9d7

Please sign in to comment.