- Notifications
You must be signed in to change notification settings - Fork0
mheiber/lsbsteak
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repo models potential Hack language feautures for soundLate Static Bindings.
You can ask the Alloy model for examples of valid Hack programs and ask it to check safety properties for you.
Here's an example of a generated Hack program:
<?hh<<file: __EnableUnstableFeatures('typed_local_variables')>>abstract class AbstractClass0 { public static abstract function m1(): void /* AbstractMethod$1*/; public static function m0(): void /* ConcreteMethod$0*/ {}}abstract class AbstractClass1 extends AbstractClass0 { public static abstract function m1(): void /* AbstractMethod$2*/; // type errors: CantOverrideNonConcreteClassMethodWithConcreteClassMethod <<__ConcreteClass>> public static function m0(): void /* ConcreteMethod$1*/ { // Runtime fatal! static::m1(); // Call$0 resolves to AbstractMethod$2 }}<<__EntryPoint>>function main(): void { let $v0 : classname<AbstractClass1> = AbstractClass1::class; let $v1 : classname<AbstractClass0> = $v0; $v1::m0(); // Call$1 resolves to ConcreteMethod$1}which can be easier to digest thana graph representation.
Demo:./demo.mov
Use with this custom build of Alloy that understands how to use custom visualizations:mheiber/org.alloytools.alloy. See instructions there, which use the examples from this repo.
About
No description, website, or topics provided.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
