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

How to use and get reports #75

Closed
jm4rc05 opened this issue May 6, 2019 · 2 comments
Closed

How to use and get reports #75

jm4rc05 opened this issue May 6, 2019 · 2 comments

Comments

@jm4rc05
Copy link

jm4rc05 commented May 6, 2019

Hello,

I'm trying to learn and use some DSE tools, and found ExpoSE, but sorry, I couldn't get it to work. The question is: what I'm doing wrong or not seeing properly?

The setup was fine, and I executed successfully all tests running ./scripts/run_testes.

Now I'm running the command EXPOSE_LOG_LEVEL=3 EXPOSE_PRINT_PATHS=1 EXPOSE_PRINT_COVERAGE=1 expoSE ./minimist, and after a few minutes I got some messages, evertything seens to be fine, but those two messages points to a dead-end:

[!] Wrote final coverage to /var/folders/g1/zw1lbf2x0gz_b1n899bhjszw0000gn/T/tmp-34291p8JnimJ4p6bm
[!] Wrote final output to /var/folders/g1/zw1lbf2x0gz_b1n899bhjszw0000gn/T/tmp-34291PpRL57fVU2JE

Those files doesn't exists after the script has finished! I got some more messages, a listing from index.js, and the files index_jalangi.js and index_jalangi.json was generated and I'm studying them now.

But I didn't got any luck running the UI! After selecting minimist/index.js using the Analyze option, runtime counter finish at ~18/19, no info is reported, and at Output tab I got:

( . . . )

,SyntaxError: Unexpected token in / in JSON at position 0
,at JSON.parse()
,at Object.(/Users/ra978165/Developer/ExpoSE/Distributor/bin/Distributor.js:39:23)
,at Module._compile(module.js:571:32)

( . . . )

The other tabs and all info is blank! At this point I ventured some debugging, and at this point ExpoSE seens to be trying to load ./minimist/index.js using the JSON.parser() and I didn't figure out what can I do to fix my input, since the Analyse option didn't enable .json files! The Load option didn't the trick either!

A few hints would be greatly appreciated!

@jawline
Copy link
Member

jawline commented May 9, 2019

Hey,

Sorry about the late reply - I didn't notice the issue.

Do you want to execute an automatically generated test harness for minimist? If so I would try:

npm install minimist
RECOMPILE=1 EXPOSE_LOG_LEVEL=0 EXPOSE_PRINT_COVERAGE=1 expoSE ahg minimist

The ahg command will generate a generic harness for the program. If not then you will need to manually construct a test case (a small JS program which uses require to import the library, constructs some symbols and then calls the desired methods). Examples can be found in the tests/ folder.

Logging in ExpoSE is largely for development, and can actually break some programs, so for general analysis it should be turned off (console.log, toString, etc can have side-effects in the program under test).

@jm4rc05
Copy link
Author

jm4rc05 commented May 13, 2019

Great!!! I'll give it a spin. thanks

@jm4rc05 jm4rc05 closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants