-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support synthesis of JavaScript programs (fuzzing) (#269)
- Loading branch information
Showing
94 changed files
with
3,907 additions
and
771 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package esmeta.cfg.util | ||
import esmeta.cfg.* | ||
import esmeta.util.* | ||
import io.circe.*, io.circe.syntax.* | ||
import io.circe.generic.auto.*, io.circe.generic.semiauto.* | ||
|
||
class JsonProtocol(cfg: CFG) extends BasicJsonProtocol { | ||
// functions | ||
given funcDecoder: Decoder[Func] = uidDecoder(cfg.funcMap.get) | ||
given funcEncoder: Encoder[Func] = uidEncoder | ||
|
||
// nodes | ||
given nodeDecoder: Decoder[Node] = uidDecoder(cfg.nodeMap.get) | ||
given nodeEncoder: Encoder[Node] = uidEncoder | ||
|
||
// block nodes | ||
given blockDecoder: Decoder[Block] = | ||
uidDecoder(cfg.nodeMap.get(_).collect { case block: Block => block }) | ||
given blockEncoder: Encoder[Block] = uidEncoder | ||
|
||
// call nodes | ||
given callDecoder: Decoder[Call] = | ||
uidDecoder(cfg.nodeMap.get(_).collect { case call: Call => call }) | ||
given callEncoder: Encoder[Call] = uidEncoder | ||
|
||
// branch nodes | ||
given branchDecoder: Decoder[Branch] = | ||
uidDecoder(cfg.nodeMap.get(_).collect { case branch: Branch => branch }) | ||
given branchEncoder: Encoder[Branch] = uidEncoder | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.